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 1vGYR6-000U5N-OP for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Nov 2025 08:00:08 +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 1vGYR5-0013Bb-Fg for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Nov 2025 08:00:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vGYR5-0013BP-5e for pgsql-hackers@lists.postgresql.org; Wed, 05 Nov 2025 08:00:06 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vGYR2-005Xw8-1x for pgsql-hackers@postgresql.org; Wed, 05 Nov 2025 08:00:05 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-592f7e50da2so749079e87.0 for ; Wed, 05 Nov 2025 00:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762329603; x=1762934403; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=nY2+SQnLPNQ5UiYtUNxt5AXiEfOw7PuMP6aioKUT8jw=; b=YyplQ/M7/xmJjot8xlf71yEkz1Y97U6UkSQy3lfpY2V2QT75zCpCQ1wVS2DVCR0x3o ipxXDhzvOnYExBHdChKUHm+koDp3wfazh+jHoLIAYijRuzf5Dqs3LWt0IJsybWWYIMq2 bCVT3wR/Yms808fGkAwdWEZG1jJmk9wXDbedzVmmTi91qWBzXKoFY48AgFa1CNMkXFsP 1Va/3aQmYDE6nT1p2PiTHtnEPcI/zcfBYTen50RLJ0XdD32OPgo2a3B2ysdhIsWja+Ca whMwBJX6FcdaYZiTazjfxgYQlBpxEJlTvjOFhc4O5isrG3DMl+GSeJRCDsUBbo22ZQNE gl4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762329603; x=1762934403; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nY2+SQnLPNQ5UiYtUNxt5AXiEfOw7PuMP6aioKUT8jw=; b=uhpNxN+zYNW2qxMetPYuwwpXpk70LZasMjqyim1dn+cq9IKay6F8aftqJNXL4uK3dz vM3hNus7pxqX4IxWhK2c6vo8AhTRsfRi4e5dc8Wlr0YXfE+zT90EP2f5hsl0l4oXT/k9 nmYbUn4Ajmh+crjOKL91sbzvLtAdDKNfdElKN4zwziV2YunrJ084XSLRUxlnh1wWYIe1 YtmjML17Asp7mN4Ym/Wfc/i9D+UQaF2pj0A9bJqBJ0Kx9NxvXOqWMkx8p4bY+/WnBNpE /cXoTTbZKpBG/6WTzpjW/uJ5xfIIbqxP92RuPNuT2QQnIqeyaWujD7xgYLNC7aXTHrfA rQIw== X-Forwarded-Encrypted: i=1; AJvYcCWrpvnajhgOKIkygWj2tr/D21TAW93ReUKU3iwuNuPtW5E9KUn2NDfeY/+mBJUfceXIRov6ShK7DrL7DNb3@postgresql.org X-Gm-Message-State: AOJu0YyMkEFURZa5lN3WWtu3jJpnI7/MlcHXYLRfcsbjdbaAShrH7uuH aCZLG/plPu73z1tyWawhgvFEMiZoaZH/T/sKjj9Oezkan1m2kdsMY3LcnfJ7XA== X-Gm-Gg: ASbGnctQwaN5pU/KltMbl158OauVjDBs2lsMGhh33XDrAVczneiUn6wqtrA1UjGwMFY lvL2DhISNG4pNq6xfCY5EWpXEerR5dZTB+lTFOb0YHbHFmqw1hh/ONqsReShW3Q/c2qi5hVXZJB RIIhHjQHBvgfC07w8/we3cDSPnrj6NNcoMQSwgj5VgpHc0goZ7hcFa2u+flE6Vbfmhy4GDNHuVy N1Q9Vw3mRN3a4rgpCW9Venx7/7ki2gDU++JS678JBVZeJegmzyzHv/3rFCnT0UFZaqW6z9zaedA p3P2pmpf4ONav2RakDnjii7IkCeUrYRTHDOKZXzYoYpPkEHyBW2NeDnt/yppomuZeC34zA081SN s+O9fXU/1Vjzl2ZO4+saq9/aWphPixcbqhf9hr1RMwUmrgQCFcz8HwivmYgTAYAdfhler82pyHD 6V+xDTpH0/9VnygA== X-Google-Smtp-Source: AGHT+IG+iw5YrpCMAQMcEKJ4lDzQj8c4fVobgTZS6HLqQ3Aph8WVGb92Q/gtQnts3spqA9laeloOwQ== X-Received: by 2002:a05:6512:3b9b:b0:594:2eb5:371 with SMTP id 2adb3069b0e04-5943cc56a63mr723078e87.26.1762329602755; Wed, 05 Nov 2025 00:00:02 -0800 (PST) Received: from [192.168.0.50] ([89.149.120.198]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59434390d7fsm1493002e87.29.2025.11.05.00.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Nov 2025 00:00:02 -0800 (PST) Message-ID: Date: Wed, 5 Nov 2025 10:00:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: ubsan To: Tom Lane Cc: Andres Freund , 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> <709338.1762306456@sss.pgh.pa.us> Content-Language: en-US From: Alexander Lakhin In-Reply-To: <709338.1762306456@sss.pgh.pa.us> 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 Tom, 05.11.2025 03:34, Tom Lane wrote: > Alexander Lakhin writes: >> I've just discovered that that function __ubsan_default_options() is >> incompatible with -fsanitize=hwaddress: >> $ tmp_install/usr/local/pgsql/bin/postgres >> Segmentation fault > Hi Alexander, I wonder if you can still reproduce this problem, > and if so whether the patch proposed at [1] fixes it. > > regards, tom lane > > [1] https://www.postgresql.org/message-id/707073.1762305575%40sss.pgh.pa.us I don't have that device handy, but I've tried -fsanitize=hwaddress on two ARM servers available, and despite other issues I've encountered, I could reproduce the problem with __ubsan_default_options() on current master: Program received signal SIGSEGV, Segmentation fault. 0x0000aaaaaed06e1c in __ubsan_default_options () at main.c:507 507     if (!reached_main) (gdb) bt #0  0x0000aaaaaed06e1c in __ubsan_default_options () at main.c:507 #1  0x0000aaaaac489d84 in __hwasan_init () #2  0x0000fffff7fc25c8 in _dl_init (main_map=0xfffff7fff380, argc=1, argv=0xfffffffff3f8, env=0xfffffffff408) at ./elf/dl-init.c:106 #3  0x0000fffff7fd8d38 in _start () at ../sysdeps/aarch64/dl-start.S:46 The proposed patch really eliminates it. Thank you for recalling this! Best regards, Alexander