From 971bdb6466347264185531660ff8f11a58c46adb Mon Sep 17 00:00:00 2001 From: Tishj Date: Wed, 10 Apr 2024 10:55:41 +0200 Subject: [PATCH] disable the address sanitizer for now, add LOAD 'quack' to get our _PG_init function to run --- Makefile | 6 +++--- quack--0.0.1.sql | 1 + src/quack.cpp | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 57e09d7b..36b61aaa 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,8 @@ PG_CONFIG ?= pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) PG_LIB := $(shell $(PG_CONFIG) --pkglibdir) -DEBUG_FLAGS = -g -O0 -override PG_CPPFLAGS += $(DEBUG_FLAGS) -Iinclude -Ithird_party/duckdb/src/include -std=c++17 +DEBUG_FLAGS = -g -O0 -fsanitize=address +override PG_CPPFLAGS += -Iinclude -Ithird_party/duckdb/src/include -std=c++17 SHLIB_LINK += -Wl,-rpath,$(PG_LIB)/ -lpq -L$(PG_LIB) -lduckdb -Lthird_party/duckdb/build/debug/src -lstdc++ @@ -48,7 +48,7 @@ third_party/duckdb: git submodule update --init --recursive third_party/duckdb/build/debug/src/$(DUCKDB_LIB): - $(MAKE) -C third_party/duckdb debug + $(MAKE) -C third_party/duckdb debug DISABLE_SANITIZER=1 install_duckdb: $(install_bin) -m 755 third_party/duckdb/build/debug/src/$(DUCKDB_LIB) $(DESTDIR)$(PG_LIB) diff --git a/quack--0.0.1.sql b/quack--0.0.1.sql index e69de29b..97a4d362 100644 --- a/quack--0.0.1.sql +++ b/quack--0.0.1.sql @@ -0,0 +1 @@ +LOAD 'quack'; diff --git a/src/quack.cpp b/src/quack.cpp index fed1f38d..4cfd44f3 100644 --- a/src/quack.cpp +++ b/src/quack.cpp @@ -13,6 +13,7 @@ PG_MODULE_MAGIC; void _PG_init(void) { + elog(INFO, "quack extension initialized"); quack_init_guc(); quack_init_hooks(); }