aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-07-25 16:31:49 -0700
committerAndres Freund <andres@anarazel.de>2018-07-25 16:31:49 -0700
commit3acc4acd9bcbefbfaf789762950726c6208daf1b (patch)
treea4b666f398bbba09f38de16d06f45c3acebbd532 /src/backend/executor/execMain.c
parentbcafa263ec408ae8e383e389832b2a623900a55c (diff)
downloadpostgresql-3acc4acd9bcbefbfaf789762950726c6208daf1b.tar.gz
postgresql-3acc4acd9bcbefbfaf789762950726c6208daf1b.zip
LLVMJIT: Release JIT context after running ExprContext shutdown callbacks.
Due to inlining it previously was possible that an ExprContext's shutdown callback pointed to a JITed function. As the JIT context previously was shut down before the shutdown callbacks were called, that could lead to segfaults. Fix the ordering. Reported-By: Dmitry Dolgov Author: Andres Freund Discussion: https://postgr.es/m/CA+q6zcWO7CeAJtHBxgcHn_hj+PenM=tvG0RJ93X1uEJ86+76Ug@mail.gmail.com Backpatch: 11-, where JIT compilation was added
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r--src/backend/executor/execMain.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 8026fe2438f..01e1a461804 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -47,7 +47,6 @@
#include "commands/trigger.h"
#include "executor/execdebug.h"
#include "foreign/fdwapi.h"
-#include "jit/jit.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "optimizer/clauses.h"
@@ -498,10 +497,6 @@ standard_ExecutorEnd(QueryDesc *queryDesc)
UnregisterSnapshot(estate->es_snapshot);
UnregisterSnapshot(estate->es_crosscheck_snapshot);
- /* release JIT context, if allocated */
- if (estate->es_jit)
- jit_release_context(estate->es_jit);
-
/*
* Must switch out of context before destroying it
*/