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.
Created on 2008年07月07日 13:24 by vstinner, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| dl_open.patch | vstinner, 2008年07月07日 13:24 | Patch to fix dl_open() | ||
| ctypes_dlopen.patch | vstinner, 2008年07月08日 13:45 | Patch to fix _ctypes.dlopen() | ||
| Messages (4) | |||
|---|---|---|---|
| msg69388 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2008年07月07日 13:24 | |
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().
|
|||
| msg69432 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2008年07月08日 13:45 | |
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). |
|||
| msg69703 - (view) | Author: Thomas Heller (theller) * (Python committer) | Date: 2008年07月15日 18:35 | |
I can confirm the problem on ubuntu linux. |
|||
| msg69713 - (view) | Author: Thomas Heller (theller) * (Python committer) | Date: 2008年07月15日 19:50 | |
Thanks for the patch, fixed in trunk rev 64977 and py3k rev 64978. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:36 | admin | set | github: 47563 |
| 2008年07月15日 19:50:14 | theller | set | status: open -> closed resolution: fixed messages: + msg69713 |
| 2008年07月15日 18:35:11 | theller | set | assignee: theller messages: + msg69703 nosy: + theller |
| 2008年07月08日 13:45:57 | vstinner | set | files:
+ ctypes_dlopen.patch messages: + msg69432 |
| 2008年07月07日 13:24:31 | vstinner | create | |