You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucy.apache.org by Peter Karman <pe...@peknet.com> on 2010/01/20 15:56:35 UTC
Re: [Lucy] Re: 64-bit linux errors with t/core/032-string_helper.t
Peter Karman wrote on 01/20/2010 07:43 AM:
> Nathan Kurz wrote on 1/20/10 1:35 AM:
>
>> Could you attach your failing standalone test case so I can take a
>> quick look at it? I tried the inline one above, but saw nothing
>> strange with GCC 4.2.4 on Slamd64.
>>
>
> http://rectangular.com/pipermail/kinosearch/2010-January/007228.html
>
although changing the main() function to this, and compiling with -O2,
still works ok, which makes me think Marvin's comment about the variadic
function printf() might be on target.
int main() {
u8_t i, max;
int j;
for (j=0, i=0, max=255; i<max; i++, j++) {
printf("[%d] TRAILING[%d] SKIP[%d]\n",
j,
(int)StrHelp_UTF8_TRAILING[i],
(int)StrHelp_UTF8_SKIP[i]
);
}
}
--
Peter Karman . http://peknet.com/ . peter@peknet.com
Re: 64-bit linux errors with t/core/032-string_helper.t
Posted by Marvin Humphrey <ma...@rectangular.com>.
On Wed, Jan 20, 2010 at 12:25:01PM -0600, Peter Karman wrote:
> Marvin Humphrey wrote on 01/20/2010 11:22 AM:
>
> > Do you have valgrind on these boxen? It would be interesting to see valgrind
> > analysis of the small program with and without -02. However, I'm not sure
> > we'll see anything -- Valgrind's ability to detect stack corruption is
> > limited:
>
> http://peknet.com/~karpet/char-with-O2.txt
> http://peknet.com/~karpet/char-without-O2.txt
For the email archive record... there's almost no difference between these two
files. Valgrind wasn't able to help.
Marvin Humphrey
Re: 64-bit linux errors with t/core/032-string_helper.t
Posted by Peter Karman <pe...@peknet.com>.
Marvin Humphrey wrote on 01/20/2010 11:22 AM:
> Do you have valgrind on these boxen? It would be interesting to see valgrind
> analysis of the small program with and without -02. However, I'm not sure
> we'll see anything -- Valgrind's ability to detect stack corruption is
> limited:
http://peknet.com/~karpet/char-with-O2.txt
http://peknet.com/~karpet/char-without-O2.txt
--
Peter Karman . http://peknet.com/ . peter@peknet.com
Re: [Lucy] Re: 64-bit linux errors with t/core/032-string_helper.t
Posted by Marvin Humphrey <ma...@rectangular.com>.
On Wed, Jan 20, 2010 at 08:56:35AM -0600, Peter Karman wrote:
> although changing the main() function to this, and compiling with -O2,
> still works ok, which makes me think Marvin's comment about the variadic
> function printf() might be on target.
Well, that seems to demonstrate that it's variadic argument passing
misbehaving under -O2, but it's still misbehaving. I don't see anything in
the C code that's invalid. Kudos to Nate if he spots something I've missed.
Do you have valgrind on these boxen? It would be interesting to see valgrind
analysis of the small program with and without -02. However, I'm not sure
we'll see anything -- Valgrind's ability to detect stack corruption is
limited:
http://www.valgrind.org/docs/manual/faq.html#faq.overruns
Marvin Humphrey