Re: [PATCH] perf: Incorrect use of snprintf results in SEGV

From: Arnaldo Carvalho de Melo
Date: Wed Mar 07 2012 - 19:58:51 EST


Em Wed, Mar 07, 2012 at 03:19:51PM -0600, Peter Seebach escreveu:
> On Wed, 7 Mar 2012 21:37:25 +0100 Ingo Molnar <mingo@xxxxxxx> wrote:
> > We *DONT* want to make APIs more fragile just to accomodate a
> > rare, esoteric usecase!
>
> I would view snprintf as an API which already exists. If it's the
> wrong API, by all means, write a different one -- but I would suggest
> not using the same name for it. If a function is going to be called
> snprintf, IMO it should have the semantics of snprintf. If those are
> the wrong semantics (and they may well be), then I would say use a
> function which has the right semantics, and isn't named snprintf.

Right, its more a case of: Don't assume people do things you think are
reasonable, read carefully and follow the instructions.

At least it is not as long as other EULAs, it is much, much shorter,
but managed to be just as non intuitive.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/