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
This commit is contained in:
parent
4e62ab0ba3
commit
5cc80caa27
2 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue