projects
/
cacao.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b69fd8
)
* src/native/vm/java_lang_Object.c (wait): Check for ms < 0.
author
twisti
<none@none>
Tue, 21 Aug 2007 15:12:38 +0000
(15:12 +0000)
committer
twisti
<none@none>
Tue, 21 Aug 2007 15:12:38 +0000
(15:12 +0000)
src/native/vm/java_lang_Object.c
patch
|
blob
|
history
diff --git
a/src/native/vm/java_lang_Object.c
b/src/native/vm/java_lang_Object.c
index 191ed2448ebde4cd97625b352cb10c246c75af79..b44aff16658849ea7d1dd34fec19b41d96ba6053 100644
(file)
--- a/
src/native/vm/java_lang_Object.c
+++ b/
src/native/vm/java_lang_Object.c
@@
-120,6
+120,12
@@
void _Jv_java_lang_Object_wait(java_lang_Object *o, s8 ms, s4 ns)
if (jvmti) jvmti_MonitorWaiting(true, o, ms);
#endif
+ if (ms < 0) {
+/* exceptions_throw_illegalargumentexception("argument out of range"); */
+ exceptions_throw_illegalargumentexception();
+ return;
+ }
+
#if defined(ENABLE_THREADS)
lock_wait_for_object(&LLNI_field_direct(o, header), ms, ns);
#endif