RFR: 8293170: Improve encoding of the debuginfo nmethod section [v7]
Boris Ulasevich
bulasevich at openjdk.org
Tue Nov 15 07:06:03 UTC 2022
On Mon, 14 Nov 2022 13:45:56 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
>> Boris Ulasevich has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>>
>> - adding jtreg test for CompressedSparseDataReadStream impl
>> - align java impl to cpp impl
>> - rewrite the SparseDataWriteStream not to use _curr_byte
>> - introduce and call flush() excplicitly, add the gtest
>> - minor renaming. adding encoding examples table
>> - cleanup and rename
>> - cleanup
>> - rewrite code without virtual functions
>> - warning fix and name fix
>> - optimize the encoding
>> - ... and 2 more: https://git.openjdk.org/jdk/compare/fd668dc4...637c94be
>
> src/hotspot/share/code/compressedStream.cpp line 225:
>
>> 223: memcpy(_new_buffer, _buffer, _position);
>> 224: _buffer = _new_buffer;
>> 225: _size = nsize;
>
> Signed integer overflow is UB.
> The correct assert:
>
> assert(_size <= INT_MAX / 2, "debug data size must not exceed INT_MAX");
> int nsize = _size * 2;
OK
-------------
PR: https://git.openjdk.org/jdk/pull/10025
More information about the hotspot-compiler-dev
mailing list