pgsql: LLVMJIT: Release JIT context after running ExprContextshutdown - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: LLVMJIT: Release JIT context after running ExprContextshutdown
Date
Msg-id E1fiTVV-0006g5-6R@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3acc4acd9bcbefbfaf789762950726c6208daf1b

Modified Files
--------------
src/backend/executor/execMain.c  |  5 -----
src/backend/executor/execUtils.c | 18 +++++++++++++-----
2 files changed, 13 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Tomas Vondra
Date:
Subject: pgsql: Add strict_multi_assignment and too_many_rows plpgsql checks
Next
From: Andres Freund
Date:
Subject: pgsql: LLVMJIT: Release JIT context after running ExprContextshutdown