Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Issue 9373002: Fix valgrind and asan memory leaks and crashes. (Closed)

Created:
8 years, 10 months ago by DaleCurtis
Modified:
8 years, 10 months ago
CC:
chromium-reviews
Base URL:
ssh://gerrit.chromium.org:29418/chromium/third_party/ffmpeg.git@master
Visibility:
Public.

Description

Fix valgrind and asan memory leaks and crashes. Lots of fixes and patch cleanup. All these fixes are necessary to get ffmpeg_regression_tests passing w/o crashes on ia32/x64 platforms. Both utils.c changes are likely incompatible with all codecs, the codec->close() and iformat->read_close() methods for desired codecs must be sanitized to ensure they are not double-free'ing. BUG=none TEST=ffmpeg_regression_tests

Patch Set 1 #

Total comments: 4

Patch Set 2 : Code review fixes. #

Patch Set 3 : Crash fixes. #

Patch Set 4 : Notes. #

Total comments: 29

Patch Set 5 : Better fixes. #

Patch Set 6 : One more vp3.c fix for ia32. #

Patch Set 7 : vp8 fix. #

Patch Set 8 : Fixes. #

Patch Set 9 : Make vp3 fix an ignore. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -158 lines) Patch
M chromium/patches/README View 1 2 3 4 5 6 7 3 chunks +24 lines, -1 line 0 comments Download
D chromium/patches/to_upstream/01_static_pthread_O2.patch View 1 2 3 4 5 6 7 1 chunk +0 lines, -72 lines 0 comments Download
M chromium/patches/to_upstream/55_h264_nal.patch View 1 2 3 4 5 6 7 1 chunk +12 lines, -52 lines 0 comments Download
M libavcodec/pthread.c View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M libavcodec/utils.c View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M libavcodec/vorbisdec.c View 1 chunk +29 lines, -21 lines 0 comments Download
M libavcodec/vp3.c View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M libavcodec/vp8.c View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M libavformat/mov.c View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M libavformat/oggdec.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M libavformat/oggdec.c View 1 2 3 4 1 chunk +9 lines, -2 lines 0 comments Download
M libavformat/oggparsetheora.c View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M libavformat/oggparsevorbis.c View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M libavformat/utils.c View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
DaleCurtis
PTAL. Potential fixes for 14 valgrind issues. See valgrind.txt for the errors.
8 years, 10 months ago (2012-02-08 23:47:58 UTC) #1
rbultje1
On 2012/02/08 23:47:58, DaleCurtis wrote: > PTAL. Potential fixes for 14 valgrind issues. See valgrind.txt ...
8 years, 10 months ago (2012-02-08 23:51:37 UTC) #2
rbultje1
Oops, wrong button. Here's the real comments. https://chromiumcodereview.appspot.com/9373002/diff/1/libavcodec/vp3.c File libavcodec/vp3.c (right): https://chromiumcodereview.appspot.com/9373002/diff/1/libavcodec/vp3.c#newcode1634 libavcodec/vp3.c:1634: memset(s->dct_tokens_base, 0, ...
8 years, 10 months ago (2012-02-08 23:51:56 UTC) #3
scherkus (not reviewing)
deferring to rbultje :)
8 years, 10 months ago (2012-02-09 00:38:14 UTC) #4
DaleCurtis
https://chromiumcodereview.appspot.com/9373002/diff/1/libavcodec/vp3.c File libavcodec/vp3.c (right): https://chromiumcodereview.appspot.com/9373002/diff/1/libavcodec/vp3.c#newcode1634 libavcodec/vp3.c:1634: memset(s->dct_tokens_base, 0, 64*s->fragment_count * sizeof(*s->dct_tokens_base)); On 2012/02/08 23:51:56, rbultje1 ...
8 years, 10 months ago (2012-02-09 04:03:27 UTC) #5
DaleCurtis
Now with some crash fixes. Again probably not completely right, but prevents crashes. https://chromiumcodereview.appspot.com/9373002/diff/5010/libavcodec/pthread.c File ...
8 years, 10 months ago (2012-02-09 22:43:26 UTC) #6
rbultje1
https://chromiumcodereview.appspot.com/9373002/diff/5010/libavformat/utils.c File libavformat/utils.c (right): https://chromiumcodereview.appspot.com/9373002/diff/5010/libavformat/utils.c#newcode2707 libavformat/utils.c:2707: MOVStreamContext *sc = st->priv_data; I'm actually wondering if we ...
8 years, 10 months ago (2012-02-09 23:27:57 UTC) #7
rbultje1
https://chromiumcodereview.appspot.com/9373002/diff/5010/libavcodec/pthread.c File libavcodec/pthread.c (right): https://chromiumcodereview.appspot.com/9373002/diff/5010/libavcodec/pthread.c#newcode613 libavcodec/pthread.c:613: if (fctx->next_decoding >= avctx->thread_count) return err; On 2012/02/09 22:43:26, ...
8 years, 10 months ago (2012-02-09 23:28:45 UTC) #8
DaleCurtis
https://chromiumcodereview.appspot.com/9373002/diff/5010/libavcodec/pthread.c File libavcodec/pthread.c (right): https://chromiumcodereview.appspot.com/9373002/diff/5010/libavcodec/pthread.c#newcode613 libavcodec/pthread.c:613: if (fctx->next_decoding >= avctx->thread_count) return err; On 2012/02/09 23:28:46, ...
8 years, 10 months ago (2012-02-10 00:04:01 UTC) #9
DaleCurtis
PTAL. This now fixes all known issues on Linux x64. https://chromiumcodereview.appspot.com/9373002/diff/5010/libavformat/utils.c File libavformat/utils.c (right): https://chromiumcodereview.appspot.com/9373002/diff/5010/libavformat/utils.c#newcode2707 ...
8 years, 10 months ago (2012-02-10 23:04:35 UTC) #10
rbultje1
8 years, 10 months ago (2012-02-13 21:54:54 UTC) #11
lgtm

LGTM.

Powered by Google App Engine
This is Rietveld 408576698