Date: Tue, 16 Oct 2001 09:46:10 -0700 (PDT) From: David Marker <marker_d@yahoo.com> To: freebsd-stable@freebsd.org Subject: Re: SIGSEGV not blocked in gdm [was Re: setenv() cores with NULL value] Message-ID: <20011016164610.95419.qmail@web14702.mail.yahoo.com> In-Reply-To: <Pine.LNX.4.33.0110151727300.6035-100000@organ.cs.byu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Well, I didn't mean to start a discussion about NULL pointers. I believe setenv() should core in the test program sent in by Heath Nielson. The interesting thing about gdm is that it does _not_ core dump. Furthermore, I can't find it ever blocking SIGSEGV in its source. Which is why I referenced this post (there is a whole thread): http://www.freebsd.org/cgi/getmsg.cgi?fetch=158037+0+/usr/local/www/db/text/2001/freebsd-stable/20010114.freebsd-stable Before reading that I was not aware you could block a SIGSEGV. But gdm doesn't even appear to block that signal. (grep for sigation, then SIGSEGV, didn't find anything to suggest it blocks SIGSEGV.) So my question is why does Mr. Nielson's program dump core and gdm does not? -dave > While I don't know if gdm should be setting a NULL > value or not, I ran this simple program: > > #include <stdlib.h> > #include <stdio.h> > > int main(int argc, char* argv[]) > { > char* name = "TEST"; > char* value = NULL; > int ret; > > printf("value: %s\n", value); > ret = setenv(name, value, 1); > printf("ret: %d\n", ret); > return 0; > } > > On FreeBSD I get: > hershey:~$ ./a.out > value: (null) > Segmentation fault (core dumped) > > On Linux: > catskill 23: ./a.out > value: (null) > ret: 0 __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011016164610.95419.qmail>