From: Alexander Lakhin <exclusion@gmail.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: ubsan
Date: Wed, 27 Sep 2023 14:00:00 +0300
Message-ID: <dbf77bf7-6e54-ed8a-c4ae-d196eeb664ce@gmail.com> (raw)
In-Reply-To: <20221121231503.rb7yim6xlfrs3wu2@alap3.anarazel.de>
References: <20220323173537.ll7klrglnp4gn2um@alap3.anarazel.de>
<2771659.1648058090@sss.pgh.pa.us>
<20220930011755.dg7am3kjzebpxxne@awork3.anarazel.de>
<20221121231503.rb7yim6xlfrs3wu2@alap3.anarazel.de>
Hello Andres,
22.11.2022 02:15, Andres Freund wrote:
> Hi,
>
> On 2022-09-29 18:17:55 -0700, Andres Freund wrote:
>> Attached is a rebased version of this patch. Hopefully with a reasonable
>> amount of comments? I kind of wanted to add a comment to reached_main, but it
>> just seems to end up restating the variable name...
> I've now pushed a version of this with a few cleanups, mostly in
> .cirrus.yml. It'll be interesting to see how many additional problems
> it finds via cfbot.
I've just discovered that that function __ubsan_default_options() is
incompatible with -fsanitize=hwaddress:
$ tmp_install/usr/local/pgsql/bin/postgres
Segmentation fault
Program received signal SIGSEGV, Segmentation fault.
0x000000555639e3ec in __hwasan_check_x0_0 ()
(gdb) bt
#0 0x000000555639e3ec in __hwasan_check_x0_0 ()
#1 0x000000555697b5a8 in __ubsan_default_options () at main.c:446
#2 0x0000005556367e48 in InitializeFlags ()
at /home/builder/.termux-build/libllvm/src/compiler-rt/lib/hwasan/hwasan.cpp:133
#3 __hwasan_init () at /home/builder/.termux-build/libllvm/src/compiler-rt/lib/hwasan/hwasan.cpp:351
#4 0x0000007ff7f4929c in __dl__ZL13call_functionPKcPFviPPcS2_ES0_ () from /system/bin/linker64
#5 0x0000007ff7f4900c in __dl__ZL10call_arrayIPFviPPcS1_EEvPKcPT_mbS5_ () from /system/bin/linker64
#6 0x0000007ff7f45670 in __dl__ZL29__linker_init_post_relocationR19KernelArgumentBlockR6soinfo ()
from /system/bin/linker64
#7 0x0000007ff7f449c8 in __dl___linker_init () from /system/bin/linker64
#8 0x0000007ff7f4b208 in __dl__start () from /system/bin/linker64
I use clang version 16.0.6, Target: aarch64-unknown-linux-android24.
With just 'return ""' in __ubsan_default_options(), I've managed to run
`make check` (there is also an issue with check_stack_depth(),
but that's another story)...
Best regards,
Alexander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: exclusion@gmail.com, andres@anarazel.de, tgl@sss.pgh.pa.us
Subject: Re: ubsan
In-Reply-To: <dbf77bf7-6e54-ed8a-c4ae-d196eeb664ce@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox