4

I have a strange line in my stacktrace that I want to investigate further:

12  libsystem_c.dylib               0x3aa272dc free + 168

If I understand correctly, libsystem_c is C standard library. Is the version used in the iOS open-sourced? Where can I get that source?

Max Yankov
  • 12,551
  • 12
  • 67
  • 135
  • That seems to be a standard call to free, i.e. freeing allocated memory. – Daniel Oct 23 '13 at 13:13
  • Yes, I know that. That's why I want to look at the body of free() function in the standard library that Apple uses on iOS — to determine which kind of error it may be. – Max Yankov Oct 23 '13 at 13:16
  • Why don't you look higher up the stack trace to see what's causing your call to free? – Daniel Oct 23 '13 at 13:46
  • 1
    @Daniel I'm trying to understand that too. http://stackoverflow.com/questions/19543019/what-of-this-c-sharp-code-can-result-in-a-call-to-free-in-compiled-form – Max Yankov Oct 23 '13 at 13:51
  • Ah, ok. I still think looking at the source code for free (which I doubt you will find, atleast for iOS) is going to help you. – Daniel Oct 23 '13 at 14:20

2 Answers2

3

To be more specific, I think it is hosted here: https://opensource.apple.com/source/Libc/

Ken Aspeslagh
  • 11,484
  • 2
  • 36
  • 42
0

For someone who may need answer

You can find OSX sources at https://opensource.apple.com/

Homper
  • 322
  • 2
  • 5
  • 12