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

            Bug ID: 25560
           Summary: Emitting additional debug info would allow
                    shrink-wrapping to be used on function with
                    sanitize-like attribute
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedb...@nondot.org
          Reporter: qcolom...@apple.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Created attachment 15307
  --> https://llvm.org/bugs/attachment.cgi?id=15307&action=edit
Without shrink-wrapping

In r253116, we disabled shrink-wrapping on function having a sanitize-like
attribute.
The rational for that change was that the sanitizers need to be able to rebuild
the stack frame anywhere in function and the produced code before (resp. after)
the prologue (resp. epilogue) does not describe how to that.

Indeed, frame settings are defined with cfa directives when the frame pointer
gets actually pushed. However, before that we still have the information
available directly in the frame pointer register, but this is not expressed in
the debug info.

Assuming this is possible to emit such information, it would be nice to teach
the compiler how to do it and then reenable shrink-wrapping when sanitizers
come into play.

I’ve attached the assembly code of a function with and without shrink-wrapping
enable for compiler-rt/test/asan/TestCases/null_deref.cc.

-- 
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