PR 18091: Valgrind errors building libjava
Per Bothner
per@bothner.com
Thu Oct 21 18:25:00 GMT 2004
Andrew Haley wrote:
> A couple of lines seemed to be missing from Per's checkin.
Oops, indeed. I took a look and noticed that I didn't free 'buf'.
I also think there is a fencepost error in your patch: the variable
'i' in your patch is the length of the package prefix *including*
the last '.', while in the original and the attached patch it is
the length of the package prefix *excluding* the last '.'. But the
loop to replace '.' is executed i+1 times either way.
Finally, a micro-optimization to remove the memcpy.
I haven't tested it, except to see that it compiles.
Could you look it over and try it out?
--
--Per Bothner
per@bothner.com http://per.bothner.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: set_source.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041021/be510634/attachment.ksh>
More information about the Java-patches
mailing list