[issue3313] dlopen() error with no error message from dlerror()

2008-07-15 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

I can confirm the problem on ubuntu linux.

--
assignee:  - theller
nosy: +theller

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3313
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3313] dlopen() error with no error message from dlerror()

2008-07-08 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

As expected, the bug can be reproduced with ctypes.dlopen(). 
py_dl_open() function of Modules/_ctypes/callproc.c should be merged 
with Modules/dlmodule.c.

Here use at least the attached patch for ctypes (same job than the 
other patch: use default string if dlerror() returns NULL).

Added file: http://bugs.python.org/file10858/ctypes_dlopen.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3313
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3313] dlopen() error with no error message from dlerror()

2008-07-07 Thread STINNER Victor

New submission from STINNER Victor [EMAIL PROTECTED]:

Python dl_open() function (from dl module) calls dlopen() and check 
its result: if it's NULL, it's an error. This is correct if I read the 
man page. But with an invalid flag value (-1), dlopen() returns NULL 
but dlerror() also gives a NULL pointer. Example:

 import dl
 dl.open(/usr/lib/libm.so, -1)
Erreur de segmentation (core dumped)

Workaround: use a static error message if dlerror() returns NULL.

I wrote a patch for dl_open() but other functions (in ctypes module?) 
should also call dlerror().

--
components: Library (Lib)
files: dl_open.patch
keywords: patch
messages: 69388
nosy: haypo
severity: normal
status: open
title: dlopen() error with no error message from dlerror()
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file10842/dl_open.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3313
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com