[llvm-bugs] [Bug 32227] New: Fill between executable sections with trap instructions

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 10 11:27:58 PST 2017


http://bugs.llvm.org/show_bug.cgi?id=32227

            Bug ID: 32227
           Summary: Fill between executable sections with trap
                    instructions
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: ruiu at google.com
                CC: llvm-bugs at lists.llvm.org

Currently, LLD leaves padding between executable sections as-is, so they are 0.
That is not desirable for a few reasons.

1. Disassemblers would interpret the sequences of 0 bytes at end of each
function as machine instructions and print out bogus disassembly.

2. Leaving executable 0 bytes could potentially make some attack easier.

We want to fill gaps with trap instructions. On x86 and x86-64, that is 0xcc,
for example.

-- 
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/20170310/04a7426b/attachment.html>


More information about the llvm-bugs mailing list