Date: Tue, 18 Mar 2003 15:49:03 -0500 (EST) From: Daniel Eischen <eischen@pcnet1.pcnet.com> To: Jens Schweikhardt <schweikh@schweikhardt.net> Cc: stable@FreeBSD.ORG Subject: Re: stack overflow detection broken Message-ID: <Pine.GSO.4.10.10303181544290.16384-100000@pcnet1.pcnet.com> In-Reply-To: <20030318202452.GA2886@schweikhardt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Mar 2003, Jens Schweikhardt wrote: > hello, world\n > > the port lang/ocaml does not configure anymore on 4.8-STABLE/RC (It > configures fine on 4.7-RELEASE, however, so this is why I think we may > have a regression; see also > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/45233). > > During configuration it runs the test C program stackov.c appended > below. Compile with > > $ cc -o tst -DTARGET_i386 -DSYS_bsd_elf stackov.c -pthread > > and run with > > $ ./tst > > This program never terminates, hogs the CPU, and is unkillable with > TERM, INT, HUP or QUIT. kill -KILL will terminate it of course. If one > drops the -pthread the program runs to completion without any obvious > problems. My question is: > > Is stackov.c doing something nasty that can not be expected to work > or is FreeBSD doing something wrong when the pthreads are used? The threads library maps thread stacks on top of the main thread's stack. This is not configurable. The main thread's stack is of fixed size (forgot what it is, 64MB sounds familiar) with a guard page above that. Thread stacks get mapped above that, also each one with a guard page. The thread's library does not allow for adjusting stack limits. Work around would be to avoid this test when configuring ocaml. -- Dan Eischen 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?Pine.GSO.4.10.10303181544290.16384-100000>