pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere 5+ messages / 1 participants [nested] [flat]
* pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere @ 2021-09-14 01:31 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2021-09-14 01:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org jit: Do not try to shut down LLVM state in case of LLVM triggered errors. If an allocation failed within LLVM it is not safe to call back into LLVM as LLVM is not generally safe against exceptions / stack-unwinding. Thus errors while in LLVM code are promoted to FATAL. However llvm_shutdown() did call back into LLVM even in such cases, while llvm_release_context() was careful not to do so. We cannot generally skip shutting down LLVM, as that can break profiling. But it's OK to do so if there was an error from within LLVM. Reported-By: Jelte Fennema <Jelte.Fennema@microsoft.com> Author: Andres Freund <andres@anarazel.de> Author: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/AM5PR83MB0178C52CCA0A8DEA0207DC14F7FF9@AM5PR83MB0178.EURPRD83.prod.outlook.com Backpatch: 11-, where jit was introduced Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/edb4d95ddf8984ad5b24d964d45884977d2fde4b Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 18 ++++++++++++++++-- src/backend/jit/llvm/llvmjit_error.cpp | 10 ++++++++++ src/include/jit/llvmjit.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere @ 2021-09-14 01:31 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2021-09-14 01:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org jit: Do not try to shut down LLVM state in case of LLVM triggered errors. If an allocation failed within LLVM it is not safe to call back into LLVM as LLVM is not generally safe against exceptions / stack-unwinding. Thus errors while in LLVM code are promoted to FATAL. However llvm_shutdown() did call back into LLVM even in such cases, while llvm_release_context() was careful not to do so. We cannot generally skip shutting down LLVM, as that can break profiling. But it's OK to do so if there was an error from within LLVM. Reported-By: Jelte Fennema <Jelte.Fennema@microsoft.com> Author: Andres Freund <andres@anarazel.de> Author: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/AM5PR83MB0178C52CCA0A8DEA0207DC14F7FF9@AM5PR83MB0178.EURPRD83.prod.outlook.com Backpatch: 11-, where jit was introduced Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4e86887e0922f20add67e2473c7baae8c7f05d5e Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 18 ++++++++++++++++-- src/backend/jit/llvm/llvmjit_error.cpp | 10 ++++++++++ src/include/jit/llvmjit.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere @ 2021-09-14 01:31 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2021-09-14 01:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org jit: Do not try to shut down LLVM state in case of LLVM triggered errors. If an allocation failed within LLVM it is not safe to call back into LLVM as LLVM is not generally safe against exceptions / stack-unwinding. Thus errors while in LLVM code are promoted to FATAL. However llvm_shutdown() did call back into LLVM even in such cases, while llvm_release_context() was careful not to do so. We cannot generally skip shutting down LLVM, as that can break profiling. But it's OK to do so if there was an error from within LLVM. Reported-By: Jelte Fennema <Jelte.Fennema@microsoft.com> Author: Andres Freund <andres@anarazel.de> Author: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/AM5PR83MB0178C52CCA0A8DEA0207DC14F7FF9@AM5PR83MB0178.EURPRD83.prod.outlook.com Backpatch: 11-, where jit was introduced Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c49e6f9d974966c7b0fc3eac43a6be922cf6eaee Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 18 ++++++++++++++++-- src/backend/jit/llvm/llvmjit_error.cpp | 10 ++++++++++ src/include/jit/llvmjit.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere @ 2021-09-14 01:31 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2021-09-14 01:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org jit: Do not try to shut down LLVM state in case of LLVM triggered errors. If an allocation failed within LLVM it is not safe to call back into LLVM as LLVM is not generally safe against exceptions / stack-unwinding. Thus errors while in LLVM code are promoted to FATAL. However llvm_shutdown() did call back into LLVM even in such cases, while llvm_release_context() was careful not to do so. We cannot generally skip shutting down LLVM, as that can break profiling. But it's OK to do so if there was an error from within LLVM. Reported-By: Jelte Fennema <Jelte.Fennema@microsoft.com> Author: Andres Freund <andres@anarazel.de> Author: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/AM5PR83MB0178C52CCA0A8DEA0207DC14F7FF9@AM5PR83MB0178.EURPRD83.prod.outlook.com Backpatch: 11-, where jit was introduced Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/43849b65f3338acad50d9bdf607d2d573f8079c6 Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 18 ++++++++++++++++-- src/backend/jit/llvm/llvmjit_error.cpp | 10 ++++++++++ src/include/jit/llvmjit.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere @ 2021-09-14 01:31 Andres Freund <andres@anarazel.de> 0 siblings, 0 replies; 5+ messages in thread From: Andres Freund @ 2021-09-14 01:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org jit: Do not try to shut down LLVM state in case of LLVM triggered errors. If an allocation failed within LLVM it is not safe to call back into LLVM as LLVM is not generally safe against exceptions / stack-unwinding. Thus errors while in LLVM code are promoted to FATAL. However llvm_shutdown() did call back into LLVM even in such cases, while llvm_release_context() was careful not to do so. We cannot generally skip shutting down LLVM, as that can break profiling. But it's OK to do so if there was an error from within LLVM. Reported-By: Jelte Fennema <Jelte.Fennema@microsoft.com> Author: Andres Freund <andres@anarazel.de> Author: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/AM5PR83MB0178C52CCA0A8DEA0207DC14F7FF9@AM5PR83MB0178.EURPRD83.prod.outlook.com Backpatch: 11-, where jit was introduced Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/dccffd9a274dfbf343008c4da8029ed8b1f35ea2 Modified Files -------------- src/backend/jit/llvm/llvmjit.c | 18 ++++++++++++++++-- src/backend/jit/llvm/llvmjit_error.cpp | 10 ++++++++++ src/include/jit/llvmjit.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2021-09-14 01:31 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-09-14 01:31 pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere Andres Freund <andres@anarazel.de> 2021-09-14 01:31 pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere Andres Freund <andres@anarazel.de> 2021-09-14 01:31 pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere Andres Freund <andres@anarazel.de> 2021-09-14 01:31 pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere Andres Freund <andres@anarazel.de> 2021-09-14 01:31 pgsql: jit: Do not try to shut down LLVM state in case of LLVM triggere 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