From ae11ebe777cd228fb3ddf69cc05cbc816301c41f Mon Sep 17 00:00:00 2001
From: BharatDBPG <bharatdbpg@gmail.com>
Date: Thu, 4 Dec 2025 12:08:07 +0530
Subject: [PATCH v6 2/2] libpq: whitelisting pthread_exit() in libpq-check.

---
 src/interfaces/libpq/libpq-check.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/interfaces/libpq/libpq-check.pl b/src/interfaces/libpq/libpq-check.pl
index d4220ef..13e977d 100644
--- a/src/interfaces/libpq/libpq-check.pl
+++ b/src/interfaces/libpq/libpq-check.pl
@@ -54,9 +54,11 @@ while (<$fh>) {
     # Set of symbols allowed:
     #     __cxa_atexit     - injected by some libcs (e.g., OpenBSD)
     #     __tsan_func_exit - ThreadSanitizer instrumentation
+    #     pthread_exit     - legitimate thread cleanup
 
     next if /__cxa_atexit/;
     next if /__tsan_func_exit/;
+    next if /pthread_exit/;
 
     # Anything containing "exit" is suspicious.
     # (Ideally we should reject abort() too, but there are various scenarios
-- 
2.43.0

