From 131b1594781cc92806a66672010c3c097e30bf4f Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 16:48:12 +0000 Subject: 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 --- tools/driver/EmbeddedRunner.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') 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); } -- cgit v1.3.1-4-g156e