mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
fu_util/fobj: fix autorelease pool cleanup in glibc
glibc's pthread_exit runs stack unwinding for C++ destructor's handling, and calls destructors for pthread specifics only after unwinding. This way fobj_destroy_thread_AR is called too lately. We have to compile with '-fexception' to register all our attribute((cleanup)) for autorelease pools as "C++ desctructors". Found in debug session with Sergey Fucanchik <s.fukanchik@postgrespro.ru>
This commit is contained in:
@@ -81,6 +81,7 @@ PG_CPPFLAGS += -Isrc
|
||||
endif
|
||||
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
|
||||
PG_LIBS_INTERNAL = $(libpq_pgport) ${PTHREAD_CFLAGS}
|
||||
CFLAGS += -fexception
|
||||
|
||||
# additional dependencies on borrowed files
|
||||
src/backup.o src/catchup.o src/pg_probackup.o: src/compatibility/streamutil.h
|
||||
|
||||
Reference in New Issue
Block a user