RFR: 8298321: 2 File Leak defect groups in 2 files [v3]
David Holmes
dholmes at openjdk.org
Tue Jan 10 22:17:18 UTC 2023
On Tue, 10 Jan 2023 20:16:37 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> src/hotspot/os/posix/perfMemory_posix.cpp line 1209:
>>
>>> 1207:
>>> 1208: if (HAS_PENDING_EXCEPTION) {
>>> 1209: assert(fd == OS_ERR, "open_sharedmem_file always return OS_ERR on exceptions");
>>
>> Does this really appease the static analysis tool?
>
> The static analysis tool should be fine about the above change. As I mentioned in the bug report, the warning is regarding the fd is not closed under the conditions HAS_PENDING_EXCEPTION and fd != OS_ERR.
> I will run rerun the test to be sure.
Do we need to test both debug and release builds? The debug build should be fine due to the assert, but in release build ...
-------------
PR: https://git.openjdk.org/jdk/pull/11909
More information about the hotspot-dev
mailing list