RFR: 8343700: ceil_log2 should not loop endlessly [v5]

Sonia Zaldana Calles szaldana at openjdk.org
Tue Nov 19 16:05:10 UTC 2024


On Tue, 19 Nov 2024 15:49:15 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> I had tested your implementation but I added a few more test cases for peace of mind :-) 
>> 
>> I don't think we can do a death test because that would only get triggered for debug builds.  I can't seem to find any in the code base either. 
>> 
>> Also fixed the T(0) issue. Thanks!
>
> Regarding death tests - look for tests using of `TEST_VM_ASSERT` and `TEST_VM_ASSERT_MSG`.
> They are only available in debug builds, and uses are wrapped in `#ifdef ASSERT`.

Ah my bad. I was looking for ASSERT_DEATH. I added a death test for 0. Thanks for the pointer!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22074#discussion_r1848636135


More information about the hotspot-dev mailing list