RFR: 8345647: Fix recent NULL usage backsliding in Shenandoah
Kim Barrett
kbarrett at openjdk.org
Wed Dec 11 15:12:14 UTC 2024
On Mon, 9 Dec 2024 15:29:56 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:
> Hi all,
>
> This PR addresses [8345647](https://bugs.openjdk.org/browse/JDK-8345647) addressing uses of `NULL` in Shenandoah. These should be replaced to `null`.
>
> I verified where those uses are with:
> `git show <commit-id> --name-only | while read file; do echo "File: $file"; git diff <commit-id> -- "$file" | grep -n -F 'NULL'; done`
>
> The relevant output:
>
> File: src/hotspot/cpu/ppc/gc/shenandoah/shenandoahBarrierSetAssembler_ppc.cpp
> 9:- // No need for post barrier if storing NULL
> File: src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp
> 9:- // must be either an oop or NULL
> 12: if (t == TypePtr::NULL_PTR || t == Type::TOP)
>
>
> Changes affect comments only.
>
> Thanks,
> Sonia
Unfortunately, this change was incomplete. It missed these:
./share/gc/shenandoah/shenandoahFreeSet.cpp: // Overwrite with non-zero (non-NULL) values only if necessary for allocation bookkeeping.
./share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp: assert(obj->klass() != nullptr, "klass should not be NULL");
In both of those lines, s/NULL/null/
Sorry I didn't point this out before this PR was integrated. I only noticed the PR this morning. Guess we'll need
another JBS issue and PR...
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22647#issuecomment-2536264494
More information about the shenandoah-dev
mailing list