[PATCH 15/19] RISC-V: avoid buffer underrun in subset parsing

Jan Beulich jbeulich@suse.com
Mon May 4 08:10:11 GMT 2026


On 29.04.2026 14:37, Jiawei wrote:
>> In both instances 'p' can be the first character. Inspecting the character
>> immediately ahead of it is then UB.
>>
>> To increase similarity between the two checks (each), also move the
>> increment of q past the check for the (bogus) "<number>p" ending.
>>
>> Correct indentation in nearby code, where it being wrong is actively
>> misleading.
>> ---
>> Why is it that P is recognized as an extension when there's no other
>> support there for it?
>>
> LGTM.
> 
> 
> Regarding the question about P, the P extension is still in draft state:
> 
> https://github.com/riscv/riscv-p-spec

I know.

> We already have some downstream experimental support for it. Once the P
> specification is frozen, we plan to prepare and submit the corresponding
> binutils support upstream.

Right, but my question was why there's partial support, resulting in
potentially misleading behavior.

Thanks for all the reviews, btw.

Jan


More information about the Binutils mailing list