Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 30 Aug 2017 16:10:18 -0400
From: Rich Felker <>
Subject: Re: open issues

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.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.