bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/19381] New: Warn on instructions accessing small memory address


From: josh at joshtriplett dot org
Subject: [Bug gas/19381] New: Warn on instructions accessing small memory addresses, to catch un-tagged immediates
Date: Sun, 20 Dec 2015 05:41:43 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]