This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]