slice valarrays with std::string -> segfault

Paolo Carlini pcarlini@suse.de
Sat Dec 10 21:27:00 GMT 2005


Paolo Carlini wrote:

>Gaby, I see __valarray_copy used (instead of __valarray_copy_construct)
>by the conversion constructor from slice_array for any type T: i.e., no
>placement new, that cannot possibly work a T such as 'struct element' in
>the posted snippet. Indeed, lots and lots of errors from valgrind...
>  
>
Just to explain concretely what I mean, the attached quick and dirty
hack avoids the Seg fault and makes valgrind happy. I think it tells us
something...

Paolo.

P.S. Conversation moved to libstdc++.

////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: expl_hack
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051210/7e7f4688/attachment.ksh>


More information about the Libstdc++ mailing list