[all-commits] [llvm/llvm-project] 4deda5: [DFSan] Handle mmap() calls before interceptors ar...

Matt Morehouse via All-commits all-commits at lists.llvm.org
Wed Aug 19 15:08:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4deda57106f7c9b982a49cb907c33e3966c8de7f
      https://github.com/llvm/llvm-project/commit/4deda57106f7c9b982a49cb907c33e3966c8de7f
  Author: Matt Morehouse <mascasa at google.com>
  Date:   2020-08-19 (Wed, 19 Aug 2020)

  Changed paths:
    M compiler-rt/lib/dfsan/dfsan_interceptors.cpp
    A compiler-rt/test/dfsan/interceptors.c

  Log Message:
  -----------
  [DFSan] Handle mmap() calls before interceptors are installed.

InitializeInterceptors() calls dlsym(), which calls calloc().  Depending
on the allocator implementation, calloc() may invoke mmap(), which
results in a segfault since REAL(mmap) is still being resolved.

We fix this by doing a direct syscall if interceptors haven't been fully
resolved yet.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D86168




More information about the All-commits mailing list