https://sourceware.org/bugzilla/show_bug.cgi?id=19381
Bug ID: 19381
Summary: Warn on instructions accessing small memory addresses,
to catch un-tagged immediates
Product: binutils
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: gas
Assignee: unassigned at sourceware dot org
Reporter: josh at joshtriplett dot org
Target Milestone: ---
I recently spent a while debugging an issue caused by the following
instruction:
subq 20, %rsp
That instruction accesses memory at absolute offset 20, rather than the
intended immediate 20 ($20).
To catch cases like this, I would propose a new warning, on by default, that
warns about instructions accessing a memory location less than 4096 (0x3ff).
(Or, on architectures with a different default page size, memory locations less
than the default page size.) In environments that trap null pointer accesses,
such an access will normally trap.
Code that legitimately accesses such absolute addresses (such as code setting
up a real-mode interrupt vector table) could easily turn this warning off.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils