[cfe-dev] Option handling (support) of -fsanitize=use-after-scope

Vitaly Buka via cfe-dev cfe-dev at lists.llvm.org
Wed May 11 13:52:36 PDT 2016


On Wed, May 11, 2016 at 6:18 AM Martin Liška <cfe-dev at lists.llvm.org> wrote:

> Hello.
>
> I've been working on use-after-scope sanitizer enablement in the GCC
> compiler ([1]) and
> as I've read following submit request ([2]), the LLVM compiler started to
> utilize following option:
> -mllvm -asan-use-after-scope=1
>
> My initial attempt was to introduce a new option value for -fsanitize
> option (which would make both LLVM and GCC
> option compatible). Following the current behavior of the LLVM, I would
> have to add a new --param which would
> lead to a divergence. Is the suggested approach alterable for LLVM
> community?
>
> I would also suggest following default behavior:
> - If -fsanitize=address or -fsanitize=kernel-address is enabled, the
> use-after-scope sanitization should be enabled
>

This is the plan, but after feature is ready to be enabled by default.


> - Similarly, providing -fuse-after-scope should enable address
> sanitization (either use-space or kernel-space)
>

We'd like to go with:
-fsanitize-address-use-after-scope
-fno-sanitize-address-use-after-scope
for consistency with -fsanitize-memory-use-after-dtor from MemorySanitizer


>
> Thank you for feedback,
> Martin
>
> [1] https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00468.html
> [2] http://reviews.llvm.org/D19347
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160511/b44a752c/attachment.html>


More information about the cfe-dev mailing list