[FFmpeg-devel] [PATCH] checkasm/blockdsp: don't randomize the buffers for fill_block_tab

Martin Storsjö martin at martin.st
Tue May 7 13:52:04 EEST 2024


On Tue, 7 May 2024, Andreas Rheinhardt wrote:

> Martin Storsjö:
>> On Mon, 6 May 2024, James Almer wrote:
>> 
>>> It ignores and overwrites the previous values.
>>> Fixes running the test under ubsan.
>>>
>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>> ---
>>> tests/checkasm/blockdsp.c | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> The change is probably correct, but what issue is ubsan complaining
>> about? If this would just be a dead store of unused random values, that
>> shouldn't be an ubsan issue in general, right?
>> 
>
> UBSan complains about unaligned stores in randomize_buffers; which is
> obvious given that i is incremented by 1, not by 2. I sent a patch that
> fixes this without removing randomization:
> https://ffmpeg.org/pipermail/ffmpeg-devel/2024-May/326945.html

Thanks, that explains it. Those two patches LGTM.

// Martin


More information about the ffmpeg-devel mailing list