Repository navigation
Codegen: a call has a target (#1119) - #3386
Merged
Merged
Conversation
…call, stops the compiler on a missing, undef, poison or null target (LLVM's verifier accepts call undef) (#1119)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1119.
with analyze … audit:alland LLVM's verifier both accepted IR that calledundef(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,poisonor the null pointer constant: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-checksgreen.