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: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2007 23:17:27 -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 #5 from pcarlini at suse dot de 2007-01-09 23:17 -------
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... While we are at it, quickly looking at the
code I don't think the current code deals correctly with { n : |n| > size() },
both shift and cshift, a much more general issue, if I read correctly the
standard, and also rather straightforward to solve.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pcarlini at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30416