Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Executable area not filled with traps #35826

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR36853
Status NEW
Importance P enhancement
Reported by Rafael Ávila de Espíndola (rafael@espindo.la)
Reported on 2018-03-21 09:15:17 -0700
Last modified on 2019-04-08 10:09:58 -0700
Version unspecified
Hardware PC Linux
CC anng.sw@gmail.com, emaste@freebsd.org, grimar@accesssoftek.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Given

        nop

        .section .foo,"ax"
        .align 16
        nop

We produce

90 cc cc cc cc cc cc cc  cc cc cc cc cc cc cc cc

When 90 is the nop in .text and cc are the traps.

But if we add ".zero 0x1000" to the end of the file, lld will produce

90 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
Quuxplusone commented 6 years ago

Fix: https://reviews.llvm.org/D44775

Quuxplusone commented 6 years ago

Rui's patch fixing that is: https://reviews.llvm.org/D44943

Quuxplusone commented 6 years ago

D44943 has been accepted.