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

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).