From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 5FF033857823 for ; Mon, 16 Aug 2021 19:25:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5FF033857823 Received: by mail-wr1-x42a.google.com with SMTP id k29so25085828wrd.7 for ; Mon, 16 Aug 2021 12:25:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=e/dmZY/2km+x6lhARdmY54RnsxyXspFarGdtnGXThZY=; b=AJLxechtk/su5f5XpPkRiz+RzFV2H9M9nZi7aXZ1X4oinKxnq6cRTVfXOAKLQ8hpWk 7JfTDIvRtZPbu6nuo8COADflFNFjjdrRIOvGTBjBrUUsN7aKckI7MCTNaZGeSrxamljS wsjAcL5VMCeCCuCWl7RD8GxaTpIKAQw6hOIjd3BTWKOec6DZCC1PmOMGpOdScpxIIe5p 4x6sm/cRfUh8WacGGBQbVyPyWE0tEzZrHln1+judc9Smei5ss+TzqiMF5B5NTEIQ6MvU E8fa2T7iaJYKnwWmMFmFkZv0XgQkCc6WDx8zgrCohle+e4PG+kVCIt+SqjWGhs2WWWCA /nBw== X-Gm-Message-State: AOAM531jH8rggsmmoWOyOH7n5169bOnvI/yH6Es5JrfkI3ngb0m2fHbp lAia7iy++k5BQQR6/BkGhaKd+/nYtgNIhFkz0+U= X-Google-Smtp-Source: ABdhPJwsMwSP8IQnWMpySsF2ZaQGX67mVyPmNzWjYNPZFBylYP5Jn4sNEeQf6/bITSB81EZmX9zl7Uyl7YcNzndr/ww= X-Received: by 2002:adf:ee90:: with SMTP id b16mr41011wro.185.1629141955539; Mon, 16 Aug 2021 12:25:55 -0700 (PDT) MIME-Version: 1.0 References: <20200227130636.GV9441@redhat.com> In-Reply-To: From: Jonathan Wakely Date: Mon, 16 Aug 2021 20:25:44 +0100 Message-ID: Subject: Re: [PATCH] Improvements to valid range checks in debug mode To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2021 19:25:58 -0000 On Fri, 13 Aug 2021 at 18:10, Fran=C3=A7ois Dumont via Libstdc++ wrote: > > I just come back to this email and it sounds like the right moment to > commit it. Ah yes, thanks for the reminder! I'll push it tomorrow. > > On 27/02/20 2:06 pm, Jonathan Wakely wrote: > > These should wait for stage 1 but I'm posting them now for comment. > > > > With the change to __gnu_debug::__valid_range we now get a debug > > assertion for: > > > > std::string s; > > std::min_element(std::string::iterator{}, s.end()); > > > > where previously it would just crash with undefined behaviour. > > >