[PATCH] D13068: [asan] Versioned interceptor for pthread_create.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 14:05:26 PDT 2015


eugenis created this revision.
eugenis added reviewers: samsonov, dvyukov, kcc.
eugenis added a subscriber: llvm-commits.
eugenis set the repository for this revision to rL LLVM.

This fixes a crash in pthread_create on linux/i386 due to abi
incompatibility between intercepted and non-intercepted functions.

See the test case for more details.

This is ugly, of course.
Other ideas:
1. Deprecate static runtime and provide version-specific interceptors in the shared runtime library. Versioned symbols are not supported in executables, hence the need for the shared runtime. This is the _correct_ fix, but we can not really deprecate static runtime, though.
2. Add interceptors for all multi-version libc functions. I see ~12 of those that we don't have interceptors for yet. This is not exactly right either, because we end up with the old abi we could not match the abi of the application.

Repository:
  rL LLVM

http://reviews.llvm.org/D13068

Files:
  lib/asan/asan_interceptors.cc
  lib/asan/asan_interceptors.h
  lib/interception/interception_linux.h
  test/asan/TestCases/Linux/pthread_create_version.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13068.35413.patch
Type: text/x-patch
Size: 4103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150922/c19deb20/attachment.bin>


More information about the llvm-commits mailing list