|
From: | Richard Henderson |
Subject: | Re: [PATCH v4 00/10] linux-user: Detect and report host crashes |
Date: | Tue, 19 Sep 2023 10:29:43 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 9/18/23 16:05, Helge Deller wrote:
On 9/12/23 12:34, Michael Tokarev wrote:12.09.2023 12:45, Helge Deller:/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/13/../../../../lib64/libc.a(abort.o): in function `abort': (.text.unlikely+0x0): multiple definition of `abort'; libqemu-aarch64-linux-user.fa.p/linux-user_signal.c.o:/srv/_build/../../home/cvs/qemu/qemu/linux-user/signal.c:723: first defined here[PATCH v4 03/10] linux-user: Use die_with_signal with abort Sigh. I'd be double-cautious when overriding system functions like this, - it's almost always a bad idea.Richard, I'm not sure, but with that change: -void abort(void) +void __attribute__((weak)) abort(void) it will at least successfully link the binary. Not sure which effects it has, but probably not worse than before your patch series...
This won't work, in that it will have no effect, and we continue to have the weird longjmp assertion message after stack corruption.
Probably we will have to replace all of the apis that can raise abort at the source level, e.g.
void qemu_abort(void) __attribute__((noreturn)); void qemu_abort_msg(const char *) __attribute__((noreturn)); #undef abort #define abort qemu_abort #undef assert #define assert(X) ... #undef g_assert #define g_assert(X) assert(X) etc. r~
[Prev in Thread] | Current Thread | [Next in Thread] |