[FFmpeg-devel] [PATCH] rl.h: Use on-stack temporary VLC tables instead of having them static.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Sep 1 23:25:57 CEST 2014


On Mon, Sep 01, 2014 at 10:59:51PM +0200, Reimar Döffinger wrote:
> On Mon, Sep 01, 2014 at 10:19:36PM +0200, Michael Niedermayer wrote:
> > On Mon, Sep 01, 2014 at 08:59:43PM +0200, Reimar Döffinger wrote:
> > > Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> > > ---
> > >  libavcodec/mpeg12.c    | 21 ++++++++++-----------
> > >  libavcodec/mpegvideo.c | 12 ++++++++----
> > >  libavcodec/rl.h        |  8 ++------
> > >  3 files changed, 20 insertions(+), 21 deletions(-)
> > 
> > assuming the amount is ok on the stack the patch LGTM
> 
> I reduced the mpeg12 to the 680 required - since that's a
> local function I think it's unnecessary to be conservative there.
> For the other one...
> Well, HP-UX seems to use 16 kB stack. I guess that we'd have
> problems there (probably even without the patch). But I
> don't think we'll have any volunteers to test and fix FFmpeg
> on that (I doubt anyone would use HP-UX voluntarily at all..).
> Next closest is OpenBSD with 64 kB (though maybe that is outdated
> information?).
> We'll be testing that, but of course that is small enough that
> it can easily fail if the calling application already used up quite
> a bit of it (and the ff_init_vlc_sparse uses up another 3 kB).
> On the other hand, ffv1enc uses a lot more than that:
> uint8_t best_state[256][256];
> (I suspect that should probably be fixed > 64 kB I'd surely consider
> unreasonable, and it will definitely crash on older OpenBSD at least).

Btw. should we maybe set up a fate test with ulimit -s 64 (or so -
higher might be ok as well)?
I currently get these failures, plus one I'm going to send a patch for:
make: *** [fate-vsynth1-ffv1] Error 139
make: *** [fate-vsynth1-ffv1.0] Error 139
make: *** [fate-vsynth1-svq1] Error 139
make: *** [fate-vsynth2-ffv1] Error 139
make: *** [fate-vsynth2-ffv1.0] Error 139
make: *** [fate-vsynth2-svq1] Error 139
make: *** [fate-vsynth3-ffv1] Error 139
make: *** [fate-vsynth3-ffv1.0] Error 139
make: *** [fate-vsynth3-svq1] Error 139
make: *** [fate-lavf-dv_fmt] Error 139
make: *** [fate-flac-16-lpc-levinson] Error 139
make: *** [fate-alac-24-level-2] Error 139
make: *** [fate-aac-ct-sbr_i-ps_i.aac] Error 139
make: *** [fate-aac-al_sbr_ps_06_ur] Error 139
make: *** [fate-aac-ct-sbr_bc-ps_i.mp4] Error 139
make: *** [fate-aac-ct-sbr_bc-ps_i.3gp] Error 139
make: *** [fate-aac-ct-sbr_bic-ps_i.3gp] Error 139
make: *** [fate-aac-ct-sbr_bc-ps_bc.mp4] Error 139
make: *** [fate-aac-ct-sbr_i-ps_bic.mp4] Error 139
make: *** [fate-aac-ct-sbr_i-ps_i.mp4] Error 139


More information about the ffmpeg-devel mailing list