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 related code is in irc-mode.c:723:
case 'q': /* Owner */
case 'a': /* Channel admin */
if(!is_oper && !is_machine && !is_owner && !is_admin) {
connected = IRC_WriteErrClient(Origin,
ERR_CHANOPPRIVTOOLOW_MSG,
Client_ID(Origin),
Channel_Name(Channel));
goto chan_exit;
}
where ERR_CHANOPPRIVTOOLOW_MSG contains the expected "482" string
constant.
After adding debug print statements:
case 'a': /* Channel admin */
+Log(LOG_ALERT, "is_oper = %d", is_oper);
+Log(LOG_ALERT, "is_machine = %d", is_machine);
+Log(LOG_ALERT, "is_owner = %d", is_owner);
+Log(LOG_ALERT, "is_admin = %d", is_admin);
if(!is_oper && !is_machine && !is_owner && !is_admin) {
and running the test manually, i.e.
cd src/testsuite
strace -s 2048 -f -tt -o ~/strace.log sh -c './start-server1 ; ./mode-test ; ./stop-server1'
I find for both architectures the same value set (all zero). The strace
log, trimmed for readability
[amd64]
read(7, "mode #usermode +a nick\r\n", 2048) = 24
write(1, "[599904:1 7] is_oper = 0\n", 28) = 28
write(1, "[599904:1 7] is_machine = 0\n", 31) = 31
write(1, "[599904:1 7] is_owner = 0\n", 29) = 29
write(1, "[599904:1 7] is_admin = 0\n", 29) = 29
write(7, ":ngircd.test.server 482 nick #usermode :Your privileges are too low\r\n", 69 <unfinished ...>
[mips64el]
read(7, "mode #usermode +a nick\r\n", 2048) = 24
write(1, "[23415:1 8] is_oper = 0\n", 27) = 27
write(1, "[23415:1 8] is_machine = 0\n", 30) = 30
write(1, "[23415:1 8] is_owner = 0\n", 28) = 28
write(1, "[23415:1 8] is_admin = 0\n", 28) = 28
write(7, ":
[email protected] MODE #usermode +a nick\r\n", 46) = 46
strongly suggests the code on mips64el does *not* follow the if()
statement although all preconditions are met.
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?
Christoph
[0]
https://buildd.debian.org/status/fetch.php?pkg=ngircd&arch=mips64el&ver=24-2&stamp=1503078437&raw=0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCgAGBQJZnGEqAAoJEMQsWOtZFJL9GT8P/iH1NcXr5z7OOjeiabBA3cn6 bEHE0PNT8id5j4BW/MsQmcrZaJJ326DKXnA6C4U/OMddNJfVn/eLS7Zp20yRL3GO XU6+O8bllUpxe9EM1RkAe4b6IX/my5ZjN+x1v/yyX1XEQPEY9WayVkDWUiqjKR9N O7UmRej+bQxj/JD+k6iCmmyoxvvsV7jRvxu6tz14FHx1kg6bd9+KZhCl17fujQlt OGGu0OMsPQS5zVZkw05bYRsHUCgrcatqMZVKo9aJdVwJWTos4zD74iYkihRrKQ/e veucs7ABxzM/6HC2T9FLI4B5G3eghy92gDm5XaBNqF1pa2fypQu/oXnWisVSkG44 qIlh3ZQ8y6WaQ37Izd5Tgce437juME7VSo8olaLtGZBoTKaT+o2sO8jix5hpVCna xy0wuvZGZdltnOEbH1brh4qfJ446xauOFGBDdrOUdeCU6+kpT+XHHNdHpyrjne+h HU4X59SIK48aGFndwzDVU0eKHBJTreKCbhLzqhSyvewIBkMuzV2Zi0AjancAowlh Pk7hl2ipY3g5mnY10PaHH38bAyYZyoWcOPsptUfyBZBrRbY2onwKB4mwv3VKEusD ZBTlH16csd4eGzkvaCZLdkZu1+iJvzAovQ8pwP9AnCPpgCmN0V/+noYL7ntGmopc LVgLnxyt5nLFNli7IAib
=2J3Y
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)