]> 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)
commit6b4d860311e99621681f25db5db82f88348d8ea6
treec3b6aa1163051a9eaf1d35e838698495debf8053
parent86eaf208ea048936df6be77276a246d3f92e9620
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