8248878: SA: Implement simple workaround for JDK-8248876
Reviewed-by: sspitsyn, ysuenaga
This commit is contained in:
parent
c83ce2e8d9
commit
f1bdd9fca6
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -766,6 +766,7 @@ Pgrab_core(const char* exec_file, const char* core_file) {
|
||||
}
|
||||
|
||||
// exec file is also treated like a shared object for symbol search
|
||||
// FIXME: This is broken and ends up with a base address of 0. See JDK-8248876.
|
||||
if (add_lib_info_fd(ph, exec_file, ph->core->exec_fd,
|
||||
(uintptr_t)0 + find_base_address(ph->core->exec_fd, &exec_ehdr)) == NULL) {
|
||||
goto err;
|
||||
|
@ -69,7 +69,8 @@ class LinuxCDebugger implements CDebugger {
|
||||
LoadObject ob = (LoadObject) objs.get(i);
|
||||
Address base = ob.getBase();
|
||||
long size = ob.getSize();
|
||||
if ( pc.greaterThanOrEqual(base) && pc.lessThan(base.addOffsetTo(size))) {
|
||||
if (base == null) continue; // Skip. LoadObject was not properly initialized.
|
||||
if (pc.greaterThanOrEqual(base) && pc.lessThan(base.addOffsetTo(size))) {
|
||||
return ob;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user