[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/test/Driver/fsanitize-memory-param-retval.c:8-9 + +// RUN: %clang -target aarch64-linux-gnu -fsyntax-only %s -fsanitize=memory -fsanitize-memory-param-retval -c -### 2>&1 | FileCheck --check-prefix=11 %s +// 11:

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/test/Driver/fsanitize-memory-param-retval.c:8-9 + +// RUN: %clang -target aarch64-linux-gnu -fsyntax-only %s -fsanitize=memory -fsanitize-memory-param-retval -c -### 2>&1 | FileCheck --check-prefix=11 %s +// 11:

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa0458b531cfc: Add -fsanitize-address-param-retval to clang. (authored by kda). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:362 + MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel, + CGOpts.SanitizeMemoryParamRetval != 0})); vitalybuka wrote: > we use implicit cast

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-14 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 399917. kda marked an inline comment as done. kda added a comment. rename file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files:

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-13 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka accepted this revision. vitalybuka added a comment. This revision is now accepted and ready to land. LGTM with few nits Comment at: clang/lib/CodeGen/BackendUtil.cpp:362 + MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel, +

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-13 Thread Kevin Athey via Phabricator via cfe-commits
kda added a comment. PTAL Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-13 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 399826. kda added a comment. Herald added a subscriber: ormris. enable eager-checks with -fsanitize-memory-param-retval Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-13 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 399784. kda added a comment. Herald added subscribers: luke957, s.egerton, simoncook. Drop attribute changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files:

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-12 Thread Kevin Athey via Phabricator via cfe-commits
kda added a comment. >>> This needs a clang/test/Driver test to show that `%clang >>> -fsanitize-memory-param-retval` translates to CC1 >>> `-fsanitize-memory-param-retval`. >> >> Could you point me to an example? > > `test/Driver/fpatchable-function-entry.c` `test/Driver/fbinutils-version.c`

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-12 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 399362. kda added a comment. add test to validate that flag does not conflict with enable-noundef-analysis Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files:

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D116633#3236352 , @kda wrote: > In D116633#3226228 , @MaskRay wrote: > >> This needs a clang/test/Driver test to show that `%clang >> -fsanitize-memory-param-retval` translates to CC1

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-11 Thread Kevin Athey via Phabricator via cfe-commits
kda added a comment. In D116633#3226228 , @MaskRay wrote: > This needs a clang/test/Driver test to show that `%clang > -fsanitize-memory-param-retval` translates to CC1 > `-fsanitize-memory-param-retval`. Could you point me to an example?

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-11 Thread Kevin Athey via Phabricator via cfe-commits
kda added a comment. PTAL Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-11 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 399163. kda added a comment. A few improvements. - Add -fsanitize-address-param-retval to clang. - updated flag help text and dropped use of flag (to be picked up later). - adjust help text - refined rendering of help text - add code generation - introduce

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-07 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "Detect uninitialized parameters and return values.">>, +Group; kda wrote: > kda wrote: > > MaskRay wrote: > > > MaskRay wrote: >

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-07 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 398266. kda added a comment. refined rendering of help text Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-07 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "Detect uninitialized parameters and return values.">>, +Group; kda wrote: > MaskRay wrote: > > MaskRay wrote: > > > `--help`

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-07 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 398263. kda added a comment. adjust help text Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-07 Thread Kevin Athey via Phabricator via cfe-commits
kda marked 2 inline comments as done. kda added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "Detect uninitialized parameters and return values.">>, +Group; MaskRay wrote: > MaskRay

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "Detect uninitialized parameters and return values.">>, +Group; MaskRay wrote: > `--help` messages don't have periods. Does

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This needs a clang/test/Driver test to show that `%clang -fsanitize-memory-param-retval` translates to CC1 `-fsanitize-memory-param-retval`. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "Detect

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2384 +if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && +ArgNoUndef) vitalybuka wrote: > vitalybuka wrote: > > kda wrote: > > > eugenis

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. I don't think we need -Xclang? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 ___ cfe-commits mailing list

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-06 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. we probably should to move clang parts from D116634 into this patch? Comment at: clang/include/clang/Basic/CodeGenOptions.def:234 ///< destructors are emitted.

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2384 +if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && +ArgNoUndef) eugenis wrote: > vitalybuka wrote: > > vitalybuka wrote: > > > @eugenis

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-05 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2384 +if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && +ArgNoUndef) vitalybuka wrote: > vitalybuka wrote: > > @eugenis Would be better

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 397648. kda added a comment. trying again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "eager param-retval uninitialized use detection in MemorySanitizer">>, +Group; vitalybuka wrote: > Maybe "Detect initialized

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-05 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 397647. kda marked an inline comment as done. kda added a comment. updated help text and dropped implementation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 Files:

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2384 +if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && +ArgNoUndef) vitalybuka wrote: > @eugenis Would be better to force

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a subscriber: eugenis. vitalybuka added inline comments. Comment at: clang/include/clang/Driver/Options.td:1675 + PosFlag, NegFlag, + BothFlags<[], "eager param-retval uninitialized use detection in MemorySanitizer">>, +Group;

[PATCH] D116633: Add -fsanitize-address-param-retval to clang.

2022-01-04 Thread Kevin Athey via Phabricator via cfe-commits
kda created this revision. kda added a reviewer: vitalybuka. Herald added subscribers: dexonsmith, dang. kda requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With the introduction of this flag, it is no longer necessary to enable noundef