re GNATS libgcj/341 (Throwable.printStackTrace() isn't working)
2000-10-09 Bryce McKinlay <bryce@albatross.co.nz> * include/jvm.h: Enable __builtin_expect(). * name-finder.cc (lookup): Don't trust dladdr() if the address is from the main program. Fix for PR libgcj/341. From-SVN: r36794
This commit is contained in:
parent
79b425c6d3
commit
6a3bad7d98
3 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2000-10-09 Bryce McKinlay <bryce@albatross.co.nz>
|
||||
|
||||
* include/jvm.h: Enable __builtin_expect().
|
||||
|
||||
* name-finder.cc (lookup): Don't trust dladdr() if the address is from
|
||||
the main program. Fix for PR libgcj/341.
|
||||
|
||||
2000-10-07 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* java/util/Properties.java: Merged with Classpath version.
|
||||
|
|
|
@ -11,9 +11,6 @@ details. */
|
|||
#ifndef __JAVA_JVM_H__
|
||||
#define __JAVA_JVM_H__
|
||||
|
||||
// FIXME: __builtin_expect doesn't work yet.
|
||||
#define __builtin_expect(A,B) (A)
|
||||
|
||||
#include <gcj/javaprims.h>
|
||||
|
||||
#include <java-assert.h>
|
||||
|
|
|
@ -136,6 +136,7 @@ _Jv_name_finder::toHex (void *p)
|
|||
bool
|
||||
_Jv_name_finder::lookup (void *p)
|
||||
{
|
||||
extern char **_Jv_argv;
|
||||
toHex (p);
|
||||
|
||||
#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
|
||||
|
@ -146,7 +147,10 @@ _Jv_name_finder::lookup (void *p)
|
|||
{
|
||||
strncpy (file_name, dl_info.dli_fname, sizeof file_name);
|
||||
strncpy (method_name, dl_info.dli_sname, sizeof method_name);
|
||||
return true;
|
||||
|
||||
/* Don't trust dladdr() if the address is from the main program. */
|
||||
if (strcmp (file_name, _Jv_argv[0]) != 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue