From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58588 invoked by alias); 28 May 2015 12:34:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 58112 invoked by uid 55); 28 May 2015 12:34:13 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/65352] array::begin()/end() etc. forms a null reference and breaks on clang+ubsan Date: Thu, 28 May 2015 12:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg02350.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65352 --- Comment #6 from Jonathan Wakely --- Author: redi Date: Thu May 28 12:33:41 2015 New Revision: 223812 URL: https://gcc.gnu.org/viewcvs?rev=223812&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: branches/gcc-5-branch/libstdc++-v3/ChangeLog branches/gcc-5-branch/libstdc++-v3/include/std/array branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc branches/gcc-5-branch/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc