Date: Sat, 21 Dec 2013 10:38:52 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Guy Yur <guyyur@gmail.com> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: 10.0-RC1: net/mpd5 crashes in NgMkSockNode due to stack alignment on ARM EABI Message-ID: <CAJ-Vmo=_naBJsm3HGzpD0y0EoVYwrccARHMyLO_XxPRhzi5tsw@mail.gmail.com> In-Reply-To: <CAC67Hz82VBT1_BBH6E18ycDxUdWbgFcahNo1W0kH-TcH7iB=8Q@mail.gmail.com> References: <CAC67Hz82VBT1_BBH6E18ycDxUdWbgFcahNo1W0kH-TcH7iB=8Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! Would you mind filing a PR with what you've put in the email? That way it is less likely to get lost. Thanks! -a On 21 December 2013 09:24, Guy Yur <guyyur@gmail.com> wrote: > Hi, > > I am running 10.0-RC1 on the BeagleBone Black and the net/mpd5 port is > crashing in libnetgraph NgMkSockNode due to stack alignment. > > 10.0-RC1 World and kernel were compiled in a VirtualBox VM running > 9.2-RELEASE-p2 i386. > clang and ARM_EABI used as the default make options. > > Added prints in NgMkSockNode show rbuf is aligned on 2-byte and not > 4-byte which is needed to access ni->id (a uint32_t). > > ni = 0xbfffe87a > rbuf = 0xbfffe842 > sizeof(resp->header) = 56 > > > (gdb) bt > #0 0x201529a0 in NgMkSockNode (name=<value optimized out>, csp=0xbfffe95c, > dsp=0xbfffe958) at /usr/src/lib/libnetgraph/sock.c:134 > #1 0x00037b9c in MppcTestCap () at ccp_mppc.c:754 > #2 0x0007c1f4 in main (ac=4, av=0xbfffeb90) at main.c:248 > #3 0x0000d1b0 in __start (argc=4, argv=0xbfffeb90, env=0xbfffeba4, > ps_strings=<value optimized out>, obj=<value optimized out>, > cleanup=<value optimized out>) at /usr/src/lib/csu/arm/crt1.c:115 > #4 0x203e9dc0 in _thr_ast (curthread=0x200fd000) > at /usr/src/lib/libthr/thread/thr_sig.c:265 > > > Putting rbuf in a union with struct ng_mesg sorted the alignment to > 4-byte and mpd5 didn't crash. > I attached the changes I used to test mpd5 doesn't crash with correct alignment. > > > Regards, > Guy > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=_naBJsm3HGzpD0y0EoVYwrccARHMyLO_XxPRhzi5tsw>