This issue came up during the review for the following:
JDK-8015884 runThese crashed with SIGSEGV, hs_err has an error instead
of stacktrace
Here is Dmitry's original code review comment and my original reply:
On 6/22/13 11:51 AM, Dmitry Samersoff wrote:
> Dan,
>
> os_linux.cpp:
>
> 1685:
> It might be better to just turn assert to guarantee. Something bad is
> happening if we can't obtain JVM base address.
So that would be:
In os_bsd.cpp:
1232 bool os::address_is_in_vm(address addr) {
1240 assert(libjvm_base_addr !=NULL, "Cannot obtain base address for libjvm");
In os_linux.cpp:
1680 bool os::address_is_in_vm(address addr) {
1688 assert(libjvm_base_addr !=NULL, "Cannot obtain base address for libjvm");
In os_solaris.cpp:
1922 bool os::address_is_in_vm(address addr) {
1930 assert(libjvm_base_addr !=NULL, "Cannot obtain base address for libjvm");
In os_windows.cpp:
1477 bool os::address_is_in_vm(address addr) {
1481 assert(false, "Can't find jvm module.");
I concur that not knowing the JVM base address would be bad.
I will change the above "assert" calls into "guarantee" calls
if other reviewers do not object.
Note: I changed my mind about changing the assert() into a guarantee() in
the changeset for 8015884. 8015884 is being backported to HSX-24
and I don't want introduce a new guarantee() there.
JDK-8015884 runThese crashed with SIGSEGV, hs_err has an error instead
of stacktrace
Here is Dmitry's original code review comment and my original reply:
On 6/22/13 11:51 AM, Dmitry Samersoff wrote:
> Dan,
>
> os_linux.cpp:
>
> 1685:
> It might be better to just turn assert to guarantee. Something bad is
> happening if we can't obtain JVM base address.
So that would be:
In os_bsd.cpp:
1232 bool os::address_is_in_vm(address addr) {
1240 assert(libjvm_base_addr !=NULL, "Cannot obtain base address for libjvm");
In os_linux.cpp:
1680 bool os::address_is_in_vm(address addr) {
1688 assert(libjvm_base_addr !=NULL, "Cannot obtain base address for libjvm");
In os_solaris.cpp:
1922 bool os::address_is_in_vm(address addr) {
1930 assert(libjvm_base_addr !=NULL, "Cannot obtain base address for libjvm");
In os_windows.cpp:
1477 bool os::address_is_in_vm(address addr) {
1481 assert(false, "Can't find jvm module.");
I concur that not knowing the JVM base address would be bad.
I will change the above "assert" calls into "guarantee" calls
if other reviewers do not object.
Note: I changed my mind about changing the assert() into a guarantee() in
the changeset for 8015884. 8015884 is being backported to HSX-24
and I don't want introduce a new guarantee() there.
- relates to
-
JDK-8020092 os::address_is_in_vm() on Windows can use "GetModuleHandleEx()"
-
- Closed
-