aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-16 16:48:12 +0000
committer_ov4 <ov4@ov4.org>2026-10-16 16:48:12 +0000
commit131b1594781cc92806a66672010c3c097e30bf4f (patch)
tree847f62b3acc1c8fc074399ab9fcf7b0f86a2d382 /tools
parentbc9b82c7818df986385f6d0e7e29b7ed801566f7 (diff)
fix(jit): guard personality access with hasPersonalityFn
getPersonalityFn on a function without the personality operand reads out of bounds. The newly created stub hit this in the reroute scan. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/driver/EmbeddedRunner.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/driver/EmbeddedRunner.cc b/tools/driver/EmbeddedRunner.cc
index ddfb608..ca0a41c 100644
--- a/tools/driver/EmbeddedRunner.cc
+++ b/tools/driver/EmbeddedRunner.cc
@@ -448,7 +448,7 @@ int runEmbedded(const cps::CodeGen &CG) {
continue;
bool Used = false;
for (auto &F : M.functions()) {
- if (F.getPersonalityFn() &&
+ if (F.hasPersonalityFn() &&
F.getPersonalityFn()->stripPointerCasts() == Real) {
Used = true;
break;
@@ -469,7 +469,7 @@ int runEmbedded(const cps::CodeGen &CG) {
C->setTailCall();
B.CreateRet(C);
for (auto &F : M.functions()) {
- if (F.getPersonalityFn() &&
+ if (F.hasPersonalityFn() &&
F.getPersonalityFn()->stripPointerCasts() == Real)
F.setPersonalityFn(Fwd);
}