This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix a segfault in h8300 port.
law@redhat.com wrote:-
> But you have to pass the length including the terminator to
> ggc_alloc_string. I assumed that's the underlying bug you're fixing
> (the old code didn't include the terminator in the length, which
> could potentially lead to a segfault).
The comment and code in stringpool.c clearly indicates that, if a
length is passed in, it shouldn't include the NUL.
Neil.