pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix illegal attribute propagation in LLVM JIT.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix illegal attribute propagation in LLVM JIT.
@ 2024-04-10 00:26  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-04-10 00:26 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/53c8d6c9f157f2bc8211b8de02417e55fefddbc7

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix illegal attribute propagation in LLVM JIT.
@ 2024-04-10 00:26  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-04-10 00:26 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bf1cfe77ed49a4929695ba6c0367f784f2f6a10c

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix illegal attribute propagation in LLVM JIT.
@ 2024-04-10 00:26  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-04-10 00:26 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/74992929a79e2606fbc4d579c3fad04a890eda04

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix illegal attribute propagation in LLVM JIT.
@ 2024-04-10 00:27  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-04-10 00:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7fe32eaa4a878500280ed7d33ce711c06b6939ff

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix illegal attribute propagation in LLVM JIT.
@ 2024-04-10 00:27  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-04-10 00:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4f90750b53266e561dfcb6956d5d045d8d4b7b94

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix illegal attribute propagation in LLVM JIT.
@ 2024-04-10 00:27  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-04-10 00:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/01b55203ace02bb02049cd147f63b407f3911ca5

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2024-04-10 00:27 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 00:26 pgsql: Fix illegal attribute propagation in LLVM JIT. Thomas Munro <tmunro@postgresql.org>
2024-04-10 00:26 pgsql: Fix illegal attribute propagation in LLVM JIT. Thomas Munro <tmunro@postgresql.org>
2024-04-10 00:26 pgsql: Fix illegal attribute propagation in LLVM JIT. Thomas Munro <tmunro@postgresql.org>
2024-04-10 00:27 pgsql: Fix illegal attribute propagation in LLVM JIT. Thomas Munro <tmunro@postgresql.org>
2024-04-10 00:27 pgsql: Fix illegal attribute propagation in LLVM JIT. Thomas Munro <tmunro@postgresql.org>
2024-04-10 00:27 pgsql: Fix illegal attribute propagation in LLVM JIT. Thomas Munro <tmunro@postgresql.org>

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