public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Analysis of solaris2 27_io/istream_extractor_arith.cc failures
@ 2002-12-26 17:51 Kaveh R. Ghazi
  2002-12-26 19:16 ` Gabriel Dos Reis
  0 siblings, 1 reply; 12+ messages in thread
From: Kaveh R. Ghazi @ 2002-12-26 17:51 UTC (permalink / raw)
  To: gcc-patches, gcc, libstdc++

The libstdc++-v3 results for solaris2.7 for our three branches (3.2,
3.3 and 3.4) all show errors for 27_io/istream_extractor_arith.cc.
E.g. http://gcc.gnu.org/ml/gcc-testresults/2002-12/msg01074.html

I found this posting which attributes it to a bug in sun's libc sscanf
implementation: http://gcc.gnu.org/ml/gcc-bugs/2002-05/msg01008.html

Indeed, I've been able to reproduce the problem with this simple C program:

	
	#include <stdio.h>
	#define SHORT "1234567890123456789012345678901234567890"
	#define MED SHORT SHORT SHORT SHORT SHORT SHORT SHORT SHORT SHORT SHORT
	#define LONG MED MED MED MED MED MED MED MED MED MED
	#define STRING LONG MED MED MED SHORT SHORT SHORT SHORT SHORT SHORT 
	int main()
	{
	  long double ld;
	
	  sscanf (STRING, "%Lf", &ld);
	  fprintf (stderr, "<%Lf>\n", ld);
	  
	  return 0;
	}

	%gcc -O -g -W -Wall foo.c
	%./a.out
	Segmentation fault


Since this is a vendor libc bug and not something gcc can fix, I'd
like to xfail the test.  However because of the convention in
libstdc++-v3 of putting multiple tests in a single file, I don't want
to xfail the whole thing because we still want to ensure that all of
the other tests pass, or know that they (separately) fail.  Therefore
I'd like to chop out the particular code (test12) into a new file and
xfail just that test.  I quickly tried commenting out test12() and
luckily the rest of the tests in there pass.

The posting above claims that the bug is sparc specific, i.e. not
x86/solaris.  I don't have x86-solaris to test that but for now I'll
only xfail the sparc*-*-solaris2* target.  If it turns up on x86 we
can easily change the cpu from sparc* to *.

Patch to follow after some testing.  Any suggestions for the name of
the new split out file?  Using istream_extractor_arith2 didn't seem
very descriptive.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-01-06  5:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-26 17:51 Analysis of solaris2 27_io/istream_extractor_arith.cc failures Kaveh R. Ghazi
2002-12-26 19:16 ` Gabriel Dos Reis
2002-12-26 21:56   ` Kaveh R. Ghazi
2003-01-04 14:56     ` Kaveh R. Ghazi
2003-01-05  1:55     ` Benjamin Kosnik
2003-01-05  2:18       ` Gabriel Dos Reis
2003-01-05  4:57         ` Benjamin Kosnik
2003-01-05  6:31       ` Kaveh R. Ghazi
2003-01-05 11:19         ` Phil Edwards
2003-01-05 19:36           ` Kaveh R. Ghazi
2003-01-06  4:38           ` Kaveh R. Ghazi
2003-01-06  5:18             ` Benjamin Kosnik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).