This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]