SIGSEGV in socket ( ) - 10/11/2007, 16:25I lost nearly two hours finding what caused this one..
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x8063000 (LWP 100187)]
0x08059a20 in socket ()
Cause: global variable named 'socket'. glibc or something else has a function named 'socket( )'. The program gets confused somehow.
Solution: rename 'socket' to something else. And STOP using global variables altogether!
Note: This seems to be fixed in recent gnu/linux distros, but it still exists in FreeBSD 6..
(By the way, my program had absolutely nothing to do with MySQL.)
< Back to blog