All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: John David Anglin <dave@hiauly1.hia.nrc.ca>,
	parisc-linux <parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] Re: Looking at vfprintf.c and alloca.
Date: Tue, 18 Jul 2006 14:22:30 -0600	[thread overview]
Message-ID: <20060718202230.GA23947@parisc-linux.org> (raw)
In-Reply-To: <119aab440607181230l3abcf965y5afe9fe6901e36d7@mail.gmail.com>

On Tue, Jul 18, 2006 at 03:30:40PM -0400, Carlos O'Donell wrote:
> On 7/18/06, Randolph Chung <randolph@tausq.org> wrote:
> >tausq@riot:~$ gcc-4.1 -Wall -o alloca alloca.c; ./alloca
> >ptr = 0xc04ca590
> >old = 0xc04ca3d0
> >&old[100] = 0xc04ca560
> 
> I thought so, if this code is ever execute it will be wrong.
> 
> I think our tst-printfsz failure is related to this code trying to
> expand the specs and getting the wrong answer.
> 
> Michael, want to write a patch to fix this for glibc? :)
> I'll support you on libc-alpha!
> 
> In glibc I don't think the code should be a runtime check at all,
> there are STACK_GROWS_UP macros that should be used.

How about just using min(ptr, old)?  ;-)
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  parent reply	other threads:[~2006-07-18 20:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18  3:40 [parisc-linux] Looking at vfprintf.c and alloca Carlos O'Donell
2006-07-18 15:51 ` [parisc-linux] " Randolph Chung
2006-07-18 16:51   ` Michael S. Zick
2006-07-19  3:22     ` John David Anglin
2006-07-18 19:30   ` Carlos O'Donell
2006-07-18 20:11     ` Michael S. Zick
2006-07-18 20:22     ` Matthew Wilcox [this message]
2006-07-18 20:49       ` Carlos O'Donell
2006-07-19  2:48   ` John David Anglin
2006-07-19  3:04     ` Randolph Chung
2006-07-19 15:22       ` Michael S. Zick
2006-07-20  4:54         ` John David Anglin
2006-07-19  2:36 ` John David Anglin

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=20060718202230.GA23947@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=carlos@systemhalted.org \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=parisc-linux@lists.parisc-linux.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.