Skip to content

Conversation

@fhahn
Copy link
Contributor

@fhahn fhahn commented Nov 28, 2024

This adds a pass to replace function bodies with 'unreachable' and a script that checks if the result still verifies.

This can be used to find functions in llvm-lit tests that have unconditional UB using

llvm-lit -j4 -sv -Dopt=~/find-ub-in-test.sh

Examples of found & fixed UB:

Differential Revision: https://reviews.llvm.org/D127607

This adds a pass to replace function bodies with 'unreachable' and a
script that checks if the result still verifies.

This can be used to find functions in llvm-lit tests that have
unconditional UB using

    llvm-lit -j4 -sv -Dopt=~/find-ub-in-test.sh

Examples of found & fixed UB:
 * b8d728a
 * 684a82f

Differential Revision: https://reviews.llvm.org/D127607
@dtcxzyw
Copy link
Member

dtcxzyw commented Dec 13, 2024

If the function contains UB, alive2 will give a warning like WARNING: Source function is always UB..

@fhahn
Copy link
Contributor Author

fhahn commented Jan 28, 2025

Yep the PR comes from a time when Alive2 didn't emit such a warning yet

@fhahn fhahn closed this Jan 28, 2025
@fhahn fhahn deleted the tmp-to-unreachable branch September 5, 2025 08:43
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.

2 participants