Skip to content

Commit a83cfe2

Browse files
author
Kim Barrett
committed
8344917: Fix recent NULL usage backsliding
Reviewed-by: jsjolen
1 parent 6711e13 commit a83cfe2

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ address TemplateInterpreterGenerator::generate_cont_resume_interpreter_adapter()
620620
// Restore Java expression stack pointer
621621
__ ldr(rscratch1, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));
622622
__ lea(esp, Address(rfp, rscratch1, Address::lsl(Interpreter::logStackElementSize)));
623-
// and NULL it as marker that esp is now tos until next java call
623+
// and null it as marker that esp is now tos until next java call
624624
__ str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));
625625

626626
// Restore machine SP

src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ address TemplateInterpreterGenerator::generate_cont_resume_interpreter_adapter()
552552
// Restore Java expression stack pointer
553553
__ ld(t0, Address(fp, frame::interpreter_frame_last_sp_offset * wordSize));
554554
__ shadd(esp, t0, fp, t0, Interpreter::logStackElementSize);
555-
// and NULL it as marker that esp is now tos until next java call
555+
// and null it as marker that esp is now tos until next java call
556556
__ sd(zr, Address(fp, frame::interpreter_frame_last_sp_offset * wordSize));
557557

558558
// Restore machine SP

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ address TemplateInterpreterGenerator::generate_cont_resume_interpreter_adapter()
400400
// Restore stack bottom
401401
__ movptr(rcx, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
402402
__ lea(rsp, Address(rbp, rcx, Address::times_ptr));
403-
// and NULL it as marker that esp is now tos until next java call
403+
// and null it as marker that esp is now tos until next java call
404404
__ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
405405

406406
__ jmp(rax);

src/hotspot/share/cds/archiveUtils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class DumpRegion {
162162
DumpRegion(const char* name, uintx max_delta = 0)
163163
: _name(name), _base(nullptr), _top(nullptr), _end(nullptr),
164164
_max_delta(max_delta), _is_packed(false),
165-
_rs(NULL), _vs(NULL) {}
165+
_rs(nullptr), _vs(nullptr) {}
166166

167167
char* expand_top_to(char* newtop);
168168
char* allocate(size_t num_bytes, size_t alignment = 0);

src/hotspot/share/cds/metaspaceShared.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static GrowableArrayCHeap<OopHandle, mtClassShared>* _extra_interned_strings = n
315315
// Extra Symbols to be added to the archive
316316
static GrowableArrayCHeap<Symbol*, mtClassShared>* _extra_symbols = nullptr;
317317
// Methods managed by SystemDictionary::find_method_handle_intrinsic() to be added to the archive
318-
static GrowableArray<Method*>* _pending_method_handle_intrinsics = NULL;
318+
static GrowableArray<Method*>* _pending_method_handle_intrinsics = nullptr;
319319

320320
void MetaspaceShared::read_extra_data(JavaThread* current, const char* filename) {
321321
_extra_interned_strings = new GrowableArrayCHeap<OopHandle, mtClassShared>(10000);

src/hotspot/share/gc/shared/locationPrinter.inline.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@ bool BlockLocationPrinter<CollectedHeapT>::print_location(outputStream* st, void
5454
// Check if addr points into Java heap.
5555
bool in_heap = CollectedHeapT::heap()->is_in(addr);
5656
if (in_heap) {
57-
// base_oop_or_null() might be unimplemented and return NULL for some GCs/generations
57+
// base_oop_or_null() might be unimplemented and return null for some GCs/generations
5858
oop o = base_oop_or_null(addr);
5959
if (o != nullptr) {
6060
if ((void*)o == addr) {

src/hotspot/share/oops/constantPool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ void ConstantPool::restore_unshareable_info(TRAPS) {
428428
assert(is_shared(), "should always be set for shared constant pools");
429429
if (is_for_method_handle_intrinsic()) {
430430
// See the same check in remove_unshareable_info() below.
431-
assert(cache() == NULL, "must not have cpCache");
431+
assert(cache() == nullptr, "must not have cpCache");
432432
return;
433433
}
434434
assert(_cache != nullptr, "constant pool _cache should not be null");
@@ -474,7 +474,7 @@ void ConstantPool::remove_unshareable_info() {
474474
// This CP was created by Method::make_method_handle_intrinsic() and has nothing
475475
// that need to be removed/restored. It has no cpCache since the intrinsic methods
476476
// don't have any bytecodes.
477-
assert(cache() == NULL, "must not have cpCache");
477+
assert(cache() == nullptr, "must not have cpCache");
478478
return;
479479
}
480480

0 commit comments

Comments
 (0)