On Thu, 22 Aug 2024 16:30:56 GMT, Simon Tooke <sto...@openjdk.org> wrote:

>> But (here and in other places) raw-printing the unknown constant may not be 
>> the best way. Chances are this code is executed rarely and most people will 
>> just be perplexed at the weird printouts.
>> 
>> We could assert here: After all, we expect to handle all possible values; if 
>> we see an unknown constant, then we either have a bug in the code and what 
>> we read here is no protection value, or Microsoft added new constants. In 
>> both cases, a code fix is needed. Asserts would fire up in automatic 
>> regression tests.
>> 
>> The alternative is to print an '?'. And possibly scan for that in regression 
>> tests too.
>> 
>>  I leave this decision up to you.
>
> I now handle less cases but will assert() if unimplemented bits are 
> encountered.  I have currently only implemented this for protection bits, but 
> I'm still thinking what's best and intent to handle unknown cases identically 
> for the other two functions.

The other two functions will now throw a fatal() if they don't understand the 
data they've been given.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20597#discussion_r1733414499

Reply via email to