This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/18091] Valgrind errors building libjava
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 3 Jan 2005 22:25:17 -0000
- Subject: [Bug java/18091] Valgrind errors building libjava
- References: <20041020200437.18091.drow@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-03 22:25 -------
Not totally fixed.
The following is not fixed yet:
==21511== Source and destination overlap in memcpy(0x1BE08FEC, 0x1BE08FEC, 5)
==21511== at 0x1B904BCE: memcpy (mac_replace_strmem.c:113)
==21511== by 0x80D37F2: write_classfile (jcf-write.c:2800)
Yes this is harmless but we should not do memcpy at all.
The easy fix would be the following:
if (n > 0)
memcpy (new_ptr, old_ptr, n);
Changed to:
if (n > 0 && new_ptr != old_ptr)
memcpy (new_ptr, old_ptr, n);
The comment above explains how this can happen.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091