]> granicus.if.org Git - postgresql/commit
Fix JITed EEOP_AGG_INIT_TRANS, which missed some state.
authorAndres Freund <andres@anarazel.de>
Sun, 22 Jul 2018 23:47:00 +0000 (16:47 -0700)
committerAndres Freund <andres@anarazel.de>
Mon, 23 Jul 2018 00:00:41 +0000 (17:00 -0700)
commita9a0a4d3f88b87564533b87af64d3282ca417dc6
treee85f7717ae41665a48a113be3504b1ba19d1aac5
parent04e3492c5c46822c756f575d6105a8a6ff76d4f2
Fix JITed EEOP_AGG_INIT_TRANS, which missed some state.

The JIT compiled implementation missed maintaining
AggState->{current_set,curaggcontext}. That could lead to trouble
because the transition value could be allocated in the wrong context.

Reported-By: Rushabh Lathia
Diagnosed-By: Dmitry Dolgov
Author: Dmitry Dolgov, with minor changes by me
Discussion: https://postgr.es/m/CAGPqQf165-=+Drw3Voim7M5EjHT1zwPF9BQRjLFQzCzYnNZEiQ@mail.gmail.com
Backpatch: 11-, where JIT compilation support was added
src/backend/jit/llvm/llvmjit_expr.c