Date: Fri, 09 Apr 2004 19:36:28 -0500 From: "James R. Van Artsalen" <james@jrv.org> To: Peter Wemm <peter@wemm.org> Cc: freebsd-amd64@freebsd.org Subject: Re: malloc: bug or feature ? Message-ID: <4077418C.2080506@jrv.org> In-Reply-To: <200404090746.09741.peter@wemm.org> References: <4073F699.6010402@cri.ensmp.fr> <407539A6.4090701@jrv.org> <40765F44.9070705@jrv.org> <200404090746.09741.peter@wemm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote: >>I haven't checked for equivalent bugs in other functions. >> >> > >OK, this is embarresing :-) Thanks! > > No, embarrassing is when you make the lead story on the front page of PC Week... :-) In lib/libc/amd64/gen/sigsetjmp.S, a call to _sigprocmask is made by __siglongjmp with a misaligned stack. In libexec/rtld-elf/amd64/rtld_start.S procedure .rtld_start has me unsure: in 5.2.1-release this routine seems to end in a "jmp *%eax" with same %rsp as on entry. But in version 1.5 in the CVS repository that "jmp *%eax" is reached with 16 extra bytes on the stack. Is it possible that the "addq $8,%rsp" from 5.2.1-release should have been changed to "addq $16,%rsp" instead of deleted? It's not clear to me what happens at the "call *%rbx" in lib/libc/amd64/gen/rfork_thread.S. I guess the kernel created a stack and passed tos-4 is %rsi? Probably no bug, but deserves a comment as to what userland is relying on. There are a number of files under sys/ for things like interrupt vectors, etc. I haven't looked at these since I don't know if the kernel stack is aligned, or where the input stacks come from.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4077418C.2080506>