Coldfire application/compiler problem
Dave Meador
dave at meadorresearch.com
Fri Jan 30 23:32:56 UTC 2009
Hello,
I have a c++ application using Freescale 547x_548x 2007 BSP which
compiles runs using compiler version:
g++ version 4.1.1 (CodeSourcery Sourcery G++ 4.1-30).
However, I needed to upgrade to the latest Freescale 2008 BSP fix
corruptions which were caused by a flaw in the CPU cache handling of the
kernel -- the release notes claim this issue is fixed in the latest 2008
BSP.
My application (same exact code) now crashes with a strange problem when
compiled with the 2008 BSP compiler:
g++ version 4.2.3 (Sourcery G++ Lite 4.2-125)
I also tried upgrading to the latest CodeSourcery compiler:
gcc version 4.3.2 (Sourcery G++ Lite 4.3-43) - but I get the same crash
behaviour as the Lite-4.2-125 version.
The problem I am getting is my application starts up and runs, but then
it crashes as soon as it calls "new" to allocate a specific class. No
constructor code is executed before the crash. I have tried the
following to determine where the crash could be happening, but it
appears as though the breakage is in the code executed just prior to
calling the constructor (sorry I don't know the compiler terminology here):
* Tried logging first line inside the constructor - no logs are
executed, but crashes after the call to "new"
* Tried eliminating the body code of the constructor, no help
* Tried calling "new"/"delete" with sizeof(MyClass) just prior to the
real alloc and the test alloc/delete completes fine, but crashes upon
calling the alloc of "MyClass".
* Tried moving the alloc MyClass call to various other places in the
code, it crashes upon the first call every time.
Does anyone have any ideas what this could be and how I might go about
figuring this out?
Any help would be greatly appreciated,
Dave
More information about the coldfire-gnu-discuss
mailing list