pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: llvmjit: Also copy parameter / return value attributes from temp 4+ messages / 1 participants [nested] [flat]
* pgsql: llvmjit: Also copy parameter / return value attributes from temp @ 2020-10-15 22:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2020-10-15 22:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org llvmjit: Also copy parameter / return value attributes from template functions. Previously we only copied the function attributes. That caused problems at least on s390x: Because we didn't copy the 'zeroext' attribute for ExecAggTransReparent()'s *IsNull parameters, expressions invoking it didn't ensure that the upper bytes of the registers were zeroed. In the - relatively rare - cases where not, ExecAggTransReparent() wrongly ended up in the newValueIsNull branch due to the register not being zero. Subsequently causing a crash. It's quite possible that this would cause problems on other platforms, and in other places than just ExecAggTransReparent() on s390x. Thanks to Christoph (and the Debian project) for providing me with access to a s390x machine, allowing me to debug this. Reported-By: Christoph Berg Author: Andres Freund Discussion: https://postgr.es/m/20201015083246.kie5726xerdt3ael@alap3.anarazel.de Backpatch: 11-, where JIT was added Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/72559438f92f9a7d9205192bef601be953c7bd2a Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 44 ++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: llvmjit: Also copy parameter / return value attributes from temp @ 2020-10-15 22:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2020-10-15 22:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org llvmjit: Also copy parameter / return value attributes from template functions. Previously we only copied the function attributes. That caused problems at least on s390x: Because we didn't copy the 'zeroext' attribute for ExecAggTransReparent()'s *IsNull parameters, expressions invoking it didn't ensure that the upper bytes of the registers were zeroed. In the - relatively rare - cases where not, ExecAggTransReparent() wrongly ended up in the newValueIsNull branch due to the register not being zero. Subsequently causing a crash. It's quite possible that this would cause problems on other platforms, and in other places than just ExecAggTransReparent() on s390x. Thanks to Christoph (and the Debian project) for providing me with access to a s390x machine, allowing me to debug this. Reported-By: Christoph Berg Author: Andres Freund Discussion: https://postgr.es/m/20201015083246.kie5726xerdt3ael@alap3.anarazel.de Backpatch: 11-, where JIT was added Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ae3e75abab222519aef90eb130d93c1ea745ac2e Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 44 ++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: llvmjit: Also copy parameter / return value attributes from temp @ 2020-10-15 22:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2020-10-15 22:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org llvmjit: Also copy parameter / return value attributes from template functions. Previously we only copied the function attributes. That caused problems at least on s390x: Because we didn't copy the 'zeroext' attribute for ExecAggTransReparent()'s *IsNull parameters, expressions invoking it didn't ensure that the upper bytes of the registers were zeroed. In the - relatively rare - cases where not, ExecAggTransReparent() wrongly ended up in the newValueIsNull branch due to the register not being zero. Subsequently causing a crash. It's quite possible that this would cause problems on other platforms, and in other places than just ExecAggTransReparent() on s390x. Thanks to Christoph (and the Debian project) for providing me with access to a s390x machine, allowing me to debug this. Reported-By: Christoph Berg Author: Andres Freund Discussion: https://postgr.es/m/20201015083246.kie5726xerdt3ael@alap3.anarazel.de Backpatch: 11-, where JIT was added Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c8a2bb0f1abfa2c6ca4ed253a581431855e639c5 Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 44 ++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: llvmjit: Also copy parameter / return value attributes from temp @ 2020-10-15 22:22 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 4+ messages in thread From: Andres Freund @ 2020-10-15 22:22 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org llvmjit: Also copy parameter / return value attributes from template functions. Previously we only copied the function attributes. That caused problems at least on s390x: Because we didn't copy the 'zeroext' attribute for ExecAggTransReparent()'s *IsNull parameters, expressions invoking it didn't ensure that the upper bytes of the registers were zeroed. In the - relatively rare - cases where not, ExecAggTransReparent() wrongly ended up in the newValueIsNull branch due to the register not being zero. Subsequently causing a crash. It's quite possible that this would cause problems on other platforms, and in other places than just ExecAggTransReparent() on s390x. Thanks to Christoph (and the Debian project) for providing me with access to a s390x machine, allowing me to debug this. Reported-By: Christoph Berg Author: Andres Freund Discussion: https://postgr.es/m/20201015083246.kie5726xerdt3ael@alap3.anarazel.de Backpatch: 11-, where JIT was added Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f3dee5b9aba6bd8cf3d5a13296495df7b273835c Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 44 +++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-10-15 22:22 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-10-15 22:22 pgsql: llvmjit: Also copy parameter / return value attributes from temp Andres Freund <andres@anarazel.de> 2020-10-15 22:22 pgsql: llvmjit: Also copy parameter / return value attributes from temp Andres Freund <andres@anarazel.de> 2020-10-15 22:22 pgsql: llvmjit: Also copy parameter / return value attributes from temp Andres Freund <andres@anarazel.de> 2020-10-15 22:22 pgsql: llvmjit: Also copy parameter / return value attributes from temp Andres Freund <andres@anarazel.de>
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