[LLVMbugs] [Bug 19267] New: Add a feature to clobber non-calle-save regs in the prolog.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 27 14:42:11 PDT 2014


            Bug ID: 19267
           Summary: Add a feature to clobber non-calle-save regs in the
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: atrick at apple.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Pretty simple. Just write some trash value into all registers in the prolog
that aren't preserved by the function's calling convention.

We can add a function attribute to control this.
This feature could help stress test things like
- liveness across call site
- a managed runtime that saves/restores context around calls to native code
- the stack map liveness feature that reports 

In the case of stackmap liveness, we could clobber dead registers at the point
of the stackmap to verify our own analysis. This would be a more direct way to
verify the liveness analysis.

There is some speculation that this could harden code against security
vulnerabilities, but I haven't confirmed that. 

For my immediate goals, verification in the runtime may be sufficient. But I
want to float the idea early of having LLVM generate clobber regs to get input
from others.

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/20140327/69ae8a02/attachment.html>

More information about the llvm-bugs mailing list