public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: gcc-patches@gcc.gnu.org, gcc@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Analysis of solaris2 27_io/istream_extractor_arith.cc failures
Date: Thu, 26 Dec 2002 17:51:00 -0000	[thread overview]
Message-ID: <200212261347.IAA14641@caip.rutgers.edu> (raw)

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

             reply	other threads:[~2002-12-26 13:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-26 17:51 Kaveh R. Ghazi [this message]
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

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=200212261347.IAA14641@caip.rutgers.edu \
    --to=ghazi@caip.rutgers.edu \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).