unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Petteri Hintsanen <petterih@iki.fi>
To: <tomas@tuxteam.de>
Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
Subject: Re: Bindat can exhaust memory when unpacking to vector
Date: Sun, 12 Nov 2023 21:11:44 +0200	[thread overview]
Message-ID: <x2mwmumzszz.fsf@iki.fi> (raw)
In-Reply-To: <ZTdJYDYzBdSo+hCv@tuxteam.de> (tomas@tuxteam.de's message of "Tue, 24 Oct 2023 06:34:40 +0200")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Kind of an embarrassing blind spot.  BinDat should instead encourage the
> addition of sanity checks within the parsing code (including maybe add
> specific support for it).

This was also something I had in mind, along the lines of what Tomas
wrote below:

<tomas@tuxteam.de> writes:

> 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.

So yes, I also agree that this could be an extension opportunity, but I
wouldn't push it further until we have concrete use cases.  It is
usually futile to try to generalize from zero examples.  (Well, I do
have one example, but still.)

For the time being using inline checks within the specification suffices
for me.

Thanks,
Petteri



  reply	other threads:[~2023-11-12 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-22 19:36 Bindat can exhaust memory when unpacking to vector Petteri Hintsanen
2023-10-23 11:25 ` Eli Zaretskii
2023-10-23 19:36   ` Petteri Hintsanen
2023-10-24  4:34     ` tomas
2023-11-12 19:11       ` Petteri Hintsanen [this message]
2023-11-04  7:48     ` Eli Zaretskii
2023-11-04  8:21       ` Stefan Monnier
2024-03-10 21:58         ` Stefan Monnier
2024-03-19 20:09           ` Petteri Hintsanen
2024-03-19 21:08             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x2mwmumzszz.fsf@iki.fi \
    --to=petterih@iki.fi \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tomas@tuxteam.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).