[Bug libstdc++/30416] SIGSEGV in valarray::cshift(n) on empty array

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Tue Jan 9 23:17:00 GMT 2007



------- 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



More information about the Gcc-bugs mailing list