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

* [Bug java/24120] jc1 incorrectly uses libiberty hashes
  2005-09-29 12:38 [Bug java/24120] New: jc1 incorrectly uses libiberty hashes kostikbel at ukr dot net
@ 2005-09-29 17:18 ` tromey at gcc dot gnu dot org
  2005-09-30  0:34 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-09-29 17:18 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2005-09-29 17:18 -------
I'm testing a patch.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |tromey at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-29 17:18:35
               date|                            |


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug java/24120] jc1 incorrectly uses libiberty hashes
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-30  0:34 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-30 00:33 -------
Subject: Bug 24120

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	tromey@gcc.gnu.org	2005-09-30 00:32:45

Modified files:
	gcc/java       : ChangeLog jcf-io.c 

Log message:
	PR java/24120:
	* jcf-io.c (memoized_dirlist_hash): New function.
	(caching_stat): Use it.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1556.2.30&r2=1.1556.2.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-io.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.53.18.1&r2=1.53.18.2



-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug java/24120] jc1 incorrectly uses libiberty hashes
  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
  4 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-30  0:36 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-30 00:35 -------
Subject: Bug 24120

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2005-09-30 00:33:27

Modified files:
	gcc/java       : ChangeLog jcf-io.c 

Log message:
	PR java/24120:
	* jcf-io.c (memoized_dirlist_hash): New function.
	(caching_stat): Use it.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1666&r2=1.1667
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jcf-io.c.diff?cvsroot=gcc&r1=1.57&r2=1.58



-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug java/24120] jc1 incorrectly uses libiberty hashes
  2005-09-29 12:38 [Bug java/24120] New: jc1 incorrectly uses libiberty hashes kostikbel at ukr dot net
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-09-30  0:37 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2005-09-30 00:37 -------
I checked in the fix to the 4.0 branch and the trunk.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.3


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug java/24120] jc1 incorrectly uses libiberty hashes
  2005-09-29 12:38 [Bug java/24120] New: jc1 incorrectly uses libiberty hashes kostikbel at ukr dot net
                   ` (3 preceding siblings ...)
  2005-09-30  0:37 ` tromey at gcc dot gnu dot org
@ 2005-09-30  8:25 ` kostikbel at ukr dot net
  4 siblings, 0 replies; 7+ messages in thread
From: kostikbel at ukr dot net @ 2005-09-30  8:25 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From kostikbel at ukr dot net  2005-09-30 08:25 -------
(In reply to comment #4)
> I checked in the fix to the 4.0 branch and the trunk.
> 

Tom,
could you, please, commit the fix into 3.4 branc, so that
it will be included in 3.4.5 ?

-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug java/24120] jc1 incorrectly uses libiberty hashes
       [not found] <bug-24120-10933@http.gcc.gnu.org/bugzilla/>
@ 2005-10-03 14:23 ` tromey at gcc dot gnu dot org
  0 siblings, 0 replies; 7+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-10-03 14:23 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from tromey at gcc dot gnu dot org  2005-10-03 14:23 -------
Is there going to be a 3.4.5?
FWIW it would be somewhat more convenient if, say, whoever is
doing releases from 3.4 branch applied this patch.  I don't have
it checked out, and going through a build is kind of a pain.
Could you ask whoever the release person is to do it?


-- 


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

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