public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called
@ 2005-03-02 3:40 soleger at nc dot rr dot com
2005-03-02 7:54 ` [Bug libgcj/20273] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: soleger at nc dot rr dot com @ 2005-03-02 3:40 UTC (permalink / raw)
To: java-prs
File: gcc/libjava/java/util/LinkedHashMap.java
CVS Version: 1.6
When using "accessOrder"-based sorting in LinkedHashMap, the linked list appears
to become broken after calling get(). I believe that this is due to a missing
line in the access() function. I believe that the following line needs to be
added after line 188:
root.pred = this;
This will relink "root.pred" to the "this" object which has been moved to the
"tail" of the linked list. Otherwise, root.pred will point to the
2nd-from-the-tail element which breaks the semantics of the linked list used in
the class. I will post some test code that exposes this problem shortly.
--
Summary: LinkedHashMap breaks linked list when access() is called
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: soleger at nc dot rr dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org,mckinlay at redhat dot com
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/20273] LinkedHashMap breaks linked list when access() is called
2005-03-02 3:40 [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called soleger at nc dot rr dot com
@ 2005-03-02 7:54 ` pinskia at gcc dot gnu dot org
2005-03-02 10:13 ` soleger at nc dot rr dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-02 7:54 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-02 03:17 -------
Do you have a testcase?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/20273] LinkedHashMap breaks linked list when access() is called
2005-03-02 3:40 [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called soleger at nc dot rr dot com
2005-03-02 7:54 ` [Bug libgcj/20273] " pinskia at gcc dot gnu dot org
@ 2005-03-02 10:13 ` soleger at nc dot rr dot com
2005-03-02 12:55 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: soleger at nc dot rr dot com @ 2005-03-02 10:13 UTC (permalink / raw)
To: java-prs
------- Additional Comments From soleger at nc dot rr dot com 2005-03-02 03:34 -------
Created an attachment (id=8309)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8309&action=view)
Java test case for LinkedHashMapEntry.access() bug
Simply compile and run the class with gcj. The expected output should be:
Key: 1
Key: 2
Key: 3
but the output I am getting is:
Key: 1
Key: 2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/20273] LinkedHashMap breaks linked list when access() is called
2005-03-02 3:40 [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called soleger at nc dot rr dot com
2005-03-02 7:54 ` [Bug libgcj/20273] " pinskia at gcc dot gnu dot org
2005-03-02 10:13 ` soleger at nc dot rr dot com
@ 2005-03-02 12:55 ` pinskia at gcc dot gnu dot org
2005-05-30 2:01 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-02 12:55 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-02 03:40 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-03-02 03:40:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/20273] LinkedHashMap breaks linked list when access() is called
2005-03-02 3:40 [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called soleger at nc dot rr dot com
` (2 preceding siblings ...)
2005-03-02 12:55 ` pinskia at gcc dot gnu dot org
@ 2005-05-30 2:01 ` cvs-commit at gcc dot gnu dot org
2005-05-30 2:02 ` cvs-commit at gcc dot gnu dot org
2005-05-30 2:08 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-30 2:01 UTC (permalink / raw)
To: java-prs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-30 02:01 -------
Subject: Bug 20273
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tromey@gcc.gnu.org 2005-05-30 02:01:15
Modified files:
libjava : ChangeLog
libjava/java/util: LinkedHashMap.java
Log message:
2005-05-29 Michael Koch <konqueror@gmx.de>
PR libgcj/20273:
* java/util/LinkedHashMap.java (access): Set 'root.pred'.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3638&r2=1.3639
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/util/LinkedHashMap.java.diff?cvsroot=gcc&r1=1.6&r2=1.7
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/20273] LinkedHashMap breaks linked list when access() is called
2005-03-02 3:40 [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called soleger at nc dot rr dot com
` (3 preceding siblings ...)
2005-05-30 2:01 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-30 2:02 ` cvs-commit at gcc dot gnu dot org
2005-05-30 2:08 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-30 2:02 UTC (permalink / raw)
To: java-prs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-30 02:02 -------
Subject: Bug 20273
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: tromey@gcc.gnu.org 2005-05-30 02:02:03
Modified files:
libjava : ChangeLog
libjava/java/util: LinkedHashMap.java
Log message:
2005-05-29 Michael Koch <konqueror@gmx.de>
PR libgcj/20273:
* java/util/LinkedHashMap.java (access): Set 'root.pred'.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.3391.2.79&r2=1.3391.2.80
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/util/LinkedHashMap.java.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.6&r2=1.6.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/20273] LinkedHashMap breaks linked list when access() is called
2005-03-02 3:40 [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called soleger at nc dot rr dot com
` (4 preceding siblings ...)
2005-05-30 2:02 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-30 2:08 ` tromey at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-05-30 2:08 UTC (permalink / raw)
To: java-prs
------- Additional Comments From tromey at gcc dot gnu dot org 2005-05-30 02:08 -------
I checked this in to 4.0, the trunk, and Classpath.
I put the test case in Mauve.
I'm not planning to put the fix into 3.4.x, but someone could if
they wanted to.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20273
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-05-30 2:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-02 3:40 [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called soleger at nc dot rr dot com
2005-03-02 7:54 ` [Bug libgcj/20273] " pinskia at gcc dot gnu dot org
2005-03-02 10:13 ` soleger at nc dot rr dot com
2005-03-02 12:55 ` pinskia at gcc dot gnu dot org
2005-05-30 2:01 ` cvs-commit at gcc dot gnu dot org
2005-05-30 2:02 ` cvs-commit at gcc dot gnu dot org
2005-05-30 2:08 ` tromey at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).