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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to