Csaba Ringhofer has uploaded this change for review. ( https://gerrit.cloudera.org/25619
Change subject: IMPALA-15893: Test that cross compiled code cannot reach boost::throw_exception ...................................................................... IMPALA-15893: Test that cross compiled code cannot reach boost::throw_exception The IR module is compiled with BOOST_NO_EXCEPTIONS, so boost calls the boost::throw_exception() override in llvm-codegen.cc, which aborts the process with LOG(FATAL) instead of throwing. Boost code that can throw must therefore only be called from translation units that are not cross compiled. This adds LlvmCodeGenTest.IrDoesNotReachBoostThrow, which materializes the whole IR module and fails for every function that calls boost::throw_exception(), printing a call path to it from an entry point. The existing callers are allowlisted, as they only throw on input that Impala validates first: boost::gregorian (invalid dates) and boost::multiprecision (division by zero). The test follows LLVM's use lists with CodegenCallGraph::FindGlobalUsers(), which this makes public. This was motivated by https://gerrit.cloudera.org/#/c/24540/. Testing: - ran llvm-codegen-test - checked that the test fails, with the call path, when boost::multiprecision is removed from the allowlist Change-Id: Ie709ee33a344d3268e41508a19a863ce692f9f16 Assisted-by: Claude Opus 5.5 (Claude Code) --- M be/src/codegen/codegen-callgraph.h M be/src/codegen/llvm-codegen-test.cc 2 files changed, 92 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/19/25619/2 -- To view, visit https://gerrit.cloudera.org/25619 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ie709ee33a344d3268e41508a19a863ce692f9f16 Gerrit-Change-Number: 25619 Gerrit-PatchSet: 2 Gerrit-Owner: Csaba Ringhofer <[email protected]>
