From owner-freebsd-hackers Thu Jan 25 15:48:24 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA18515 for hackers-outgoing; Thu, 25 Jan 1996 15:48:24 -0800 (PST) Received: from ki.net (root@ki.net [142.77.249.8]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id PAA18506 for ; Thu, 25 Jan 1996 15:48:17 -0800 (PST) Received: (from scrappy@localhost) by ki.net (8.7.3/8.7.3) id SAA14790; Thu, 25 Jan 1996 18:48:18 -0500 (EST) Date: Thu, 25 Jan 1996 18:48:15 -0500 (EST) From: "Marc G. Fournier" To: hackers@freebsd.org Subject: Program getting signal 11 for no obvious reason Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org Precedence: bulk Hi... I'm trying to figure out why I'm getting a SIGSEG on a cgi-bin I just wrote, have gotten to the point where I'm blind to possible problems, so figured I'd ask here and see if anyone can point out what is wrong. I've spent the whole day going through the code one statement at a time, putting in an 'exit(0)' in one place, testing, and then advancing it to the next step, over and over again. I worked it down so that if I put an exit(0) call as the statement right before the "return 0;" and I get no error. If I take the exit(0); out of that function and put it right after the call to the function in the calling function, I get the SIGSEV when I run. The call to the function from the main program is the last thing that happens in the program, the function returns an int, but I'm not currently checking the return value. Now, two points. The function that I'm calling works, and completes properly (the function takes a list, converts it to an insert statement for an SQL database, and writes the record to the database properly). And, the exact same function works in a non-cgi (command line) program. As such, I'm at a complete loss for where to look next to find the bug. Can anyone give me a clue as to where i should look? Thanks... Marc G. Fournier | POP Mail Telnet Acct DNS Hosting System | WWW Services Database Services | Knowledge, Administrator | | Information and scrappy@ki.net | WWW: http://www.ki.net | Communications, Inc