Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jan 1996 18:48:15 -0500 (EST)
From:      "Marc G. Fournier" <scrappy@ki.net>
To:        hackers@freebsd.org
Subject:   Program getting signal 11 for no obvious reason
Message-ID:  <Pine.BSF.3.91.960125183807.14167A-100000@ki.net>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960125183807.14167A-100000>