[Bug c++/35483] GCC on AIX doesn't support dollar in symbols name.
dje at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 2 21:31:00 GMT 2008
------- Comment #6 from dje at gcc dot gnu dot org 2008-10-02 21:30 -------
+ strip = (char *)ggc_alloc_string (name, len);
+
+ for (len = 0; name[len]; len++)
+ if (name[len] == '$')
+ strip[len] = '_';
+ else
+ strip[len] = name[len];
+ strip[len] = 0;
+
+ return strip;
It is not safe to edit a ggc_alloc_string-allocated string in place. This
should be
+ strip = (char *)alloca (name, len);
...
+ return ggc_alloc_string (strip, len);
Also, using fixed-size 256 byte buffers is not safe because they can overflow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35483
More information about the Gcc-bugs
mailing list