This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2007 03:37:10 -0000
- Subject: [Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array
- References: <bug-30416-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from gdr at integrable-solutions dot net 2007-01-10 03:37 -------
Subject: Re: SIGSEGV in valarray::cshift(n) on empty array
"pcarlini at suse dot de" <gcc-bugzilla@gcc.gnu.org> writes:
| Well, IMHO, avoiding this SIGSEGV is so easy, I would change anyway both
shift
| and cshift (i.e., wrap everything in a check that size() > 0), and be done
with
| it, if nobody strongly disagree...
Paolo -- there is what the standard says, and what we can or should implement.
I believe there is a genuine bug in the standard here, no matter how
easy it is to avoid the segmentation fault. This specific corner case is
most likely run into in testsuites; we better have the standard be
clear and let the testsuite implement what the standard says.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30416