public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "soleger at nc dot rr dot com" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug libgcj/20273] New: LinkedHashMap breaks linked list when access() is called
Date: Wed, 02 Mar 2005 03:40:00 -0000	[thread overview]
Message-ID: <20050302025632.20273.soleger@nc.rr.com> (raw)

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


             reply	other threads:[~2005-03-02  2:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-02  3:40 soleger at nc dot rr dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050302025632.20273.soleger@nc.rr.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).