Date: Sat, 07 Jul 2001 23:20:26 -0500 From: Gabor Kincses <gabor@nameprotect.com> To: obrien@FreeBSD.org Cc: ports@FreeBSD.org Subject: Multi-threaded ElectricFence Message-ID: <3B47DF8A.759C6338@nameprotect.com>
next in thread | raw e-mail | index | archive | help
Hello, It seems -DUSE_SEMAPHORE forces Efence into a stack overrun, because the FreeBSD (pthread) sem_init() implementation uses malloc(). Efence's malloc() replaces the standard malloc(), which calls initialize(). Since initialize() calls sem_init() when -DUSE_SEMAPHORE is on, we have a nice tight stack overrun. I have been trying to remove the malloc() dependency (at any cost) from initialize(), by not calling sem_init() until main() creates some other threads. Oh, yeah, all of the above happens before main() comes into the picture. Any ideas? -- Gabor Kincses Running FreeBSD 4.3-RC3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B47DF8A.759C6338>