Commit 5cc80caa by Jeff Sturm Committed by Tom Tromey

natThrowable.cc (fillInStackTrace): Check for zero return from backtrace().

2000-07-19  Jeff Sturm  <jeff.sturm@appnet.com>

	* java/lang/natThrowable.cc (fillInStackTrace): Check for
	zero return from backtrace().

From-SVN: r35135
parent 4e62ab0b
2000-07-19 Jeff Sturm <jeff.sturm@appnet.com>
* java/lang/natThrowable.cc (fillInStackTrace): Check for
zero return from backtrace().
2000-07-15 Bryce McKinlay <bryce@albatross.co.nz>
* java/awt/EventQueue.java (invokeAndWait): Call postEvent() within
......
......@@ -61,9 +61,12 @@ java::lang::Throwable::fillInStackTrace (void)
int n = backtrace (p, 128) - 1;
#endif
// ??? Might this cause a problem if the byte array isn't aligned?
stackTrace = JvNewByteArray (n * sizeof p[0]);
memcpy (elements (stackTrace), p+1, (n * sizeof p[0]));
if (n > 0)
{
// ??? Might this cause a problem if the byte array isn't aligned?
stackTrace = JvNewByteArray (n * sizeof p[0]);
memcpy (elements (stackTrace), p+1, (n * sizeof p[0]));
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment