From: "Michael S. Zick" <mszick@morethan.org>
To: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Re: Looking at vfprintf.c and alloca.
Date: Wed, 19 Jul 2006 10:22:44 -0500 [thread overview]
Message-ID: <200607191022.45082.mszick@morethan.org> (raw)
In-Reply-To: <44BDA13F.6040706@tausq.org>
On Tue July 18 2006 22:04, Randolph Chung wrote:
> > What doesn't work? ptr - old = 0x1c0 = 7 * 64. The preferred
> > stack boundary is 64 bytes. 6 * 64 = 384 bytes. That's too
> > small for the requested allocation. &old[100] - old = 0x190 = 400.
> > So, the results printed appear correct.
>
> gcc is completely correct, I meant to agree with your other email, that
> is glibc is totally bogus ;P
>
Since I have exchanged off-list bits and pieces that are related to the
series 4 compilers, let me try to explain the observations to date.
Joel has invested months of time, looking for the cause of 64-bit-smp
hangs under heavy load.
He will post when he is ready, I say nothing here other than he is
still working hard on the problem.
I have an interest in getting -finstrument-functions to work to my
own standard of satisfaction. I will post to the appropriate lists
when I am certain I have all of the "cockpit error" out of my findings.
</end disclaimers>
I will be very careful to avoid the word: "mis-compiled" since it does
not apply to the following;
Given any series 3 compiler...
Given any C source code...
Define the assembler code generated as "expected output"...
Define the logical function(s) performed by that code
as the "expected result".
The test standard of "expected output" is only an indicator;
not an error in itself.
We have found, Joel in the functions using spinlock macros;
Myself in the functions of the gcc provided crt* files;
That not only is the series 4 compiler not generating the
expected output (only an indicator) but it is not generating
the expected result (functionally equivalent code).
To date, neither of us have found a "wrong code" error in
the compilers.
What we have found are "source based" problems, in general,
the series 4 compilers require additional annotations in the
source to generate functionally equivalent code.
Without sufficient, proper, annotations; the series 4 compiler
will (correctly) throw away things the author of the source
expected to always be part of the "expected result".
The above is not our "single point of failure". We have both
discovered good, old fashioned, programming errors in addition
to the above.
Which brings me to the subject of this thread, the vfprintf.c
is a "good, old fashioned, programming error" if the code expects
the stack space generated by alloca to be contiguous with any
other stack object. That is true for either series compiler,
on any machine, regardless of stack direction growth.
(The man page for alloca could also use some help. Its text
ignores the effect of compiler stack padding.)
> randolph
Mike
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next prev parent reply other threads:[~2006-07-19 15: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
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 [this message]
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=200607191022.45082.mszick@morethan.org \
--to=mszick@morethan.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox