RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v2]

Severin Gehwolf sgehwolf at openjdk.org
Wed Aug 28 08:49:19 UTC 2024


On Wed, 28 Aug 2024 07:41:56 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> It's set in the [initialization list](https://github.com/openjdk/jdk/pull/20646/files#diff-ca999d88f840ec06af060a8245bec6e0783fe60d7fe07908547111c10873c1f6R49) to `nullptr`. Is that not enough?
>
> You free _path here, but it is still not nullptr. You then rely on all three code paths below to reset _path to a sensible value. That is brittle and may bitrot. It would be cleaner to add a _path = nullptr right after the free, to prevent the old invalif pointer from being accidentally used.

Ah, makes sense.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20646#discussion_r1734260186


More information about the hotspot-runtime-dev mailing list