* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
@ 2004-10-20 20:24 ` pinskia at gcc dot gnu dot org
2004-10-20 20:27 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-20 20:24 UTC (permalink / raw)
To: java-prs
------- 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|0000-00-00 00:00:00 |2004-10-20 20:24:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
2004-10-20 20:24 ` [Bug java/18091] " pinskia at gcc dot gnu dot org
@ 2004-10-20 20:27 ` pinskia at gcc dot gnu dot org
2004-10-20 20:49 ` mckinlay at redhat dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-20 20:27 UTC (permalink / raw)
To: java-prs
------- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
2004-10-20 20:24 ` [Bug java/18091] " pinskia at gcc dot gnu dot org
2004-10-20 20:27 ` pinskia at gcc dot gnu dot org
@ 2004-10-20 20:49 ` mckinlay at redhat dot com
2004-10-20 21:04 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mckinlay at redhat dot com @ 2004-10-20 20:49 UTC (permalink / raw)
To: java-prs
------- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-10-20 20:49 ` mckinlay at redhat dot com
@ 2004-10-20 21:04 ` pinskia at gcc dot gnu dot org
2004-10-21 14:38 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-20 21:04 UTC (permalink / raw)
To: java-prs
------- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-10-20 21:04 ` pinskia at gcc dot gnu dot org
@ 2004-10-21 14:38 ` cvs-commit at gcc dot gnu dot org
2004-12-16 14:29 ` aph at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-21 14:38 UTC (permalink / raw)
To: java-prs
------- 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: aph@gcc.gnu.org 2004-10-21 14:38:17
Modified files:
gcc/java : jcf-parse.c ChangeLog
Log message:
2004-10-21 Andrew Haley <aph@redhat.com>
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-10-21 14:38 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-16 14:29 ` aph at gcc dot gnu dot org
2005-01-03 22:25 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: aph at gcc dot gnu dot org @ 2004-12-16 14:29 UTC (permalink / raw)
To: java-prs
------- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-12-16 14:29 ` aph at gcc dot gnu dot org
@ 2005-01-03 22:25 ` pinskia at gcc dot gnu dot org
2005-01-21 2:38 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-03 22:25 UTC (permalink / raw)
To: java-prs
------- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-01-03 22:25 ` pinskia at gcc dot gnu dot org
@ 2005-01-21 2:38 ` cvs-commit at gcc dot gnu dot org
2005-01-21 2:39 ` tromey at gcc dot gnu dot org
2005-01-21 2:40 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-21 2:38 UTC (permalink / raw)
To: java-prs
------- 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: tromey@gcc.gnu.org 2005-01-21 02:38:24
Modified files:
gcc/java : ChangeLog jcf-write.c
Log message:
2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-01-21 2:38 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-21 2:39 ` tromey at gcc dot gnu dot org
2005-01-21 2:40 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-01-21 2:39 UTC (permalink / raw)
To: java-prs
------- 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug java/18091] Valgrind errors building libjava
2004-10-20 20:04 [Bug java/18091] New: Valgrind errors building libjava drow at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-01-21 2:39 ` tromey at gcc dot gnu dot org
@ 2005-01-21 2:40 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-21 2:40 UTC (permalink / raw)
To: java-prs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18091
^ permalink raw reply [flat|nested] 11+ messages in thread