[PATCH] DataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.

Kostya Serebryany kcc at google.com
Tue Aug 20 00:57:28 PDT 2013


  LGTM

  An idea for run-time checks. There are two failure modes:
  1. Calling a native-ABI function as if instrumented-ABI
  2. Calling a instrumented-ABI function as if native-ABI

  We can have a thread-local integer is_instrumented_abi_call, which is zero almost all the time.
  Before instrumented-ABI call we increment it.
  In instrumented-ABI function we check that it's 1 (otherwise trap) and set it to 0.
  After instrumented-ABI call we check that it's 0 (otherwise trap).

  This will catch both failure modes.

http://llvm-reviews.chandlerc.com/D1443

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list