Skip to content

Codegen: a call has a target (#1119) - #3386

Merged
ehartford merged 1 commit into
mainfrom
call-target-defined
Nov 17, 2026
Merged

ehartford merged 1 commit into
mainfrom
call-target-defined

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Fixes #1119.

with analyze … audit:all and LLVM's verifier both accepted IR that called undef (a default method had been skipped; the vtable slot was empty too). The defect behind that report was fixed long ago; what remained was that nothing would say so if it happened again.

Every call codegen emits is built by LlvmBridge.wl_build_call (186 callers). It now stops the compiler when the target is missing, undef, poison or the null pointer constant:

internal compiler error: BUG: codegen built a call whose target is undefined (#1119)

That is the no-silent-fallback rule applied at the one owner, and stronger than an audit: an audit reports after the fact and only when asked, this refuses to produce the binary. The compiler builds itself and every test with the check on, so no call in the tree has such a target.

Test: test/internals_compiler/llvm_call_target_defined_test.w (builds a call with no target; expects the message and exit 134).

Battery GREEN (982b8cc); :release-checks green.

…call, stops the compiler on a missing, undef, poison or null target (LLVM's verifier accepts call undef) (#1119)
@ehartford
ehartford merged commit 9bf77c1 into main Nov 17, 2026
@ehartford
ehartford deleted the call-target-defined branch November 17, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ABI audit accepts an undefined call target when a default method is omitted

1 participant