postgresql/src/backend/jit/llvm
Thomas Munro 53c8d6c9f1 Fix illegal attribute propagation in LLVM JIT.
Commit 72559438 started copying more attributes from AttributeTemplate
to the functions we generate on the fly.  In the case of deform
functions, which return void, this meant that "noundef", from
AttributeTemplate's return value (a Datum) was copied to a void type.
Older LLVM releases were OK with that, but LLVM 18 crashes.

Update our llvm_copy_attributes() function to skip copying the attribute
for the return value, if the target function returns void.

Thanks to Dmitry Dolgov for help chasing this down.

Back-patch to all supported releases, like 72559438.

Reported-by: Pavel Stehule <pavel.stehule@gmail.com>
Reviewed-by: Dmitry Dolgov <9erthalion6@gmail.com>
Discussion: https://postgr.es/m/CAFj8pRACpVFr7LMdVYENUkScG5FCYMZDDdSGNU-tch%2Bw98OxYg%40mail.gmail.com
2024-04-10 12:13:46 +12:00
..
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
llvmjit.c Fix illegal attribute propagation in LLVM JIT. 2024-04-10 12:13:46 +12:00
llvmjit_deform.c Update copyright for 2024 2024-01-03 20:49:05 -05:00
llvmjit_error.cpp jit: Require at least LLVM 10. 2024-01-25 15:42:34 +13:00
llvmjit_expr.c Add SQL/JSON query functions 2024-03-21 17:07:03 +09:00
llvmjit_inline.cpp jit: Require at least LLVM 10. 2024-01-25 15:42:34 +13:00
llvmjit_types.c Add SQL/JSON query functions 2024-03-21 17:07:03 +09:00
llvmjit_wrap.cpp jit: Require at least LLVM 10. 2024-01-25 15:42:34 +13:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00