Ryan Mansfield(deleted)
|
Re: ceilf() causing infinite loop
|
Ryan Mansfield(deleted)
11/10/2011 4:37 PM
post90014
|
Re: ceilf() causing infinite loop
On 11-11-10 04:26 PM, Mark Thomas wrote:
> I was having trouble using unordered_map<> with the gcc 4.6.1 tool chain targeting x86 and linking against "GNU with
exceptions". The release build would hang when unordered_map<> constructor was called, but not hang in the debug build.
Debugging the release build shows it gets stuck in ceilf().
>
> After looking over gcc source I see that unordered_map<> is fairly different between release and debug, so debug
apparently doesn't call ceilf(). The release version actually calls __builtin_ceil() in hashtable_policy.h.
>
> So I decided to call ceilf() myself and sure enough, it hangs in debug and release builds. Then I tried gcc 4.4.2 and
it also hangs.
>
> Appears that C ceilf() calls C++ 'float ceil( float )', which calls C ceilf() again...hence an infinite loop.
>
> I downloaded and tried the exact same code in MinGW with gcc 4.6.1 and it works fine.
>
> I'm getting by with using map<> instead, but I would like to use unordered_map<> if there is a fix.
This is a known issue which has been fixed. I'll try to get post a build
as soon as possible for it.
Regards,
Ryan Mansfield
|
|
|