[compiler-rt] r182005 - [asan] symbolize when possible, even if ASAN_SYMBOLIZER_PATH is not provided. On Linux this will use dl_iterate_phdr instead of /proc/self/maps, even if the symbolizer is not installed

Alexander Potapenko glider at google.com
Thu May 23 00:43:38 PDT 2013


This doesn't work with Chrome's sandboxes.

On Thu, May 16, 2013 at 5:04 PM, Kostya Serebryany <kcc at google.com> wrote:
> Author: kcc
> Date: Thu May 16 08:04:29 2013
> New Revision: 182005
>
> URL: http://llvm.org/viewvc/llvm-project?rev=182005&view=rev
> Log:
> [asan] symbolize when possible, even if ASAN_SYMBOLIZER_PATH is not provided. On Linux this will use dl_iterate_phdr instead of /proc/self/maps, even if the symbolizer is not installed
>
> Modified:
>     compiler-rt/trunk/lib/asan/asan_rtl.cc
>     compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_linux.cc
>
> Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=182005&r1=182004&r2=182005&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
> +++ compiler-rt/trunk/lib/asan/asan_rtl.cc Thu May 16 08:04:29 2013
> @@ -129,7 +129,7 @@ static void ParseFlagsFromString(Flags *
>  void InitializeFlags(Flags *f, const char *env) {
>    CommonFlags *cf = common_flags();
>    cf->external_symbolizer_path = GetEnv("ASAN_SYMBOLIZER_PATH");
> -  cf->symbolize = (cf->external_symbolizer_path != 0);
> +  cf->symbolize = true;
>    cf->malloc_context_size = kDefaultMallocContextSize;
>    cf->fast_unwind_on_fatal = false;
>    cf->fast_unwind_on_malloc = true;
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_linux.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_linux.cc?rev=182005&r1=182004&r2=182005&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_linux.cc (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_linux.cc Thu May 16 08:04:29 2013
> @@ -126,7 +126,7 @@ bool StartSymbolizerSubprocess(const cha
>  #if SANITIZER_ANDROID
>  uptr GetListOfModules(LoadedModule *modules, uptr max_modules,
>                        string_predicate_t filter) {
> -  UNIMPLEMENTED();
> +  return 0;
>  }
>  #else  // SANITIZER_ANDROID
>  typedef ElfW(Phdr) Elf_Phdr;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



-- 
Alexander Potapenko
Software Engineer
Google Moscow



More information about the llvm-commits mailing list