[Bug target/57589] New: Linux powerpc -mcpu=native returns pointer to variable on stack in driver-rs6000.c

meissner at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 11 18:24:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57589

            Bug ID: 57589
           Summary: Linux powerpc -mcpu=native returns pointer to variable
                    on stack in driver-rs6000.c
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: meissner at gcc dot gnu.org

In looking at driver-rs6000.c, I noticed that elf_platform (under Linux) reads
the auxv data structure into an auto array, and then returns a pointer to that
array.  It should either make the buffer static, or use xstrdup to get a unique
string.



More information about the Gcc-bugs mailing list