[Bug java/18091] Valgrind errors building libjava
-- What|Removed |Added Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From tromey at gcc dot gnu dot org 2005-01-21 02:39 --- I checked in Andrew Pinski's fix. -- What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-21 02:38 --- Subject: Bug 18091 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-01-21 02:38:24 Modified files: gcc/java : ChangeLog jcf-write.c Log message: 2005-01-20 Andrew Pinski <[EMAIL PROTECTED]> PR java/18091: * jcf-write.c (perform_relocations): Don't call memcpy if source and destination are the same. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1530&r2=1.1531 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-write.c.diff?cvsroot=gcc&r1=1.158&r2=1.159 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- 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
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From aph at gcc dot gnu dot org 2004-12-16 14:29 --- comment -- What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-21 14:38 --- Subject: Bug 18091 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2004-10-21 14:38:17 Modified files: gcc/java : jcf-parse.c ChangeLog Log message: 2004-10-21 Andrew Haley <[EMAIL PROTECTED]> PR java/18091: * jcf-parse.c (set_source_filename): Add code to build new sfname. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-parse.c.diff?cvsroot=gcc&r1=1.176&r2=1.177 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1489&r2=1.1490 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-20 21:04 --- I think the "unitialized conditional move" will get fixed when: ==21620== Conditional jump or move depends on uninitialised value(s) ==21620==at 0x80C4165: get_attribute (jcf-parse.c:160) is fixed. See comment #1 where I show the problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From mckinlay at redhat dot com 2004-10-20 20:49 --- For the memcpy() thing, in the error given we seem to be relocating something to the exact same position. In this case the memcpy() should be harmless. But, maybe it is possible to get real overlapping relocations. Its probably best just to replace the memcpy() with a memmove() here. I'm not sure the "unitialized conditional move" errors are really bugs. I've seen this a bit when running valgrind on code compiled with recent GCCs ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-20 20:27 --- memcpy(0x1BE08FEC, 0x1BE08FEC, 5) new_ptr -= n; old_ptr -= n; if (n > 0) memcpy (new_ptr, old_ptr, n); Someone needs to look into this part though because I don't understand the code at all. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
[Bug java/18091] Valgrind errors building libjava
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-20 20:24 --- This is definitely a bug: /* Concatenate current package prefix with new sfname. */ char *buf = xmalloc (i+new_len+3); /* Replace '.' by DIR_SEPARATOR. */ for (; i >= 0; i--) { if (buf[i] == '.') buf[i] = DIR_SEPARATOR; } This could cause problems. -- What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2004-10-20 20:24:29 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091