Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Automated report: NetBSD-current/i386 test failure



Robert Elz wrote:
>   | The newly failing test case is:
>   |
>   |     sbin/gpt/t_gpt:migrate_disklabel
[...]
> That leaves mrg's gcc changes, and if gcc has started generating bad code for
> (the fairly simple source that is) fdisk (or for dd, which makes a filesys 
> image via a copy from /dev/zero), then I wonder how the system even 
> gets close to running, that would be truly bizarre.

Bizarre or not, comparing the generated code of validate_bootsel() in
fdisk.c between a working and a failing version, it's gone from 235 to
178 bytes in size.  It's a bit hard to follow, but it looks like the
whole "Check the menu strings are printable" loop has been optimized
away and effectively turned into "return 3".

The expression mbs->mbrbs_nametab[0][i] is accessing the second row of
a two-dimensional array by overstepping the first.  I suspect gcc may
be considering this to have undefined behavior and taking that as
license to optimize the whole thing away.

Anyway, this discussion should be moved into a PR.
-- 
Andreas Gustafsson, gson%gson.org@localhost


Home | Main Index | Thread Index | Old Index