Thread: BUG #17673: Regression tests failed with llvm 11+ when using address sanitizers
BUG #17673: Regression tests failed with llvm 11+ when using address sanitizers
From
PG Bug reporting form
Date:
The following bug has been logged on the website: Bug reference: 17673 Logged by: Vardan Pogosyan Email address: vardan.pogosyn@yandex.ru PostgreSQL version: 15.0 Operating system: Ubuntu 22.04 Description: When trying to run tests with sanitizer with gcc 9.4.0 CC=gcc CLANG=clang-11 CPPFLAGS="-fsanitize=address" LDFLAGS='-fsanitize=address -static-libasan' LLVM_CONFIG=/usr/lib/llvm-11/bin/llvm-config ./configure --enable-debug --enable-cassert --with-llvm && make -s -j8 && ASAN_OPTIONS=detect_leaks=0 make check I get the tests failed: ======================================================= 113 of 212 tests failed, 1 of these failures ignored. ======================================================= I see that an assertion failed with the following stacktrace: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f33fc792859 in __GI_abort () at abort.c:79 #2 0x00005582367fccd2 in ExceptionalCondition (conditionName=conditionName@entry=0x7f33f0650aa0 "LLVMGetTypeKind(typ) == LLVMPointerTypeKind", fileName=fileName@entry=0x7f33f0650000 "llvmjit.c", lineNumber=lineNumber@entry=404) at assert.c:66 #3 0x00007f33f061fca8 in llvm_pg_var_func_type (varname=varname@entry=0x7f33f06582c0 "TypeExprStateEvalFunc") at llvmjit.c:404 #4 0x00007f33f06466e5 in llvm_compile_expr (state=<optimized out>) at llvmjit_expr.c:152 #5 0x0000558235fde159 in ExecReadyExpr (state=state@entry=0x62500023e818) at execExpr.c:885 #6 0x0000558235fdf73d in ExecInitExpr (node=0x6310001a00b0, parent=parent@entry=0x62500023e028) at execExpr.c:148 #7 0x000055823609479f in ExecInitLimit (node=node@entry=0x7f33f0667038, estate=estate@entry=0x625000048a18, eflags=eflags@entry=16) at nodeLimit.c:485 #8 0x0000558236027355 in ExecInitNode (node=node@entry=0x7f33f0667038, estate=estate@entry=0x625000048a18, eflags=eflags@entry=16) at execProcnode.c:381 #9 0x000055823601254d in InitPlan (eflags=16, queryDesc=<optimized out>) at execMain.c:938 #10 standard_ExecutorStart (queryDesc=<optimized out>, eflags=16) at execMain.c:265 #11 0x00005582364fb230 in PortalStart (portal=portal@entry=0x625000025a18, params=params@entry=0x0, eflags=eflags@entry=0, snapshot=snapshot@entry=0x0) at pquery.c:517 #12 0x00005582364f36a0 in exec_simple_query (query_string=<optimized out>) at postgres.c:1199 #13 0x00005582364f6f40 in PostgresMain (dbname=dbname@entry=0x62900001b370 "regression", username=username@entry=0x62900001b358 "test") at postgres.c:4551 #14 0x000055823636cbcf in BackendRun (port=<optimized out>, port=<optimized out>) at postmaster.c:4482 #15 BackendStartup (port=<optimized out>) at postmaster.c:4210 #16 ServerLoop () at postmaster.c:1804 #17 0x000055823636e8dc in PostmasterMain (argc=8, argv=<optimized out>) at postmaster.c:1476 #18 0x00005582359ee2d8 in main (argc=8, argv=0x607000000100) at main.c:197 With llvm-10 and clang-10 these errors don't happen