From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123678 invoked by alias); 23 Feb 2019 01:27:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 123643 invoked by uid 89); 23 Feb 2019 01:27:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 23 Feb 2019 01:27:07 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 883B9305B16F; Sat, 23 Feb 2019 01:27:06 +0000 (UTC) Received: from localhost (ovpn-116-60.phx2.redhat.com [10.3.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33B3B60856; Sat, 23 Feb 2019 01:27:06 +0000 (UTC) Date: Sat, 23 Feb 2019 02:04:00 -0000 From: Jonathan Wakely To: Jakub Jelinek Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] PR libstdc++/89446 fix null pointer dereference in char_traits Message-ID: <20190223012601.GS13569@redhat.com> References: <20190223010220.GA32714@redhat.com> <20190223010611.GN7611@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190223010611.GN7611@tucnak> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-02/txt/msg01874.txt.bz2 On 23/02/19 02:06 +0100, Jakub Jelinek wrote: >On Sat, Feb 23, 2019 at 01:02:20AM +0000, Jonathan Wakely wrote: >> PR libstdc++/89446 >> * include/bits/char_traits.h (__constant_char_array): Check index is >> in range before dereferencing. >> * testsuite/21_strings/basic_string_view/operators/char/89446.cc: >> New test. >> >> Tested x86_64-linux, committed to gcc-8-branch and gcc-7-branch. > >And not trunk? The bug is still there, even when it should be usually >ifdefed out because __builtin_is_constexpr_evaluated() should be supported. Yes, that's a bigger patch (with some cleanup) which is coming shortly.