From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Bindat can exhaust memory when unpacking to vector Date: Tue, 24 Oct 2023 06:34:40 +0200 Message-ID: References: <87pm16fnzv.fsf@iki.fi> <83zg09oa1v.fsf@gnu.org> <87a5s9m8ri.fsf@iki.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IEdNOvdYpkKasfsQ" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12220"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Petteri Hintsanen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 24 06:35:17 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qv98P-0002uM-80 for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Oct 2023 06:35:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qv97u-00022o-2V; Tue, 24 Oct 2023 00:34:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qv97s-00022V-2C for emacs-devel@gnu.org; Tue, 24 Oct 2023 00:34:44 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qv97q-0007WT-OI; Tue, 24 Oct 2023 00:34:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mnpfBVheH9L1NSeEOENMOF4ZW+qf0sj/U0D/4tuyU9s=; b=R5dxI6lwREs4Q7OLt3J0e/z+99 WkLmHWB5bI0zuRKJv6ptSSMKOur0Gi+VlL7T0geI0FCiKXsBXPm/iNtjRTLxoB5bXtia3wMzAgFwq QPDf4PSCJm5qpLe9BXiwDYKVSHbz+MIY/NysI2AC29Pn144xM1Lz9qogqN/powmLT6D9zBGVFsWb0 twussgeK/pW2rpG0Ae+zqSfNG5ihxCxo07J/3jl9konSJ2nauPwtbyAwAw9lKBOhM7iP8AMLI3EUp dA8JeTlOF/YbWkl860w98z4pxFzSDaVtT+4mPtoJtU7quSAIa0zqN9Qc6Vl5FAnRf+dyuXFrsWiHk 7w1bajJQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1qv97o-0001Uv-QT; Tue, 24 Oct 2023 06:34:40 +0200 Content-Disposition: inline In-Reply-To: <87a5s9m8ri.fsf@iki.fi> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311745 Archived-At: --IEdNOvdYpkKasfsQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 23, 2023 at 10:36:01PM +0300, Petteri Hintsanen wrote: > Eli Zaretskii writes: [...] > > Can you argue why this should be considered a problem for Emacs to > > solve, and not a cockpit error on the part of the Lisp program that > > makes such calls? >=20 > No, not really. Now when I think about it, it is fairly obvious that > the programmer should realize this when using such low level mechanism > as Bindat. OTOH, a maximum length of something might be thought as a (n optional) part of a type description. Types are predicates. As could be a set of bounds for a numerical type. Perhaps there's an extension opportunity for bindat. Cheers --=20 t --IEdNOvdYpkKasfsQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZTdJYAAKCRAFyCz1etHa RmqUAJ9vV/P6jp++5DNroguq6k45r1CSIwCeIPkxi8rs4KS8EXY2OmYQwaNOfA4= =q1Jx -----END PGP SIGNATURE----- --IEdNOvdYpkKasfsQ--