Date: Sun, 15 May 2022 11:31:39 -0600 From: Warner Losh <imp@bsdimp.com> To: Paul Floyd <paulf2718@gmail.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Changes to stat ABI Message-ID: <CANCZdfpshqwM_XvE6BUDhi48gwe2475PZG_9ZxGT2yu_611=RQ@mail.gmail.com> In-Reply-To: <CANCZdfqtS5_bzj-4Q0ERJ=qar==NWURke5O6STkhyVHepD5krg@mail.gmail.com> References: <cd9ef009-47aa-acc7-509e-7afca9b24a84@gmail.com> <CANCZdfqtS5_bzj-4Q0ERJ=qar==NWURke5O6STkhyVHepD5krg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000618e7505df104873 Content-Type: text/plain; charset="UTF-8" Scratch that, this is a clang 11 vs clang13 issue. Most likely clang 13 is more aggressively optimizing, so fstat is not actually on the stack... Because of LTO, you'll need to check the disassembled binary to know for sure. Warner On Sun, May 15, 2022 at 11:30 AM Warner Losh <imp@bsdimp.com> wrote: > ino64 has gone into the tree. The stat structure layout > changed. 69921123490b99c2588b0c743bc4af32bbe6601c went into the tree a > while ago, but maybe recently enough to mess this up. > > Author: Konstantin Belousov <kib@FreeBSD.org> > Date: Tue May 23 09:29:05 2017 +0000 > > Commit the 64-bit inode project. > > Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify > struct dirent layout to add d_off, increase the size of d_fileno > to 64-bits, increase the size of d_namlen to 16-bits, and change > the required alignment. Increase struct statfs f_mntfromname[] and > f_mntonname[] array length MNAMELEN to 1024. > > On Sat, May 14, 2022 at 2:10 PM Paul Floyd <paulf2718@gmail.com> wrote: > >> Hi >> >> >> Has anything changed in the way that the libc functions in the stat >> family are compiled on FreeBSD 13.1 amd64 with clang 13? >> >> >> I'm getting a few Valgrind regression test failures related to this: >> >> FreeBSD 13 / clang 11 >> >> ==84746== Syscall param fstatat(flag) contains uninitialised byte(s) >> ==84746== at 0x49942EA: ??? (in /lib/libc.so.7) >> ==84746== by 0x499018B: fstatat (in /lib/libc.so.7) >> ==84746== by 0x201E7D: main (stat.c:67) >> >> FreeBSD 13.1 / clang 13 >> >> ==57383== Syscall param fstatat(flag) contains uninitialised byte(s) >> ==57383== at 0x499239A: ??? (in /lib/libc.so.7) >> ==57383== by 0x201E57: main (stat.c:67) >> >> A+ >> >> Paul >> >> >> >> --000000000000618e7505df104873 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Scratch that, this is a clang 11 vs clang13 issue.<div><br= ></div><div>Most likely clang 13 is more aggressively=C2=A0optimizing, so f= stat is not actually on the stack... Because</div><div>of LTO, you'll n= eed to check the disassembled binary to know for sure.</div><div><br></div>= <div>Warner</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas= s=3D"gmail_attr">On Sun, May 15, 2022 at 11:30 AM Warner Losh <<a href= =3D"mailto:imp@bsdimp.com">imp@bsdimp.com</a>> wrote:<br></div><blockquo= te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px = solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">ino64 has gone in= to the tree. The stat structure layout changed.=C2=A069921123490b99c2588b0c= 743bc4af32bbe6601c went into the tree a while ago, but maybe recently enoug= h to mess this up.<div><br></div><div>Author: Konstantin Belousov <kib@F= reeBSD.org><br>Date: =C2=A0 Tue May 23 09:29:05 2017 +0000<br><br>=C2=A0= =C2=A0 Commit the 64-bit inode project.<br><br>=C2=A0 =C2=A0 Extend the in= o_t, dev_t, nlink_t types to 64-bit ints.=C2=A0 Modify<br>=C2=A0 =C2=A0 str= uct dirent layout to add d_off, increase the size of d_fileno<br>=C2=A0 =C2= =A0 to 64-bits, increase the size of d_namlen to 16-bits, and change<br>=C2= =A0 =C2=A0 the required alignment.=C2=A0 Increase struct statfs f_mntfromna= me[] and<br>=C2=A0 =C2=A0 f_mntonname[] array length MNAMELEN to 1024.<br><= /div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_a= ttr">On Sat, May 14, 2022 at 2:10 PM Paul Floyd <<a href=3D"mailto:paulf= 2718@gmail.com" target=3D"_blank">paulf2718@gmail.com</a>> wrote:<br></d= iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord= er-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br> <br> <br> Has anything changed in the way that the libc functions in the stat <br> family are compiled on FreeBSD 13.1 amd64 with clang 13?<br> <br> <br> I'm getting a few Valgrind regression test failures related to this:<br= > <br> FreeBSD 13 / clang 11<br> <br> =3D=3D84746=3D=3D Syscall param fstatat(flag) contains uninitialised byte(s= )<br> =3D=3D84746=3D=3D=C2=A0=C2=A0=C2=A0 at 0x49942EA: ??? (in /lib/libc.so.7)<b= r> =3D=3D84746=3D=3D=C2=A0=C2=A0=C2=A0 by 0x499018B: fstatat (in /lib/libc.so.= 7)<br> =3D=3D84746=3D=3D=C2=A0=C2=A0=C2=A0 by 0x201E7D: main (stat.c:67)<br> <br> FreeBSD 13.1 / clang 13<br> <br> =3D=3D57383=3D=3D Syscall param fstatat(flag) contains uninitialised byte(s= )<br> =3D=3D57383=3D=3D=C2=A0=C2=A0=C2=A0 at 0x499239A: ??? (in /lib/libc.so.7)<b= r> =3D=3D57383=3D=3D=C2=A0=C2=A0=C2=A0 by 0x201E57: main (stat.c:67)<br> <br> A+<br> <br> Paul<br> <br> <br> <br> </blockquote></div> </blockquote></div> --000000000000618e7505df104873--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpshqwM_XvE6BUDhi48gwe2475PZG_9ZxGT2yu_611=RQ>