Re: [Bug] Heap use-after-free in COPY FROM error context after ON_ERROR ignore skips a row

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Gowdham M <gowdham(dot)m(at)zohocorp(dot)com>
Cc: pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>, "zlabs-cstore(at)zohocorp(dot)com" <zlabs-cstore(at)zohocorp(dot)com>
Subject: Re: [Bug] Heap use-after-free in COPY FROM error context after ON_ERROR ignore skips a row
Date: 2026-11-03 03:40:47
Message-ID: CAGRkXqT8voMpxMCQAmtwZTTZCuKeJgpPd2rkQ1RsA5FRoVcP0g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Gowdham,

Thanks for the report and the patch. I can reproduce it on 17 through
master. It also crashes a normal release build on Linux, if the next
row is a few MB long.

I think ON_ERROR set_null in 19 hits the same bug, the attached test
is a repro for it.

Thanks,
Shihao

Attachment Content-Type Size
nocfbot-0002-Test-stale-COPY-error-context-after-ON_ERROR-set_nul.txt text/plain 1.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-11-03 03:49:43 Re: ORCE ROW LEVEL SECURITY makes ADD/VALIDATE FOREIGN KEY skip rows hidden from the owner (RI_Initial_Check)
Previous Message shihao zhong 2026-11-03 03:29:24 Re: data race in libpq process-global variables (static_client_encoding / static_std_strings) when connections are established concurrently