public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/114540] New: Use of atoi allows invalid registers
@ 2024-04-01  4:32 pinskia at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: pinskia at gcc dot gnu.org @ 2024-04-01  4:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114540

            Bug ID: 114540
           Summary: Use of atoi allows invalid registers
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Blocks: 44574
  Target Milestone: ---

varasm.cc (decode_reg_name_and_count) uses atoi which means it can allow some
invalid code through testcase:
```
void f()
{
        asm("":::"4294967296");
}
register int a asm("4294967296");
``` 
also Options: `-fstack-limit-register=4294967296 -ffixed-4294967296`.

Filed seperately from PR 44574 so it can be tracked seperately.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44574
[Bug 44574] Avoid use of atoi

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-01  4:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-01  4:32 [Bug middle-end/114540] New: Use of atoi allows invalid registers pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).