Hello (debian-mipsel and ngircd upstream),[...]> The previous upload of ngircd 24-1 back in January was built using
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.
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?
On 22/08/17 17:51, Christoph Biedl wrote:
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.
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).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 405 |
Nodes: | 16 (2 / 14) |
Uptime: | 92:35:43 |
Calls: | 8,516 |
Calls today: | 6 |
Files: | 13,209 |
Messages: | 5,920,966 |