Opened 4 years ago

Closed 4 years ago

#1412 closed defect (fixed)

ffmpeg crashes on win64 when decoding a dirac stream

Reported by: jamal Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: dirac win64
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary: ffmpeg (mingw64 x86_64 GCC 4.7.0, yasm 1.2.0) crashes when trying to decode a dirac stream.
This however doesn't happen if i compile ffmpeg with the --disable-yasm option.
ffprobe and even ffmpeg with no output parameters run fine when reading the file and wont crash.

The command line i used was:

./ffmpeg -i bbb-tr1000.ts -vcodec zlib -an asd.mkv

And this is the sample i used: http://dirac.kw.bbc.co.uk/download/video/maybefinal/bbb-tr1000.ts

I'm attaching both the ffmpeg log file and gdb's output.
gdb mentions ff_add_rect_clamped_sse2 as the source of the problem, which might explain why disabling yasm got rid of the crash.

Attachments (3)

gdb-ffmpeg_g-dirac.log (13.7 KB) - added by jamal 4 years ago.
gdb output
ffmpeg-20120604-182430.log (4.2 KB) - added by jamal 4 years ago.
ffmpeg log
gdb-ffmpeg_g-gentoo-x86_64-dirac.log (14.1 KB) - added by jamal 4 years ago.
gdb output, gentoo x64

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by jamal

gdb output

Changed 4 years ago by jamal

ffmpeg log

comment:1 Changed 4 years ago by cehoyos

  • Priority changed from normal to important
  • Status changed from new to open

Does it also crash with --disable-sse ?

comment:2 Changed 4 years ago by jamal

No, it doesn't crash when configuring with --disable-sse.

Also, in case it's of any use, decoding the same file with a mingw32 x86 build (gcc 4.6.2) works fine, with or without yasm or sse.

Version 0, edited 4 years ago by jamal (next)

comment:3 Changed 4 years ago by cehoyos

  • Keywords win64 added

comment:4 Changed 4 years ago by jamal

Ok, just tried this on Gentoo x86_64 GCC 4.5.3 and it crashed as well, so i suppose this is an issue with x86_64 in general.

I'm attaching the gdb output since it's not the same as the one from the mingw64 build. It points to the general decode function instead of that sse2 one.

Changed 4 years ago by jamal

gdb output, gentoo x64

comment:5 Changed 4 years ago by cehoyos

Is the crash on gentoo also reproducible with --disable-asm --disable-optimizations --disable-yasm?
Does the backtrace look different?

comment:6 Changed 4 years ago by jamal

It doesn't crash with either --disable-asm --disable-optimizations --disable-yasm or --disable-sse.

The backtrace is almost the same. While the one from mingw64 starts with the ff_add_rect_clamped_sse2 function followed by dirac_decode_frame_internal, the one from linux gentoo starts with the later.

comment:7 Changed 4 years ago by michael

might be fixed, please re-test

comment:8 Changed 4 years ago by jamal

Ok, mixed results.

I tested the fix and it ran without issues on Linux x64. However, when i reverted the changes of the proposed fix it still ran without issues.
To make sure i went back and compiled the commit i originally tested two weeks ago which again crashed as expected. Then, applying the fix to that old commit fixed the crash for it.
I checked what commit in between the fix and the one i tested two weeks ago could have generated this, and found it was d5a7229b, "Add a float DSP framework to libavutil".

On Win64 however it didn't work. The backtrace is the same as the old one.

comment:9 Changed 4 years ago by michael

  • Summary changed from ffmpeg crashes when decoding a dirac stream to ffmpeg crashes on win64 when decoding a dirac stream

comment:10 Changed 4 years ago by michael

  • Reproduced by developer set
  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.