public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/24120] New: jc1 incorrectly uses libiberty hashes
@ 2005-09-29 12:38 kostikbel at ukr dot net
  2005-09-29 17:18 ` [Bug java/24120] " tromey at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: kostikbel at ukr dot net @ 2005-09-29 12:38 UTC (permalink / raw)
  To: java-prs

(At least ) in gcc/java/jfc-io.c,
the memoized_dirlists hash is created by the call
 htab_create (37, htab_hash_string <-- NOTE THIS, memoized_dirlist_lookup_eq, NULL);
Actually, htab contains the structures (memoized_dirlist_entry), not the strings.

All went ok until hashtab.c decides it need to expand hash. Then,
libiberty/hashtab.c, htab_expand function tries to calculate hashes of hash entries
itself, calling htab_hash_string on elements of hash, that are not the strings,
but the structures.

When this happens, under right conditions jc1 crashes with SIGSEGV.
I found this on FreeBSD 6-CURRENT with debug malloc that fills uninitialized
storage with 0xd0. The problem is platform independent.

It seems that such code is present at least in 3.4.4, 4.0.2 and HEAD.

-- 
           Summary: jc1 incorrectly uses libiberty hashes
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kostikbel at ukr dot net
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24120


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-24120-10933@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-10-03 14:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-29 12:38 [Bug java/24120] New: jc1 incorrectly uses libiberty hashes kostikbel at ukr dot net
2005-09-29 17:18 ` [Bug java/24120] " tromey at gcc dot gnu dot org
2005-09-30  0:34 ` cvs-commit at gcc dot gnu dot org
2005-09-30  0:36 ` cvs-commit at gcc dot gnu dot org
2005-09-30  0:37 ` tromey at gcc dot gnu dot org
2005-09-30  8:25 ` kostikbel at ukr dot net
     [not found] <bug-24120-10933@http.gcc.gnu.org/bugzilla/>
2005-10-03 14:23 ` 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).