Re: Fix some ubsan/asan related issues

2024-09-16 Thread Junwang Zhao
Hi Tristan, On Tue, Feb 6, 2024 at 11:53 AM Tristan Partin wrote: > > On Tue Jan 30, 2024 at 3:58 PM CST, Andres Freund wrote: > > Hi, > > > > On 2024-01-30 09:59:25 -0600, Tristan Partin wrote: > > > From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 > > > From: Tristan Parti

Re: Fix some ubsan/asan related issues

2024-02-05 Thread Tristan Partin
On Tue Jan 30, 2024 at 3:58 PM CST, Andres Freund wrote: Hi, On 2024-01-30 09:59:25 -0600, Tristan Partin wrote: > From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 > From: Tristan Partin > Date: Mon, 29 Jan 2024 18:03:39 -0600 > Subject: [PATCH v1 1/3] Refuse to register m

Re: Fix some ubsan/asan related issues

2024-01-31 Thread Tristan Partin
On Tue Jan 30, 2024 at 10:00 PM CST, Alexander Lakhin wrote: Hello, 30.01.2024 18:57, Tristan Partin wrote: > Patch 1: > > Passing NULL as a second argument to memcpy breaks ubsan, ... Maybe you would like to fix also one more similar place, reached with: create extension xml2; select xslt_proc

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Alexander Lakhin
Hello, 30.01.2024 18:57, Tristan Partin wrote: Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, ... Maybe you would like to fix also one more similar place, reached with: create extension xml2; select xslt_process('', $$http://www.w3.org/1999/XSL/Transform";> $$); varlena

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Andres Freund
Hi, On 2024-01-30 09:59:25 -0600, Tristan Partin wrote: > From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 > From: Tristan Partin > Date: Mon, 29 Jan 2024 18:03:39 -0600 > Subject: [PATCH v1 1/3] Refuse to register message in LogLogicalMessage if > NULL > If this occurs, t

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Andres Freund
Hi, On 2024-01-30 22:05:28 +0200, Heikki Linnakangas wrote: > On 30/01/2024 17:57, Tristan Partin wrote: > > In my effort to try to see if the test suite would pass with asan > > enabled, I ran into a max_stack_depth issue. I tried maxing it out > > (hence, the patch), but that still didn't remedy

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Heikki Linnakangas
On 30/01/2024 17:57, Tristan Partin wrote: Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, and there didn't seem to be anything preventing that in the LogLogicalMessage() codepath. Here is a preventative measure in LogLogicalMessage() and an Assert() in CopyXLogRecordToWAL().

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Tristan Partin
Spend so much time writing out the email, I once again forget attachments...UGH. -- Tristan Partin Neon (https://neon.tech) From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Mon, 29 Jan 2024 18:03:39 -0600 Subject: [PATCH v1 1/3] Refuse to registe

Fix some ubsan/asan related issues

2024-01-30 Thread Tristan Partin
Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, and there didn't seem to be anything preventing that in the LogLogicalMessage() codepath. Here is a preventative measure in LogLogicalMessage() and an Assert() in CopyXLogRecordToWAL(). Patch 2: Support building with -Db_san