Author vstinner
Recipients vstinner
Date 2008-07-07.13:24:28
SpamBayes Score 3.46799e-05
Marked as misclassified No
Message-id <1215437073.22.0.670628810168.issue3313@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2008-07-07 13:24:33vstinnersetspambayes_score: 3.46799e-05 -> 3.46799e-05
recipients: + vstinner
2008-07-07 13:24:33vstinnersetspambayes_score: 3.46799e-05 -> 3.46799e-05
messageid: <1215437073.22.0.670628810168.issue3313@psf.upfronthosting.co.za>
2008-07-07 13:24:31vstinnerlinkissue3313 messages
2008-07-07 13:24:30vstinnercreate