This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: interpreter crash when import .so fails w/ Purify
Type: Stage:
Components: Interpreter Core Versions: Python 2.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, loewis, nnorwitz
Priority: low Keywords:

Created on 2001-10-19 03:42 by nnorwitz, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
stack-trace nnorwitz, 2001-10-19 03:42 stack trace & patch
Messages (4)
msg7042 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2001-10-19 03:42
The python interpreter crashes when import _socket
fails (.so).
This only happens when running purify (on solaris 2.8).
The problem is that dlerror() returns NULL, which is
then
passed to strlen().

Attached is a file with the stack trace which caused
the problem,
and a patch to fix the problem.

Neal
msg7043 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2001-10-19 06:33
Logged In: YES 
user_id=21627

I find it surprising that dlerror returns NULL. According 
to dlerror(3DL), it will only return NULL if there was no 
error since the last call to dlerror. Since handle is 
NULL, there certainly was an error very recently (in the 
dlopen), and I cannot see any dlerror call in-between.

In any case, your patch seems to be wrong: the bug is that 
dlerror returns NULL when it shouldn't. If we really need 
to work around this bug (which I'm not convinced that we 
should), then the work-around is to pass a non-null 
constant string to PyErr_SetString if dlerror returned 
null.
msg7044 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-10-19 13:49
Logged In: YES 
user_id=6380

Note that Neal mentions Purify as a condition. I've added
that to the subject. Could Purify somehow be screwing
dlerror()? Not much we can do about that...

On the one hand it seems wrong that PyErr_SetString() should
be patched; on the other hand there's nothing wrong with
making that function a bit more robust. I give the patch a
+0.
msg7045 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-12-12 05:32
Logged In: YES 
user_id=6380

Closing as "won't fix". Nobody seems to care.
History
Date User Action Args
2022-04-10 16:04:32adminsetgithub: 35353
2001-10-19 03:42:09nnorwitzcreate