Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b4d860

Browse files
committed
Fix JITed EEOP_AGG_INIT_TRANS, which missed some state.
The JIT compiled implementation missed maintainingAggState->{current_set,curaggcontext}. That could lead to troublebecause the transition value could be allocated in the wrong context.Reported-By: Rushabh LathiaDiagnosed-By: Dmitry DolgovAuthor: Dmitry Dolgov, with minor changes by meDiscussion:https://postgr.es/m/CAGPqQf165-=+Drw3Voim7M5EjHT1zwPF9BQRjLFQzCzYnNZEiQ@mail.gmail.comBackpatch: 11-, where JIT compilation support was added
1 parent86eaf20 commit6b4d860

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎src/backend/jit/llvm/llvmjit_expr.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,6 +2228,28 @@ llvm_compile_expr(ExprState *state)
22282228

22292229
{
22302230
LLVMValueRefparams[3];
2231+
LLVMValueRefv_curaggcontext;
2232+
LLVMValueRefv_current_set;
2233+
LLVMValueRefv_aggcontext;
2234+
2235+
v_aggcontext=l_ptr_const(op->d.agg_init_trans.aggcontext,
2236+
l_ptr(StructExprContext));
2237+
2238+
v_current_set=
2239+
LLVMBuildStructGEP(b,
2240+
v_aggstatep,
2241+
FIELDNO_AGGSTATE_CURRENT_SET,
2242+
"aggstate.current_set");
2243+
v_curaggcontext=
2244+
LLVMBuildStructGEP(b,
2245+
v_aggstatep,
2246+
FIELDNO_AGGSTATE_CURAGGCONTEXT,
2247+
"aggstate.curaggcontext");
2248+
2249+
LLVMBuildStore(b,l_int32_const(op->d.agg_init_trans.setno),
2250+
v_current_set);
2251+
LLVMBuildStore(b,v_aggcontext,
2252+
v_curaggcontext);
22312253

22322254
params[0]=v_aggstatep;
22332255
params[1]=v_pertransp;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp