svn commit: r558181 - in head/databases/postgresql13-server: . files
Palle Girgensohn
girgen at FreeBSD.org
Tue Dec 15 20:50:11 UTC 2020
Author: girgen
Date: Tue Dec 15 20:50:10 2020
New Revision: 558181
URL: https://svnweb.freebsd.org/changeset/ports/558181
Log:
Patch to mitigate a crash with LLVM JIT
PR: 251192 (Submitted by Dmitry Marakasov)
Added:
head/databases/postgresql13-server/files/patch-disable-llvm-jit-inlining-with-tls (contents, props changed)
Modified:
head/databases/postgresql13-server/Makefile
Modified: head/databases/postgresql13-server/Makefile
==============================================================================
--- head/databases/postgresql13-server/Makefile Tue Dec 15 20:31:10 2020 (r558180)
+++ head/databases/postgresql13-server/Makefile Tue Dec 15 20:50:10 2020 (r558181)
@@ -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}
Added: head/databases/postgresql13-server/files/patch-disable-llvm-jit-inlining-with-tls
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/postgresql13-server/files/patch-disable-llvm-jit-inlining-with-tls Tue Dec 15 20:50:10 2020 (r558181)
@@ -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.
More information about the svn-ports-head
mailing list