mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Markus Wichmann <nullplan@gmx.net>
To: musl@lists.openwall.com
Subject: Re: [musl] execvp() behaviour with unrecognized file header
Date: Thu, 13 Feb 2020 21:11:03 +0100	[thread overview]
Message-ID: <20200213201103.GB3383@voyager> (raw)
In-Reply-To: <6ead5f7b-d645-5df0-cb06-a99178471a96@bell-sw.com>

Hi all,

so I had a look around at other implementations, since I thought the
problem might be a solved one, and here's what I found:

newlib does not support this behavior at all.

bionic uses a VLA for the new argv[]. I didn't even know C++ had VLAs,
so at least I learned something from this.

glibc also uses a VLA.

klibc also does not support this behavior.

uclibc-ng is an interesting one. On architectures with MMU they allocate
the necessary space with alloca(), but without an MMU, they will use
mmap() directly to try and minimize the memory leak, as a comment
directly before the code responsible tells us.

So yeah, the competition appears to either not bother or just use VLAs.
I guess it is not a huge problem in practice?

Ciao,
Markus

  parent reply	other threads:[~2020-02-13 20:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 13:54 Alexander Scherbatiy
2020-02-12 14:13 ` A. Wilcox
2020-02-12 14:27   ` Rich Felker
2020-02-12 20:01     ` A. Wilcox
2020-02-13 10:02     ` Micha Nelissen
2020-02-13 18:29       ` Rich Felker
2020-02-13 20:11 ` Markus Wichmann [this message]
2020-02-13 23:21   ` Rich Felker

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

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

  git send-email \
    --in-reply-to=20200213201103.GB3383@voyager \
    --to=nullplan@gmx.net \
    --cc=musl@lists.openwall.com \
    /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.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).