On Wed, 16 Aug 2023 23:02:45 GMT, Coleen Phillimore <[email protected]> wrote:
>> src/hotspot/share/utilities/elfFile.cpp line 1723:
>>
>>> 1721: void
>>> DwarfFile::LineNumberProgram::LineNumberProgramState::set_index_register(const
>>> uint64_t operation_advance,
>>> 1722:
>>> const LineNumberProgramHeader& header) {
>>> 1723: _op_index = (_op_index + operation_advance) %
>>> header._maximum_operations_per_instruction;
>>
>> This should be narrowed by a byte.
>
> So put the cast here?
uint64_t operation_advance;
if (!_reader.read_uleb128(&operation_advance, 4)) {
// Must be at most 4 bytes because the index register is only 4 bytes
wide.
return false;
}
_state->add_to_address_register(operation_advance, _header);
This is why I changed it. Should operation_advance be static_cast<uint8_t>
here ? This read function reads 64 bits of info.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15233#discussion_r1296522650