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++/65352] array<T,0>::begin()/end() etc. forms a null reference and breaks on clang+ubsan


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65352

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu May 28 11:53:35 2015
New Revision: 223806

URL: https://gcc.gnu.org/viewcvs?rev=223806&root=gcc&view=rev
Log:
        PR libstdc++/65352
        * include/std/array (__array_traits::_S_ptr): New function.
        (array::data): Use _S_ptr to avoid creating invalid reference.
        * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
        dg-error line numbers.
        * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
        likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/array
    trunk/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc


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