michaelni changed the topic of #ffmpeg-devel to: Welcome to the FFmpeg development channel | Questions about using FFmpeg or developing with libav* libs should be asked in #ffmpeg | This channel is publicly logged | FFmpeg 7.1.1 has been released! | Please read ffmpeg.org/developer.html#Code-of-conduct
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
secondcreek has quit [Remote host closed the connection]
secondcreek has joined #ffmpeg-devel
<compnn>
pross out here fixing all kinds of configure dependencies
TheVibeCoder has joined #ffmpeg-devel
_whitelogger has joined #ffmpeg-devel
grillo_0 has quit [Ping timeout: 265 seconds]
grillo_0 has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
blb has quit [Ping timeout: 272 seconds]
blb has joined #ffmpeg-devel
My-Bosnian-mom-M has joined #ffmpeg-devel
My-Bosnian-mom-M has quit [Quit: Client closed]
My-Bosnian-mom-M has joined #ffmpeg-devel
My-Bosnian-mom-M has quit [Quit: Client closed]
bsFFFFFF has joined #ffmpeg-devel
bsFFFFFF has quit [Ping timeout: 248 seconds]
bsFFFFFF has joined #ffmpeg-devel
System_Error has joined #ffmpeg-devel
psykose has quit [Remote host closed the connection]
psykose has joined #ffmpeg-devel
bsFFFFFF has quit [Ping timeout: 260 seconds]
bsFFFFFF has joined #ffmpeg-devel
bsFFFFFF has quit [Client Quit]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
derpydoo has joined #ffmpeg-devel
derpydoo has quit [Ping timeout: 252 seconds]
kepstin has quit [Remote host closed the connection]
kepstin has joined #ffmpeg-devel
mkver has quit [Read error: Connection reset by peer]
mkver has joined #ffmpeg-devel
microlappy has joined #ffmpeg-devel
microlappy has quit [Client Quit]
cone-381 has joined #ffmpeg-devel
<cone-381>
ffmpeg Niklas Haas master:27590d86534b: avutil/hwcontext_vulkan: disable host transfers if ReBAR is disabled
mkver has quit [Remote host closed the connection]
mkver has joined #ffmpeg-devel
russellty has joined #ffmpeg-devel
russellty has quit [Quit: russellty]
sepro has quit [Quit: Bye!]
mkver has quit [Read error: Connection reset by peer]
mkver has joined #ffmpeg-devel
kurosu has joined #ffmpeg-devel
<haasn>
mkver: solved the gif pal8 fate bug; the loop for copying unaligned image tails was using the wrong upper bound for the number of planes (it was copying all *allocated* planes rather than only copying planes containing pixel data, thus writing garbage data to the palette in data[1])
<mkver>
Did the fix also solve the Clang -O3 issue (can you even reproduce it)?
<haasn>
I'm in the process of testing that. Something unrelated I noticed while debugging the previous issue, though, is that apparently, the gif decoder likes to put uninitialized data into the stride padding (pixels between width and linesize)
<haasn>
other decoders do not seem to do this; and the image buffer is allocated with av_mallocz as per the default get_buffer2 implementation
<haasn>
I'm not sure if we have a policy on that but it seems to be that a decoder exposing uninitialized values as image data is generally a bad sign
microchip_ has quit [Remote host closed the connection]
<haasn>
even if it is outside of the legal image bounds
<haasn>
seems to me*
microchip_ has joined #ffmpeg-devel
<haasn>
the only reason I noticed that was because MSAN considers FFMIN(undefined, *ptr) to be a bug, even if the result of that comparison is itself never used further, because it's "a conditional acting on an undefined value". Using fminf() would get around that issue
<mkver>
It "puts" (as opposed to: it ignores the data in the stride padding)?
<haasn>
It "puts" as in, an AVFrame received from gifdec will have undefined data in those pixels; whereas other decoders generally output defined values (usually 0)
<haasn>
(assuming the default get_buffer2)
<haasn>
meaning, the gif decoder must be somehow explicitly writing undefined values to those pixels
<haasn>
I haven't yet checked to see if MSAN with -fsanitize-memory-track-origins can tell me where those values came from; but I'm wondering if that's something we generally consider to be a bug or if it's expected/normal behavior
<mkver>
We should avoid it if we can easily do so.
<haasn>
mkver: clang v20.1.6 -O3 passes for me both with and without the above fix (excluding the gifenc-pal8 test)
<haasn>
which clang version are you on?
<haasn>
oh, 19
<mkver>
Clang 19.
<mkver>
I don't know if it is a compiler bug.
<mkver>
What does "passing" mean for you?
<haasn>
`make fate` generates no errors (except gifenc-pal8 with the fix reverted)
<haasn>
and, well, make fate GEN=1 updates no files
<haasn>
I can confirm that clang 19.1.7 -O3 fails a lot of tests
<haasn>
the same ones as in your diff by the looks of it
<mkver>
Ok. Then it really seems like a compiler bug.
<haasn>
I'm not sure if that gives us any way to track down the specific interaction that caused it, in case there's something we can change to avoid it
<haasn>
I suppose the least we can do is add a configure-time check
<mkver>
You can try building some files with -O2 to see which file causes it.
<kasper93>
you would need to manually track it down, once you have the problematic asm part, could figure out further, but this is effort and if it's already fixed... probably not worth to backtrack tihs
<haasn>
still happens with --disable-asm
mkver has quit [Ping timeout: 248 seconds]
mkver has joined #ffmpeg-devel
<haasn>
well
<haasn>
I found the loop that produces the wrong result; and after adding printf() to the loop body it magically passes
<kasper93>
classic
<nevcairiel>
well typical behavior for optimization problems
<kasper93>
function calls prevents a lot loop transformations
<haasn>
gdb stepping through the function is also bizarre
<haasn>
it seems the compiler just straight up miscompiles this loop; it even optimized out res[1] but not res[0] nor res[2]
<cone-381>
ffmpeg Michael Niedermayer release/6.1:960c31117de4: avformat/wtvdec: clear sectors
<cone-381>
ffmpeg Michael Niedermayer release/6.1:f95693192d39: avformat/wtvdec: Check length of read mpeg2_descriptor
<cone-381>
ffmpeg Michael Niedermayer release/6.1:b9c8e0212a2f: tools/target_dec_fuzzer: Use av_buffer_allocz() to avoid missing slices to have unpredictable content
<cone-381>
ffmpeg Michael Niedermayer release/6.1:8d4cbca37bd0: avformat/lmlm4: Eliminate some AVERROR(EIO)
<cone-381>
ffmpeg Michael Niedermayer release/6.1:bd002dfc3d47: avfilter/vf_xfade_opencl: Check ff_inlink_consume_frame() for failure
<cone-381>
ffmpeg Michael Niedermayer release/6.1:3581e7ce1d61: avfilter/af_surround: Check output format
<cone-381>
ffmpeg Michael Niedermayer release/6.1:b4cd76b48300: avfilter/vf_tonemap_opencl: Dereference after NULL check
<cone-381>
ffmpeg Michael Niedermayer release/6.1:f316f0309a9b: avfilter/vf_v360: Assert that vf was initialized
<cone-381>
ffmpeg Michael Niedermayer release/6.1:0a80dadb96b7: avfilter/vf_xfade: Compute w2, h2 with float
<cone-381>
ffmpeg Michael Niedermayer release/6.1:d06d312baa88: avcodec/dxva2: Initialize dxva_size and check it
<cone-381>
ffmpeg Michael Niedermayer release/6.1:76604d8d47a2: avcodec/dxva2: Initialize ConfigBitstreamRaw
<cone-381>
ffmpeg Michael Niedermayer release/6.1:9d9f3cd2ca4e: avcodec/dxva2: initialize validate
<cone-381>
ffmpeg Michael Niedermayer release/6.1:0de517a2e0d2: avcodec/dxva2: initialize hr in ff_dxva2_common_end_frame()
<cone-381>
ffmpeg Michael Niedermayer release/6.1:c61592d2746f: avdevice/dshow: Initialize 2 pointers
<cone-381>
ffmpeg Michael Niedermayer release/6.1:c34c6f5f866e: tools/target_dec_fuzzer: Check that FFv1 doesnt leave uninitialized memory in its buffers
<cone-381>
ffmpeg Michael Niedermayer release/6.1:cccb8250ea20: avcodec/sga: av_assert1 check init_get_bits8()
<cone-381>
ffmpeg Michael Niedermayer release/6.1:be1eb5d585af: avformat/segafilm: Set keyframe
<cone-381>
ffmpeg Michael Niedermayer release/6.1:960489607a63: bsf/media100_to_mjpegb: Clear output buffer padding
<cone-381>
ffmpeg Michael Niedermayer release/6.1:ba60cf9e7bf3: avcodec/mvha: Clear remaining space after inflate()
<cone-381>
ffmpeg Michael Niedermayer release/6.1:cf425cf10af9: avcodec/apac: Clean padding space
<cone-381>
ffmpeg Michael Niedermayer release/6.1:018ad1dd301b: avformat/mpeg: Check an avio_read() for failure
<cone-381>
ffmpeg Michael Niedermayer release/6.1:a767fc7eb38c: avcodec/shorten: clear padding
<cone-381>
ffmpeg Michael Niedermayer release/6.1:89f8f866a64d: avcodec/vc1dec: Clear mb_type_base and ttblk_base
<cone-381>
ffmpeg Michael Niedermayer release/6.1:97b0e6371906: avcodec/aic: Clear slice_data
<cone-381>
ffmpeg Michael Niedermayer release/6.1:15d1b93cb908: avcodec/alsdec: clear last_acf_mantissa
<cone-381>
ffmpeg Michael Niedermayer release/6.1:a3e8eff1824b: avcodec/apac: Fix discards ‘const’ qualifier
<cone-381>
ffmpeg Michael Niedermayer release/6.1:004ca6e62272: avformat/av1dec: Better fix for 70872/clusterfuzz-testcase-minimized-ffmpeg_dem_OBU_fuzzer-6005782487826432
<cone-381>
ffmpeg Michael Niedermayer release/6.1:1bf01620a731: avcodec/avcodec: Warn about data returned from get_buffer*()
<cone-381>
ffmpeg Michael Niedermayer release/6.1:4f9dac5ea935: avcodec/magicyuvenc: better slice height
<cone-381>
ffmpeg Michael Niedermayer release/6.1:901b8c8b7e21: avformat/apetag: Check APETAGEX
<cone-381>
ffmpeg Michael Niedermayer release/6.1:8d67d595bc67: avcodec/vc1_block: propagate error codes
<cone-381>
ffmpeg Michael Niedermayer release/6.1:3b31f5cfee06: avcodec/notchlc: Check bytes left before reading
<cone-381>
ffmpeg Michael Niedermayer release/6.1:5615bb5391b3: avformat/argo_brp: Check that ASF chunk header is completely read
<cone-381>
ffmpeg Michael Niedermayer release/6.1:9385f0f8571e: avcodec/wmavoice: Do not use uninitialized pitch[0]
<cone-381>
ffmpeg Michael Niedermayer release/6.1:25ed81a6d26a: avformat/mvdec: Check if name was fully read
<cone-381>
ffmpeg Michael Niedermayer release/6.1:ae51c5599851: avcodec/vc2enc: basic sanity check on slice_max_bytes
<cone-381>
ffmpeg Michael Niedermayer release/6.1:681c911ff9a8: swscale/swscale: Use unsigned operation to avoid undefined behavior
<cone-381>
ffmpeg Michael Niedermayer release/6.1:dd75f38d7884: swscale/output: Fix undefined integer overflow in yuv2rgba64_2_c_template()
<cone-381>
ffmpeg Michael Niedermayer release/6.1:8080c0276d29: avformat/mxfdec: More offset_temp checks
<cone-381>
ffmpeg Michael Niedermayer release/6.1:dc9b056e2afa: avformat/mxfdec: Check timecode for overflow
<cone-381>
ffmpeg Michael Niedermayer release/6.1:63623f15c3d4: avcodec/osq: Treat sum = 0 as k = 0
<cone-381>
ffmpeg Michael Niedermayer release/6.1:532b51def095: avformat/asf: Check picsize
<cone-381>
ffmpeg Michael Niedermayer release/6.1:12fd2386fc66: avcodec/jfdctint_template: use unsigned z* in row_fdct()
<cone-381>
ffmpeg Michael Niedermayer release/6.1:f9f80bb9541c: avcodec/osq: use unsigned for decorrelation
<cone-381>
ffmpeg Michael Niedermayer release/6.1:b20ee0c9564d: avcodec/cbs_h266_syntax_template: Check bit depth with range extension
<cone-381>
ffmpeg Michael Niedermayer release/6.1:0203e0c78a20: avcodec/encode: Check bitrate
<cone-381>
ffmpeg Michael Niedermayer release/6.1:5b7bd5b7e13a: tools/target_dec_fuzzer: Adapt threshold for RASC
<cone-381>
ffmpeg Michael Niedermayer release/6.1:b614243a5e3a: avcodec/eacmv: Check input size for intra frames
<cone-381>
ffmpeg Michael Niedermayer release/6.1:3c961c4b2915: avcodec/svq3: Check for minimum size input
<cone-381>
ffmpeg Michael Niedermayer release/6.1:33982114f453: avcodec/imm4: Check input size