pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: LLVMJIT: Release JIT context after running ExprContext shutdown
Date: Wed, 25 Jul 2018 23:47:49 +0000
Message-ID: <E1fiTVV-0006g5-6R@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1fiTVV-0006g5-6R@gemulon.postgresql.org>
Permalink:  ../E1fiTVV-0006g5-6R@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fiTVV-0006g5-6R@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: LLVMJIT: Release JIT context after running ExprContext shutdown
  In-Reply-To: <E1fiTVV-0006g5-6R@gemulon.postgresql.org>
  References: <E1fiTVV-0006g5-6R@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox