mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
6424123: JVM crashes on failed 'strdup' call
Calling os::malloc()/os::strdup() and new os::strdup_check_oom() instead of ::malloc()/::strdup() for native memory tracking purpose Reviewed-by: coleenp, ctornqvi, kvn
This commit is contained in:
parent
69e7c05210
commit
8a690a1250
20 changed files with 82 additions and 36 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "c1/c1_MacroAssembler.hpp"
|
||||
#include "c1/c1_ValueStack.hpp"
|
||||
#include "ci/ciInstance.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
|
||||
void LIR_Assembler::patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info) {
|
||||
// we must have enough patching space so that call can be inserted
|
||||
|
@ -848,7 +849,7 @@ void LIR_Assembler::verify_oop_map(CodeEmitInfo* info) {
|
|||
stringStream st;
|
||||
st.print("bad oop %s at %d", r->as_Register()->name(), _masm->offset());
|
||||
#ifdef SPARC
|
||||
_masm->_verify_oop(r->as_Register(), strdup(st.as_string()), __FILE__, __LINE__);
|
||||
_masm->_verify_oop(r->as_Register(), os::strdup(st.as_string(), mtCompiler), __FILE__, __LINE__);
|
||||
#else
|
||||
_masm->verify_oop(r->as_Register());
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue