From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTP id 3B3B243F3B
	for <ffmpegdev@gitmailbox.com>; Thu, 18 Aug 2022 15:19:25 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0594368B9B1;
	Thu, 18 Aug 2022 18:19:23 +0300 (EEST)
Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net
 [217.70.183.201])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B0AE268B646
 for <ffmpeg-devel@ffmpeg.org>; Thu, 18 Aug 2022 18:19:16 +0300 (EEST)
Received: (Authenticated sender: michael@niedermayer.cc)
 by mail.gandi.net (Postfix) with ESMTPSA id CC94A1BF207
 for <ffmpeg-devel@ffmpeg.org>; Thu, 18 Aug 2022 15:19:15 +0000 (UTC)
Date: Thu, 18 Aug 2022 17:19:14 +0200
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <20220818151914.GG2088045@pb2>
References: <20220818134605.12583-1-anton@khirnov.net>
 <20220818134605.12583-2-anton@khirnov.net>
MIME-Version: 1.0
In-Reply-To: <20220818134605.12583-2-anton@khirnov.net>
Subject: Re: [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg: stop using
 av_stream_get_parser()
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: multipart/mixed; boundary="===============0208952399723299725=="
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/20220818151914.GG2088045@pb2/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>


--===============0208952399723299725==
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="VvwS7Fyc3fvERiQe"
Content-Disposition: inline


--VvwS7Fyc3fvERiQe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 18, 2022 at 03:46:03PM +0200, Anton Khirnov wrote:
> The parser is internal to the demuxer, so its state at any particular
> point is not well-defined for the caller. Additionally, it is being
> accessed from the main thread, while demuxing runs in a separate thread.
>=20
> Use a separate parser owned by ffmpeg.c to retrieve the same
> information.
>=20
> Fixes races, e.g. in:
> - fate-h264-brokensps-2580
> - fate-h264-extradata-reload
> - fate-iv8-demux
> - fate-m4v-cfr
> - fate-m4v
> ---
>  fftools/ffmpeg.c     | 33 +++++++++++++++++++++++++++++++--
>  fftools/ffmpeg.h     |  9 +++++++++
>  fftools/ffmpeg_opt.c |  9 +++++++++
>  3 files changed, 49 insertions(+), 2 deletions(-)

This segfaults:
=2E/ffmpeg -max_alloc 100000 -i ~/tickets/2950/mpeg2_fuzz.mpg  -max_muxing_=
queue_size 8000 -f null -

=3D=3D25621=3D=3D Invalid read of size 4
=3D=3D25621=3D=3D    at 0x2F3018: add_input_streams (in ffmpeg_g)
=3D=3D25621=3D=3D    by 0x2F3BB0: open_input_file (in ffmpeg_g)
=3D=3D25621=3D=3D    by 0x2FA93B: ffmpeg_parse_options (in ffmpeg_g)
=3D=3D25621=3D=3D    by 0x2E74B4: main (in ffmpeg_g)
=3D=3D25621=3D=3D  Address 0x14 is not stack'd, malloc'd or (recently) free=
'd

thx

[...]
--=20
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell

--VvwS7Fyc3fvERiQe
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYv5YbgAKCRBhHseHBAsP
q2fiAJ9mu8VrIHd5fB9ksgpdlJDDER2x9ACggwPJeoxnIw2hzvKsZ627tcUPnAM=
=yyIy
-----END PGP SIGNATURE-----

--VvwS7Fyc3fvERiQe--

--===============0208952399723299725==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

--===============0208952399723299725==--