https://bugs.llvm.org/show_bug.cgi?id=33857

            Bug ID: 33857
           Summary: [SanitizerCoverage] implement instrumentation for
                    lowest stack pointer value
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: masc...@google.com
          Reporter: k...@google.com
                CC: llvm-bugs@lists.llvm.org

r308577 adds a libFuzzer logic to use recursion depth as a signal
(inspired by
https://guidovranken.wordpress.com/2017/07/08/libfuzzer-gv-new-techniques-for-dramatically-faster-fuzzing/,
"Stack-depth-guided fuzzing")

We need to extract the recursion depth with a dedicated inlined compiler
instrumentation. 

it should be something like -fsanitize-coverage=stack-depth
that would insert this code at the beginning of every function:

uintptr_t current_stack = __builtin_frame_address(0);
if (__sanitizer_cov_lowest_stack > current_stack)
 __sanitizer_cov_lowest_stack = current_stack;


// Users should declare this in their code (e.g. in libFuzzer)
thread_local uintptr __sanitizer_cov_lowest_stack;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to