• 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
backtrace() symbolizes wrong, to an inline function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

backtrace() symbolizes wrong, to an inline function


  • Subject: backtrace() symbolizes wrong, to an inline function
  • From: Jerry Krinock <email@hidden>
  • Date: Thu, 04 Oct 2012 10:12:13 -0700

A 32-bit Cocoa Mac app is a thin wrapper around a 32-bit framework.  I've received a dozen or so crash reports from users during the last year which start something like this…

1   MyFramework   0x00105066 MyInlineFunction + 188607
2   MyFramework   0x0001d8be MyFramework + 96446
3   MyFramework   0x0001ddc4 MyFramework + 97732
4   MyFramework   0x0001af43 MyFramework + 85827
5   MyFramework   0x0001ab0e MyFramework + 84750
6   Foundation    0x98910c52 __57-[NSNotificationCenter … … …

which indicates that the crash occurred in MyInlineFunction().  But this is wrong.  The program was nowhere near MyInlineFunction when the crash occurred.  If I symbolize the address in that entry (0x00105066 in this example) with gdb and the dSYM, I get the correct line where the crash actually occurred.

The function MyInlineFunction() is the one and only function in the framework which I have declared as inline.

Also, there are some places in this app where I add a backtrace to the -userInfo of an NSError using the backtrace() function, and the app's custom error presentation dialog has a button which the user may click to send me the error.  I have also received a few backtraces via this mechanism which exhibit the same issue.  Apparently it is some relative of the backtrace() function which is responsible for the erroneous symbolization in the reports generated by Crash Reporter.

If I create such an error on my Mac, where backtrace() has the benefit of either an unstripped Debug build or a matching dSYM file, the backtrace is symbolized correctly.

Such erroneous symbolization has emitted from Mac OS 10.8.2, 10.7, and possibly 10.6.

What might be going on here?  It's like: When backtrace() can't find the symbol for an address, it grabs the symbol of the first inline function.

Jerry Krinock


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: backtrace() symbolizes wrong, to an inline function
      • From: Greg Parker <email@hidden>
    • Re: backtrace() symbolizes wrong, to an inline function
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: Suggestions for handling old document files with file paths in a sandbox environment
  • Next by Date: Re: backtrace() symbolizes wrong, to an inline function
  • Previous by thread: Re: build compatibility for iOS
  • Next by thread: Re: backtrace() symbolizes wrong, to an inline function
  • Index(es):
    • Date
    • Thread