public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait
@ 2005-11-24 11:47 aph at gcc dot gnu dot org
2005-11-24 11:48 ` [Bug libgcj/25016] " aph at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2005-11-24 11:47 UTC (permalink / raw)
To: java-prs
_Jv_CondWait makes no allowances for the possibility of an integer
overflow, and this means we can return too early.
This causes very hard to track down bugs. See
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161483
--
Summary: Integer overflow in _Jv_CondWait
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcj
AssignedTo: aph at gcc dot gnu dot org
ReportedBy: aph at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
2005-11-24 11:48 ` [Bug libgcj/25016] " aph at gcc dot gnu dot org
@ 2005-11-24 11:48 ` aph at gcc dot gnu dot org
2005-11-24 11:54 ` aph at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2005-11-24 11:48 UTC (permalink / raw)
To: java-prs
------- Comment #1 from aph at gcc dot gnu dot org 2005-11-24 11:48 -------
Consider this program:
public class TimedWait
{
public static void main (String[] argv)
throws InterruptedException
{
Object o = new Object();
synchronized (o)
{
o.wait(Long.MAX_VALUE);
}
}
}
It's obvious that we never expect this program to terminate, because
the delay is some 292 million years. However, try this on gcj and it
returns immediately -- because _Jv_CondWait is broken.
--
aph at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-24 11:48:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
@ 2005-11-24 11:48 ` aph at gcc dot gnu dot org
2005-11-24 11:48 ` aph at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2005-11-24 11:48 UTC (permalink / raw)
To: java-prs
------- Comment #2 from aph at gcc dot gnu dot org 2005-11-24 11:48 -------
Patch at http://gcc.gnu.org/ml/java-patches/2005-q4/msg00222.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
2005-11-24 11:48 ` [Bug libgcj/25016] " aph at gcc dot gnu dot org
2005-11-24 11:48 ` aph at gcc dot gnu dot org
@ 2005-11-24 11:54 ` aph at gcc dot gnu dot org
2005-11-24 15:21 ` overholt at redhat dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2005-11-24 11:54 UTC (permalink / raw)
To: java-prs
--
aph at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Status|NEW |ASSIGNED
Last reconfirmed|2005-11-24 11:48:04 |2005-11-24 11:54:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-11-24 11:54 ` aph at gcc dot gnu dot org
@ 2005-11-24 15:21 ` overholt at redhat dot com
2005-11-25 16:18 ` aph at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: overholt at redhat dot com @ 2005-11-24 15:21 UTC (permalink / raw)
To: java-prs
------- Comment #3 from overholt at redhat dot com 2005-11-24 15:21 -------
This test case does not work for me when I have not applied the patch. After
application and building, it does appear to run "forever" :)
Also, the Eclipse issue that spurred this on (referenced in comment #1) is
fixed when I run with a patched gcc RPM set.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-11-24 15:21 ` overholt at redhat dot com
@ 2005-11-25 16:18 ` aph at gcc dot gnu dot org
2005-11-25 16:31 ` aph at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2005-11-25 16:18 UTC (permalink / raw)
To: java-prs
------- Comment #4 from aph at gcc dot gnu dot org 2005-11-25 16:18 -------
Subject: Bug 25016
Author: aph
Date: Fri Nov 25 16:18:17 2005
New Revision: 107509
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107509
Log:
2005-11-25 Andrew Haley <aph@redhat.com>
PR libgcj/25016
* posix-threads.cc (_Jv_CondWait): Rewrite calculation of the
struct timespec we pass to pthread_cond_timedwait.
Modified:
trunk/libjava/ChangeLog
trunk/libjava/posix-threads.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-11-25 16:18 ` aph at gcc dot gnu dot org
@ 2005-11-25 16:31 ` aph at gcc dot gnu dot org
2005-11-25 17:20 ` aph at gcc dot gnu dot org
2005-11-29 17:13 ` tromey at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2005-11-25 16:31 UTC (permalink / raw)
To: java-prs
------- Comment #5 from aph at gcc dot gnu dot org 2005-11-25 16:31 -------
Subject: Bug 25016
Author: aph
Date: Fri Nov 25 16:31:09 2005
New Revision: 107510
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107510
Log:
2005-11-25 Andrew Haley <aph@redhat.com>
PR libgcj/25016
* posix-threads.cc (_Jv_CondWait): Rewrite calculation of the
struct timespec we pass to pthread_cond_timedwait.
Modified:
branches/gcc-4_0-branch/libjava/ChangeLog
branches/gcc-4_0-branch/libjava/posix-threads.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-11-25 16:31 ` aph at gcc dot gnu dot org
@ 2005-11-25 17:20 ` aph at gcc dot gnu dot org
2005-11-29 17:13 ` tromey at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2005-11-25 17:20 UTC (permalink / raw)
To: java-prs
------- Comment #6 from aph at gcc dot gnu dot org 2005-11-25 17:20 -------
Subject: Bug 25016
Author: aph
Date: Fri Nov 25 17:20:09 2005
New Revision: 107511
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107511
Log:
2005-11-25 Andrew Haley <aph@redhat.com>
PR libgcj/25016
* posix-threads.cc (_Jv_CondWait): Rewrite calculation of the
struct timespec we pass to pthread_cond_timedwait.
Modified:
branches/gcc-4_1-branch/libjava/ChangeLog
branches/gcc-4_1-branch/libjava/posix-threads.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libgcj/25016] Integer overflow in _Jv_CondWait
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-11-25 17:20 ` aph at gcc dot gnu dot org
@ 2005-11-29 17:13 ` tromey at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-11-29 17:13 UTC (permalink / raw)
To: java-prs
------- Comment #7 from tromey at gcc dot gnu dot org 2005-11-29 17:13 -------
Fix checked in everywhere.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25016
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-11-29 17:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-24 11:47 [Bug libgcj/25016] New: Integer overflow in _Jv_CondWait aph at gcc dot gnu dot org
2005-11-24 11:48 ` [Bug libgcj/25016] " aph at gcc dot gnu dot org
2005-11-24 11:48 ` aph at gcc dot gnu dot org
2005-11-24 11:54 ` aph at gcc dot gnu dot org
2005-11-24 15:21 ` overholt at redhat dot com
2005-11-25 16:18 ` aph at gcc dot gnu dot org
2005-11-25 16:31 ` aph at gcc dot gnu dot org
2005-11-25 17:20 ` aph at gcc dot gnu dot org
2005-11-29 17:13 ` 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).