Skip to contentSkip to conversation

Shared library interceptor/SIGSEGV

DISCUSSION Julien Laganier 1 participant 1 message Jul 9, 2001

lore
Share & tools
lore
#0 lore raw

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