Opened 13 years ago

Closed 12 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 13 years ago.
gdb output
ffmpeg-20120604-182430.log (4.2 KB ) - added by jamal 13 years ago.
ffmpeg log
gdb-ffmpeg_g-gentoo-x86_64-dirac.log (14.1 KB ) - added by jamal 12 years ago.
gdb output, gentoo x64

Download all attachments as: .zip

Change History (13)

by jamal, 13 years ago

Attachment: gdb-ffmpeg_g-dirac.log added

gdb output

by jamal, 13 years ago

Attachment: ffmpeg-20120604-182430.log added

ffmpeg log

comment:1 by Carl Eugen Hoyos, 13 years ago

Priority: normalimportant
Status: newopen

Does it also crash with --disable-sse ?

comment:2 by jamal, 13 years ago

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 13 years ago by jamal (next)

comment:3 by Carl Eugen Hoyos, 13 years ago

Keywords: win64 added

comment:4 by jamal, 12 years ago

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.

by jamal, 12 years ago

gdb output, gentoo x64

comment:5 by Carl Eugen Hoyos, 12 years ago

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

comment:6 by jamal, 12 years ago

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 by Michael Niedermayer, 12 years ago

might be fixed, please re-test

comment:8 by jamal, 12 years ago

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 by Michael Niedermayer, 12 years ago

Summary: ffmpeg crashes when decoding a dirac streamffmpeg crashes on win64 when decoding a dirac stream

comment:10 by Michael Niedermayer, 12 years ago

Reproduced by developer: set
Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.