Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlSH4-002rAT-6Q for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Sep 2023 11:00:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qlSH1-003593-7v for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Sep 2023 11:00:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlSH0-00358l-Sk for pgsql-hackers@lists.postgresql.org; Wed, 27 Sep 2023 11:00:06 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlSGy-007sXs-87 for pgsql-hackers@postgresql.org; Wed, 27 Sep 2023 11:00:06 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b962c226ceso183194691fa.3 for ; Wed, 27 Sep 2023 04:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695812403; x=1696417203; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+UXpI8GXnvMQitw/QF5kAIqcmnoUPkj21iCB2TOuelw=; b=IR2UyRGVh4D71vFxz7x6iG41WOlMqG2hjalizmE48PQWMA6uCTS2SlBU2a9pYo/sHr pXCEvD7tZTy/PF1/jf+Zwi+O49+9php1C1JYXx5zEvlh9X50jR2NOg3mj5mAGJRRJbU8 paDacBQz6OvA/5CuBo7T7geltKdJ9LECgkwzbk9D8+fd4KBKsaLh47NonB9mhvQANT7S RdUTp9HOQin4N1Vs0uMTm68at7q40kWqjsBDBoZ/9H3KC3s87T+dtfv8KPBGjZCTAyzs wQXPYVX0dqJ8wd+m1vGspb82z4GzWYAwVwv6KK/PecbuZg9zepQW8PqpILFAfWatoYBv Ctgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695812403; x=1696417203; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+UXpI8GXnvMQitw/QF5kAIqcmnoUPkj21iCB2TOuelw=; b=YsDBZGSpuZa4xqamGUbB+VqH+ZdpOeRWv1pE1UUD0Loc/mzZvx/3KEB3rRUtd4M2YI Wcop0+Ha7LPXfcIIixB6pW8NR6jLaN6WFkEokNzYQYTQKm0SOwaiYoXEtN5PKD9CHzhx Px3NqeQr/U9GTVWA2r2DihboBFB4lhRSNdVjhZsKMb4nLcZzboExZrsCmjaDmf85VSc2 xfZAxcLCOR2K+cDZ01NyancG7MZZ/rrCuptsNqiHGwdnd08rMbxyYk1Sw0q5mW3pRpHg CQDMhX6GnL9f2yw2F+DrcCZEDX1vnXdCJUUDK4RN9h2fy5CwesSvXwqxe+0LalsgK5Ka zoIQ== X-Gm-Message-State: AOJu0YxnE3Rbhhkw9ZH3op4oHh+vceB9Vf6+5T44E23MSiNJ+1cmNyce sWPdLBN5wtECTUc30mwdV2fuxcSyOi8= X-Google-Smtp-Source: AGHT+IFICZslG9spLxhbnoLcuXnb0P3hFdicU9MyuCGxuC8+5uza9i5wO6bHwu36TYSjE38pTd1t+g== X-Received: by 2002:a2e:8404:0:b0:2bc:da4a:4649 with SMTP id z4-20020a2e8404000000b002bcda4a4649mr1723640ljg.22.1695812402864; Wed, 27 Sep 2023 04:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.21.181]) by smtp.gmail.com with ESMTPSA id g17-20020a2e9cd1000000b002c02f371e37sm3082930ljj.52.2023.09.27.04.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 04:00:02 -0700 (PDT) Message-ID: Date: Wed, 27 Sep 2023 14:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: ubsan Content-Language: en-US To: Andres Freund , Tom Lane Cc: pgsql-hackers@postgresql.org References: <20220323173537.ll7klrglnp4gn2um@alap3.anarazel.de> <2771659.1648058090@sss.pgh.pa.us> <20220930011755.dg7am3kjzebpxxne@awork3.anarazel.de> <20221121231503.rb7yim6xlfrs3wu2@alap3.anarazel.de> From: Alexander Lakhin In-Reply-To: <20221121231503.rb7yim6xlfrs3wu2@alap3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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