I develop python extension modules for Trilinos, a large scientific
computing project:
http://trilinos.sandia.gov
Unit testing my extension modules under Mac OS X, I came across the
following error messages after upgrading from gcc 4.0 to basically any
higher version:
python(65587) malloc: *** error for object 0x1715674: Non-aligned
pointer being freed
Debugging the problem (which occurs for me in several places in several
test scripts), the error was always being raised in the built-in C++
method
ostream::operator<<(int)
which indicated to me that the problem was really probably somewhere
else, and just being triggered in the ostream operator.
Trying to isolate the problem in a smaller script, I was unable to
reproduce the error until I added
import optparse
By the same token, I was able to eliminate the problem in my test
scripts by getting rid of "import optparse". I have changed these
scripts now to use getopt, and they are running without error, but I
thought I would report this strange behavior.
I realize after all of this that the problem might not actually be with
optparse, but it sure seems like a likely culprit. I would be happy to
work with someone to try to reproduce the error, and then hopefully
such a python expert would be able to find the actual issue.
|