Re: ngircd test suite failure on mips64el

James Cowgill <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <[email protected]>
Hi,

On 22/08/17 17:51, Christoph Biedl wrote:
> Hello (debian-mipsel and ngircd upstream),
> 
> my latest upload of ngircd (24-2) a few days ago failed to build on
> mips64el, and on that architecture only. Checking the build log[0] and
> additional tests on the Debian porter box "eller" showed the cause is
> in the "test-mode" test of the test suite. More precisely, the
> 
> | send "mode #usermode +a nick\r"
> [ mode-test.e:57 ]
> 
> does not return a string containing "482", thus this test is considered
> failing, and so the entire build. Same for the "+q" test that follows
> once the above "+a" test is disabled.
[...]> The previous upload of ngircd 24-1 back in January was built using
> gcc-6 and showed no problems, also there are no changes between -1 and
> -2 that would even remotely explain this behaviour.
> 
> Ultimately, after rebuilding on mips64el using -O0 the test suite
> passes. Although it's usually premature to assume it: This smells like
> a compiler bug.
> 
> Could anyone shed some light on this? Or perhaps extract the relevant
> parts for a small reproducer?

This is very likely #871514 in gcc-7. Unfortunately it is affecting a
lot of packages in the archive at the moment causing incorrect code to
be generated.

The bug happens if a "small" variable is spilled to the stack. GCC may
emit a store of the smaller size to the stack, but then load it back as
a 64-bit integer. The top bits of the register will then contain some
garbage on the stack and cause comparisons like in your example to fail
(the bottom bits will be 0 but the top bits won't be).

Thanks,
James
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+Ixt5DaZ6POztUwQx/FnbeotAe8FAlmcaP4ACgkQx/Fnbeot
Ae+lWQ//TpUOGEyp5H8E0AOb/hGoV+V1lu32feulDb7uyxsRUR1Bh84IJUhsT7bY
yFvxhseAJJQIqZV9MQzcWoaq8U5rTB965qY0taTbhAyO+6nSj4yUxgnhWjY9k7mg
C36OpooLdmhMCxziYW7Udcgw74B5h1zBSY/N3kNSAXrVOAGG3Zrq8gZHQjRfLIDJ
7ZCtnQKV48L2l2UDCYFiTsHwqbkbQgleuNPalOC7BLX5ZnpzvIpmmkNpVSIYaOwT
f+3OXkg2490ipQ9CXK0M1h5xaTPed4CqAfogR5/s2REUbmxIa368GkD8KevbeVwv
fct90UjcvC/T/OLTBIytobjgSeDJrCgIsXbeJsH0nq9ljIRx4dhMMLDJfE1hjM3N
2sLV7M+TLR31GU62zYnQKJ7ryQq5SH3sZg7fmepaV4w6TABOISeLozbxIWkpT1JD
RxtC7MPcuOHDiA1HoJDE+Ar4HRnT5OInVCI+IdCTuT3wf6BAW5cHV3KGWnTimx4P
BGfNTkqnW7FJoVkcI6TZmajOQUGNyoLwA65b8hRvVtNKxPNDTJqFDYEnF96Kjh5u
kah8BrOEpusZ0a8MRuqONSi3nDSZ4DrAQBB3bdsL9kkTk57vMQJY8YE77SAetMXi
Lr7yv5rLR7HGz8o2Wpw2W597qjVp3pIZGxKy44e8+q80tK0sWko=
=giTu
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.