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

Reply via email to