Summary: | sys-apps/dbus-broker: test failures with -fno-semantic-interposition (aliasing issue?) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | Mike Gilbert <floppym> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arsen |
Priority: | Normal | Keywords: | TESTFAILURE |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/c-util/c-utf8/issues/4 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 915000 | ||
Attachments: |
build.log
testlog.txt |
Description
Sam James
2023-12-03 04:36:23 UTC
Created attachment 876504 [details]
testlog.txt
This happens w/ gcc-13 + -O2 as well, it just needs -fno-semantic-interposition. It stops happening with -fno-strict-aliasing. I applied this for now: commit ac0bc46eaa27105ea7ca3d854ecaeaa3b99e9880 Author: Sam James <sam@gentoo.org> Date: Sun Dec 3 00:20:00 2023 +0000 sys-apps/dbus-broker: filter -fno-semantic-interposition Causes test failures. (Not going to revbump as this isn't anything new and anyone who hits it would notice immediately.) Signed-off-by: Sam James <sam@gentoo.org> Just filed the bug here so I remember to come back to it and dig in more. The issue is in the libcdvar subproject (https://github.com/c-util/c-dvar). I can reproduce it w/ this from a libcdvar clone: CFLAGS="-Og -ggdb3 -fno-semantic-interposition" meson setup build --wipe ; meson test -C build sorry, you need -O2, not -Og. test-basic: ../src/test-basic.c:81: test_basic_serialization: Assertion `false && "!strcmp(str1, \"foo\")"' failed. Program received signal SIGABRT, Aborted. 0x00007ffff7e4d21c in ?? () from /usr/lib64/libc.so.6 (gdb) frame 5 #5 0x000055555555621e in test_basic_serialization (big_endian=big_endian@entry=true) at ../src/test-basic.c:81 81 c_assert(!strcmp(str1, "foo")); (gdb) p str1 $1 = 0x55555555a0b9 "" (gdb) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9541f03613b3824f83a26dd1f0654f1e031a6050 commit 9541f03613b3824f83a26dd1f0654f1e031a6050 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-12-03 04:43:58 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-12-03 04:45:00 +0000 sys-apps/dbus-broker: filter-lto & -fno-strict-aliasing Initially hit a test failure w/ -fno-semantic-interposition and hadn't yet had a chance to dig in more, but it looks like it's really an aliasing issue exposed by it (dbus-broker doesn't rely on LD_PRELOAD at all). So, follow up to ac0bc46eaa27105ea7ca3d854ecaeaa3b99e9880, filter-lto and pass -fno-strict-aliasing with a new revision as this may well break in other cases even w/o -fno-semantic-interposition. Bug: https://bugs.gentoo.org/919100 Signed-off-by: Sam James <sam@gentoo.org> .../dbus-broker/{dbus-broker-33.ebuild => dbus-broker-33-r1.ebuild} | 5 +++-- sys-apps/dbus-broker/dbus-broker-9999.ebuild | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) I figured I'd try -Werror=strict-aliasing -Wstrict-aliasing=2 on a punt first before spending more time on it. I'm glad I did, because it wasn't in the serialisation code like I expected, but a submodule of it. Long story short: https://github.com/c-util/c-utf8/commit/4b7cb9f940e45d3c68bf427cdeeaf5da47b03b41. I'll pull that in now. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=345f98126f9d9d6abbd7fa89868f2c4edfed6001 commit 345f98126f9d9d6abbd7fa89868f2c4edfed6001 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-12-03 09:00:42 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-12-03 09:02:04 +0000 sys-apps/dbus-broker: backport strict aliasing fix Closes: https://bugs.gentoo.org/919100 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/dbus-broker/dbus-broker-33-r2.ebuild | 65 +++++++ sys-apps/dbus-broker/dbus-broker-9999.ebuild | 10 +- .../files/dbus-broker-33-strict-aliasing.patch | 207 +++++++++++++++++++++ 3 files changed, 277 insertions(+), 5 deletions(-) |