diff options
author | Palle Girgensohn <girgen@FreeBSD.org> | 2020-12-15 20:50:10 +0000 |
---|---|---|
committer | Palle Girgensohn <girgen@FreeBSD.org> | 2020-12-15 20:50:10 +0000 |
commit | 3b1693bb3e7d3d00817c345e77d9999a84f6b17b (patch) | |
tree | fe247ad04792253103a57a766316bf6ebc230f14 /databases/postgresql13-server | |
parent | 5aa030b372dddb18aed540ce7ae56e6b648c2e8c (diff) | |
download | ports-3b1693bb3e7d3d00817c345e77d9999a84f6b17b.tar.gz ports-3b1693bb3e7d3d00817c345e77d9999a84f6b17b.zip |
Patch to mitigate a crash with LLVM JIT
PR: 251192 (Submitted by Dmitry Marakasov)
Notes
Notes:
svn path=/head/; revision=558181
Diffstat (limited to 'databases/postgresql13-server')
-rw-r--r-- | databases/postgresql13-server/Makefile | 2 | ||||
-rw-r--r-- | databases/postgresql13-server/files/patch-disable-llvm-jit-inlining-with-tls | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/databases/postgresql13-server/Makefile b/databases/postgresql13-server/Makefile index bea0153e3e93..90f2ef5fa9a5 100644 --- a/databases/postgresql13-server/Makefile +++ b/databases/postgresql13-server/Makefile @@ -5,7 +5,7 @@ PORTNAME?= postgresql DISTVERSION?= 13.1 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES?= databases MASTER_SITES= PGSQL/source/v${DISTVERSION} PKGNAMESUFFIX?= ${PORTVERSION:R}${COMPONENT} diff --git a/databases/postgresql13-server/files/patch-disable-llvm-jit-inlining-with-tls b/databases/postgresql13-server/files/patch-disable-llvm-jit-inlining-with-tls new file mode 100644 index 000000000000..02686061ce99 --- /dev/null +++ b/databases/postgresql13-server/files/patch-disable-llvm-jit-inlining-with-tls @@ -0,0 +1,24 @@ +Do not inline functions which access TLS in LLVM JIT, as +this leads to crashes with unsupported relocation error + +diff --git src/backend/jit/llvm/llvmjit_inline.cpp src/backend/jit/llvm/llvmjit_inline.cpp +index 2617a46..a063edb 100644 +--- src/backend/jit/llvm/llvmjit_inline.cpp ++++ src/backend/jit/llvm/llvmjit_inline.cpp +@@ -608,6 +608,16 @@ function_inlinable(llvm::Function &F, + if (rv->materialize()) + elog(FATAL, "failed to materialize metadata"); + ++ /* ++ * Don't inline functions with thread-local variables until ++ * related crashes are investigated (see BUG #16696) ++ */ ++ if (rv->isThreadLocal()) { ++ ilog(DEBUG1, "cannot inline %s due to thread-local variable %s", ++ F.getName().data(), rv->getName().data()); ++ return false; ++ } ++ + /* + * Never want to inline externally visible vars, cheap enough to + * reference. |