[Bug 1689344] Re: print of __glib_assert_msg not returning a message
Benjamin Drung
1689344 at bugs.launchpad.net
Thu Feb 20 22:06:01 UTC 2025
Tested on Ubuntu 24.04 (noble):
```
$ printf "#include <glib.h>\nint main() { g_assert_cmpint(1, <, 0); }\n" > test.c
$ gcc -Wall -o test test.c $(pkg-config --cflags --libs glib-2.0)
$ gdb --args ./test
(gdb) run
Starting program: ./test
Warnung: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libglib-2.0.so.0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
**
ERROR:test.c:2:main: assertion failed (1 < 0): (1 < 0)
Bail out! ERROR:test.c:2:main: assertion failed (1 < 0): (1 < 0)
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
Warnung: 44 ./nptl/pthread_kill.c: Datei oder Verzeichnis nicht gefunden
(gdb) print __glib_assert_msg
'__glib_assert_msg' has unknown type; cast it to its declared type
(gdb) print (char*) __glib_assert_msg
$1 = 0x55555555d960 "ERROR:test.c:2:main: assertion failed (1 < 0): (1 < 0)"
```
So it has been fixed since then.
** Changed in: glib2.0 (Ubuntu)
Status: New => Fix Released
** Changed in: glib2.0 (Ubuntu Yakkety)
Status: New => Won't Fix
** Changed in: glib2.0 (Ubuntu Zesty)
Status: New => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glib2.0 in Ubuntu.
https://bugs.launchpad.net/bugs/1689344
Title:
print of __glib_assert_msg not returning a message
Status in apport package in Ubuntu:
Fix Released
Status in glib2.0 package in Ubuntu:
Fix Released
Status in apport source package in Yakkety:
Fix Released
Status in glib2.0 source package in Yakkety:
Won't Fix
Status in apport source package in Zesty:
Fix Released
Status in glib2.0 source package in Zesty:
Won't Fix
Bug description:
[Impact]
apport's test, test_add_gdb_info_abort_glib is failing due to a change somewhere in glib2.0, how its built, or gdb. The test shall be disabled while the matter is investigated.
[Test Case]
Run the autopkgtest and observe the failure.
With the version of the package in proposed the test will not be run.
[Regression Potential]
We are just disabling a broken test so there is none.
apport's test test_add_gdb_info_abort_glib has been failing for a bit,
since zesty(?), now. Digging into this matter I discovered that using
gdb to "print __glib_assert_msg" is resulting in different behavior.
With the generated binary, it used to return the following:
$2 = 0x7fadc0 "ERROR:<stdin>:2:main: assertion failed (1 < 0): (1 <
0)"
However, now I am seeing:
(gdb) print __glib_assert_msg
$1 = 1332592064
(gdb) print (char*) __glib_assert_msg
$2 = 0x4f6dbdc0 <error: Cannot access memory at address 0x4f6dbdc0>
This seems to be a regression in gdb itself, I've added an apport task
though to track the disabling of the autopkgtest which utilizes this
command.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1689344/+subscriptions
More information about the foundations-bugs
mailing list