Shared library interceptor/SIGSEGV
Hi folks,
I have written a library for intercepting outgoing network connections, and redirecting them through a proxy server.
The user had to set LD_PRELOAD to load my library, and my library redefine the connect() function for INET sockets. It also uses dlsym(RTLD_NEXT, "connect") to get the location of the 'real' libc connect.
The problem is : when I run some programs (like cat, which doesn't use connect), it causes a SIGSEGV, and strace doesn't help me more! It seems that the segmentation fault occurs after a 'certain' number of syscalls, but I can't figure why.
Does anybody know where could be the bug ?
Tnx.
--
Julien Laganier
Student Intern
Sun Microsystem Laboratories