• 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
Bug related to GCC_OPTIMIZATION_LEVEL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug related to GCC_OPTIMIZATION_LEVEL


  • Subject: Bug related to GCC_OPTIMIZATION_LEVEL
  • From: Jason Swain <email@hidden>
  • Date: Tue, 1 Jun 2010 13:30:09 +0100

I have an XCode project that runs find in Debug configuration, but when I change to Release if fails with a bug that is hard to track down.

Through trial and error I found that if I turn of all optimizations the code will run correctly, but with any optimization level set the code fails. Debugging is difficult with optimization turned on as the debugger has less information to go on.

The bug presents itself as various Objective-c object variables being nil when they shouldn't be. I've added NSLogs() and they are all set correctly in a property setter in both Debug and Release, but when accessed later in the code they are nil in Release and correct in Debug. This is consistent and only happens in a few classes (with a common parent), so it is probably related to something in that class tree.

This is a difficult one to track down as I can't change to Debug configuration to debug the problem, and in the Release configuration gdb doesn't give me enough information to see what the problem is.

Does anyone have any suggestions on how I should attack this problem?


Jason
---
bookshelfapps.com



 _______________________________________________
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

  • Follow-Ups:
    • Re: Bug related to GCC_OPTIMIZATION_LEVEL
      • From: Ken Thomases <email@hidden>
    • Re: Bug related to GCC_OPTIMIZATION_LEVEL
      • From: "email@hidden" <email@hidden>
  • Prev by Date: Re: Undefined Main Symbol
  • Next by Date: Re: Bug related to GCC_OPTIMIZATION_LEVEL
  • Previous by thread: Re: Undefined Main Symbol
  • Next by thread: Re: Bug related to GCC_OPTIMIZATION_LEVEL
  • Index(es):
    • Date
    • Thread