• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: round() returning NaN
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >round() returning NaN (From: Eyal Redler <email@hidden>)
 >Re: round() returning NaN (From: "Frederick C. Lee" <email@hidden>)
 >Re: round() returning NaN (From: Eyal Redler <email@hidden>)
 >Re: round() returning NaN (From: email@hidden (Christian Demmer))
 >Re: round() returning NaN (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: round() returning NaN
  • Next by Date: Re: XCode 4 and Yacc and Lex files
  • Previous by thread: Re: round() returning NaN
  • Next by thread: Re: How does XCode propagate build settings to sub projects (or does it at all?)
  • Index(es):
    • Date
    • Thread