I have a large Mac application that runs for several days at a time, working on a large dataset. This is a combination of Objective-C ++ and C ++. It works great on Mountain Lion, but on the Mavericks, after working for about 10-20 minutes (in which several million objects were allocated and destroyed), it crashes. It behaves as if it is crashing with an invalid pointer (i.e., it calls a function on a remote C ++ object), but the object it points to is in a state that makes absolutely no sense.
All my C ++ classes inherit from a common base class, where the constructor looks something like this:
MyClass::MyClass() { mCreated = 12345; //int member variable set here and NEVER TOUCHED AGAIN. //other initialization stuff }
When it crashes, the debugger shows that in a bad object, the value for mCreated is 0. It behaves as if the object never started its constructor!
I donβt think this memory is stomping, because this value is never anything other than 0 or its expected value, and none of the other fields of the object have values ββthat look like garbage that you expect from stomping memory .
I also tried to run using scribble, and the values 0x555 and 0xaaa not displayed anywhere. I also tried Guard Edges.
An in-depth investigation revealed nothing. A bad object is not always the same class. All I can come up with is that something with new memory material in Mavericks (compressing unused memory) causes some kind of new behavior (maybe an error or maybe some previously unknown, mostly unmanaged rule which really matters).
Has anyone seen something like this? Or does anyone know any fundamentally unknown memory rules that will apply more strongly under Mavericks?
source share