Segmentation fault of Python if build on Solaris 9 or 10 with Sun Studio 11

I have filed a bug report "Building Python 2.4.3 on Solaris 9/10 with Sun Studio 11" 1496561 in the Python tracker. The problem I have encountered is, that some of the unit tests of the application roundup fail with Python producing a segmentation fault and dumping core, if Python was build with Sun Studio 11 (Sun C 5.8). In fact not only some of the unit tests fail, but also the application roundup at certain steps.
If gcc is used, everything works fine. As Richard Jones suggests, it might be a problem in the anydbm module. I would rather prefer to use the native compiler of a platform. To name only two reason, distributing the application is easier (dynamic library dependencies are most likely met on the target system) and Sun is maintaining the reference native libraries.
Help would be appreciated, thanks Andreas

On 5/30/06, Andreas Flöter Andreas.Floeter@web.de wrote:
I have filed a bug report "Building Python 2.4.3 on Solaris 9/10 with Sun Studio 11" 1496561 in the Python tracker. The problem I have encountered is, that some of the unit tests of the application roundup fail with Python producing a segmentation fault and dumping core, if Python was build with Sun Studio 11 (Sun C 5.8). In fact not only some of the unit tests fail, but also the application roundup at certain steps.
If gcc is used, everything works fine. As Richard Jones suggests, it might be a problem in the anydbm module. I would rather prefer to use the native compiler of a platform. To name only two reason, distributing the application is easier (dynamic library dependencies are most likely met on the target system) and Sun is maintaining the reference native libraries.
On the other hand, there is the fact that the binaries produced by the Sun compiler segfault... :-)

Zitat von Andreas Flöter Andreas.Floeter@web.de:
Help would be appreciated
This strictly doesn't belong to python-dev: this is the list where you say "I want to help", not so much "I need your help".
If you want to resolve this yourself, we can guide you through that. I would start running the binary in a debugger to find out where it crashes. Maybe the bug in Python is easy to see from that. But then, maybe the bug is in the compiler, and not in Python...
Regards, Martin

2006/5/31, martin@v.loewis.de martin@v.loewis.de:
This strictly doesn't belong to python-dev: this is the list where you say "I want to help", not so much "I need your help".
QOTW!
I love it!

[MvL, to Andreas Flöter]
This strictly doesn't belong to python-dev: this is the list where you say "I want to help", not so much "I need your help".
LOL! How true.
If you want to resolve this yourself, we can guide you through that. I would start running the binary in a debugger to find out where it crashes. Maybe the bug in Python is easy to see from that. But then, maybe the bug is in the compiler, and not in Python...
The first or second thing to try is to recompile Python with C optimization disabled, and especially in this case where compiling with gcc instead works fine (that certainly _suggests_ "C compiler optimization bug").
participants (5)
-
Andreas Flöter
-
Facundo Batista
-
Guido van Rossum
-
martin@v.loewis.de
-
Tim Peters