[PATCH] D34554: [ELF] FIx use-after-return of archive path
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 08:45:04 PST 2018
Igor Kudrin via Phabricator <reviews at reviews.llvm.org> writes:
> Index: test/ELF/whole-archive-name.s
> ===================================================================
> --- /dev/null
> +++ test/ELF/whole-archive-name.s
> @@ -0,0 +1,15 @@
> +// REQUIRES: x86
> +// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
> +// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux \
> +// RUN: %p/Inputs/whole-archive-name.s -o %tfoo.o
> +// RUN: mkdir -p %t.dir
> +// RUN: rm -f %t.dir/libfoo.a
> +// RUN: llvm-ar rcs %t.dir/libfoo.a %tfoo.o
> +// RUN: ld.lld -L%t.dir %t.o --whole-archive -lfoo -o %t -Map=- | FileCheck %s
Which sanitizer would catch this? The original description was saying
"stack allocated", but it was a std::string, so it should be visible to
asan/valgrind, no?
Cheers,
Rafael
More information about the llvm-commits
mailing list