[llvm-bugs] [Bug 33857] New: [SanitizerCoverage] implement instrumentation for lowest stack pointer value

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 19 18:41:43 PDT 2017


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: mascasa at google.com
          Reporter: kcc at google.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170720/b8eab3e1/attachment.html>


More information about the llvm-bugs mailing list