mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: open issues
Date: Wed, 30 Aug 2017 16:10:18 -0400	[thread overview]
Message-ID: <20170830201018.GF1627@brightrain.aerifal.cx> (raw)
In-Reply-To: <alpine.LNX.2.20.13.1708302232430.21360@monopod.intra.ispras.ru>

On Wed, Aug 30, 2017 at 10:37:44PM +0300, Alexander Monakov wrote:
> On Wed, 30 Aug 2017, Rich Felker wrote:
> > Great find. I wonder if compiler/diagnostic tool ppl are aware of this
> > extension to the C language that XSI imposes. It definitely affects
> > things like UBSan, and of course compilers' optimization based on
> > assumptions that UB doesn't happen.
> 
> If musl is going to use this throughout the implementation, I think it
> should be documented somewhere: it's of course fair game to use this
> guarantee in implementation of interfaces that are themselves XSI-shaded,
> but using it to implement more basic interfaces is less obviously so.

Have you looked at the specific issue in question? It's scanf's
handling of %n$ positional args. If we want to make scanf
non-dependent on this property of va_arg when called without this form
of arguments, we need to add significant additional code to track and
match the pointer types for each arg. I'm not opposed to that but it's
nontrivial work.

I'd rather *not* make use of this property of va_arg gratuitously in
other parts of musl, since I find it rather contrary to the intent of
the language.

Rich


  reply	other threads:[~2017-08-30 20:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27  4:36 Szabolcs Nagy
2017-08-27  6:07 ` A. Wilcox
2017-08-30  1:30 ` Rich Felker
2018-01-04 12:01   ` Alexander Monakov
2018-01-09 17:10     ` Rich Felker
2017-08-30  2:06 ` Rich Felker
2017-08-30  8:26   ` Pascal Cuoq
2017-08-30 19:20     ` Rich Felker
2017-08-30 19:37       ` Alexander Monakov
2017-08-30 20:10         ` Rich Felker [this message]
2017-08-30 19:51   ` A. Wilcox
2017-08-30 22:08     ` Rich Felker
2017-09-04 22:00   ` Szabolcs Nagy
2017-09-07  2:18   ` Rich Felker
2017-09-07  2:32     ` Rich Felker
2017-09-22 22:03       ` Szabolcs Nagy
2017-10-14  2:59       ` Rich Felker
2017-10-21 16:27     ` Rich Felker
2017-08-30 19:53 ` Stefan Sedich
2017-08-31  9:34   ` Szabolcs Nagy
2017-08-31 15:37     ` Stefan Sedich
2017-08-31 16:04     ` 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=20170830201018.GF1627@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --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).