Re: round() returning NaN
Re: round() returning NaN
- Subject: Re: round() returning NaN
- From: Eyal Redler <email@hidden>
- Date: Sun, 03 Apr 2011 16:06:58 +0300
>
> In short, the problem was that after (explicitly) using mmx instructions, you must call emms instruction to cleanup the floating point registers, else any use of a floating point instructions may behave unexpectedly.
>
> Are you using mmx or calling code that may use it and does not call emms to cleanup the registers ?
I'm not using mmx instructions explicitly.
>> 2. I notices that if I put a breakpoint in some particular place of the code the problem doesn't occur: it is as if the actual stopping on the breakpoint cleared the bad stuff that was causing it...
>
> To me, this suggests a possible threading issue.
My application does not produce threads explicitly.
>> I would appreciate any ideas or directions that you or others might have, this is really worrying and I'm out of ideas...
>
> I recommend trying the -fstack-protector-all compiler option. If that doesn't isolate it, you can move on to Valgrind.
I tried -fstack-protector-all, didn't see anything.
I also tried guard malloc which didn't show any problems and also caused the actual problem to disappear (that is, under guard malloc the problem doesn't manifest itself) - maybe this is significant?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden