Date: Fri, 30 Dec 2011 21:00:33 GMT From: Russell Cattelan <cattelan@thebarn.com> To: freebsd-amd64@FreeBSD.org Subject: Re: amd64/163710: setjump in userboot.so causes stack corruption Message-ID: <201112302100.pBUL0Xxb040418@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR amd64/163710; it has been noted by GNATS. From: Russell Cattelan <cattelan@thebarn.com> To: Peter Wemm <peter@wemm.org> Cc: freebsd-gnats-submit@freebsd.org Subject: Re: amd64/163710: setjump in userboot.so causes stack corruption Date: Fri, 30 Dec 2011 14:24:49 -0600 On 12/30/11 1:33 AM, Peter Wemm wrote: > On Thu, Dec 29, 2011 at 7:16 PM, Russell Cattelan > <cattelan@digitalelves.com> wrote: > >>> Description: >> For some reason the forth interpreter is built and linked as 32bit even >> on amd64. > That's the catch. We use the same 32 bit loader on i386 and amd64. > The common loader understands both kernel formats. This unfortunately > has meant that the libstand and sys/boot environment has had to be 32 > bit. > Yes this is bit of an odd situation. the loader is linked 32bit but userboot.so / libstand is built 64bit but pulls in the 32bit ficl lib. The 64bit libstand provides the setjmp call that needs 96 bytes of space but since ficl is built with the 32bit jump_buf (48 byte ) structure things go sideways. I'm not sure the right overall fix is here. I figured I would file the bug and see if anybody more familiar with the loader/userboot build has any ideas. The patch I posted fixes the issue with the forth interpreter crashing when running under userboot.so, but yes it does break loader build. -Russell
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112302100.pBUL0Xxb040418>