Re: libpq fails to build with TSAN

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Roman Lozko <lozko(dot)roma(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: libpq fails to build with TSAN
Date: 2024-01-31 12:56:55
Message-ID: CBCF50B5-39CD-4C97-A893-46932BE919AF@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 31 Jan 2024, at 04:21, Roman Lozko <lozko(dot)roma(at)gmail(dot)com> wrote:
>
> Hi, so libpq has this line in its Makefile
> https://github.com/postgres/postgres/blob/6ee26c6a4bafabbd22a85f575d2446fd5ec6ad0d/src/interfaces/libpq/Makefile#L116
> which checks that libpq does not use any "exit" functions. With
> ThreadSanitizer it triggers on function `__tsan_func_exit` which is
> used to record returns from functions. Should it be added to exclusion
> list here?

I think it should, the idea of that check is to catch calls to actual exits,
while this is instrumentation which has nothing to do with exit(2). The
attached diff should be enough to handle this.

--
Daniel Gustafsson

Attachment Content-Type Size
tsan_exit_exclusion.diff application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2024-01-31 13:00:00 Re: Switching XLog source from archive to streaming when primary available
Previous Message Hayato Kuroda (Fujitsu) 2024-01-31 12:52:23 RE: speed up a logical replica setup