This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about wrappers and cleanup hooks


On Mon, 2005-02-28 at 15:52 +0200, Martin Schlemmer wrote:

> Basically if I wrap a function, the wrapped function's cleanup handler
> is not called (easy to demonstrate with the NPTL tst-cancelx4 test):
> 
> -----
>  # LD_PRELOAD=libopen-wrapper.so ./nptl/tst-cancelx4 | grep 'not called'
> cleanup handler not called for 'open'
> -----
> 
> Attached is above test case that can be compiled with:
> 
> -----
> gcc -nostdlib -shared -fPIC -o libopen-wrapper.so open-wrapper.c -ldl
> -----
> 

Ok, just compiling with -fexceptions solves it.

Another question though - if you preload a library for an executable
linked to libpthread, does glibc internally allocate a key?  Why I am
asking, is because nptl/tst-key1 fails on the very last key it should
create ...  I did try to look for __pthread_keys or pthread_key_create,
but do not seem to find anything outside of the thread lib dirs.


Thanks,

-- 
Martin Schlemmer

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]