This is an archive of the discontinued LLVM Phabricator instance.

enable noundef analysis with -fsanitize-memory-param-retval
ClosedPublic

Authored by kda on Jan 14 2022, 2:16 AM.

Details

Summary

Enable noundef analysis (-enable-noundef-analysis) via the -fsanitize-memory-param-retval clang flag.
This completes the work found in:

Depends on D116633

Diff Detail

Event Timeline

kda created this revision.Jan 14 2022, 2:16 AM
kda requested review of this revision.Jan 14 2022, 2:16 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 14 2022, 2:16 AM
Herald added subscribers: Restricted Project, cfe-commits. · View Herald Transcript
kda updated this revision to Diff 399937.Jan 14 2022, 2:17 AM

add missing files.

vitalybuka accepted this revision.Jan 14 2022, 7:47 AM

Nice!

This completes the work found in:

It's too late for this set of patches, but phabricator supports "Depends on" comments (I guess only of the first patch upload), and manual editing of "parent/child" revisions. Check "Edit Related Revisions..." in the top right corner.
So you can create convenient "Stack" tab like in liihttps://reviews.llvm.org/D117286

clang/include/clang/Driver/Options.td
1678
This revision is now accepted and ready to land.Jan 14 2022, 7:47 AM

Just noticed, -enable-noundef-analysis is missing tests undef llvm/llvm-project/clang/test/Driver/
Can you add few near maybe before llvm-project/clang/test/Driver/clang_f_opts.c:531 (just before discard-value-names tests)

Just noticed, -enable-noundef-analysis is missing tests undef llvm/llvm-project/clang/test/Driver/
Can you add few near maybe before llvm-project/clang/test/Driver/clang_f_opts.c:531 (just before discard-value-names tests)

Actually noundef is not f_opt, and I am not sure how or do we need to test ImpliedByAnyOf in Driver.

kda edited the summary of this revision. (Show Details)Jan 14 2022, 12:34 PM
kda added a comment.Jan 14 2022, 12:36 PM

Nice!

This completes the work found in:

It's too late for this set of patches, but phabricator supports "Depends on" comments (I guess only of the first patch upload), and manual editing of "parent/child" revisions. Check "Edit Related Revisions..." in the top right corner.
So you can create convenient "Stack" tab like in liihttps://reviews.llvm.org/D117286

I added "Depends On: D116633" (but I am confused because it appears crossed out.)

Nice!

This completes the work found in:

It's too late for this set of patches, but phabricator supports "Depends on" comments (I guess only of the first patch upload), and manual editing of "parent/child" revisions. Check "Edit Related Revisions..." in the top right corner.
So you can create convenient "Stack" tab like in liihttps://reviews.llvm.org/D117286

I added "Depends On: D116633" (but I am confused because it appears crossed out.)

Crossed out means submitted. It's OK.
It should be "Depends On D116633", no ":" (at least that's how I do and it works)
I guess it will work only on the first patch upload, After then you need to "Edit Related Revisions..." manually.

kda edited the summary of this revision. (Show Details)Jan 14 2022, 1:21 PM
kda added a comment.Jan 14 2022, 1:46 PM

Just noticed, -enable-noundef-analysis is missing tests undef llvm/llvm-project/clang/test/Driver/
Can you add few near maybe before llvm-project/clang/test/Driver/clang_f_opts.c:531 (just before discard-value-names tests)

Actually noundef is not f_opt, and I am not sure how or do we need to test ImpliedByAnyOf in Driver.

The CodeGen tests cover these interactions.
When I was building this, I added the tests first (they failed), then I added the ImpliedByAnyOf one-liner, and the tests passed.

To clarify: LGTM as-is, I don't expect any changes.

This revision was automatically updated to reflect the committed changes.