From patchwork Sun Sep 25 14:44:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ville Voutilainen X-Patchwork-Id: 674628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3shqd80d3tz9s4n for ; Mon, 26 Sep 2016 00:44:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=dPERVjHq; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=VOgEb8SSSKsMGSaM4uYJasQbpYSaTwX2R4A1eyFKsC29pL XiPMFsQaWlMmOGZuwexI5UqDuDLk1Zu0Z6OesgyTDbcf4OCTTvPoXXav/NaKfxH7 n7t+GEgxN6AWnFCactZ7ur0wLg2LDKzu03hVTx9/Rjg4rvnYLTjW7/tCd/TBY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=uvBS79+8FsMxjZiV63qMtzM9iV0=; b=dPERVjHqYJ4PWbCBJSDs FpeW3nwPCDXkI+lFHf4IBZuuXQCrDhHWYVcN1bdU8v6rbX6s5aRuGceK5TxaHtX1 7zUmUgVgGO606I9hqTLPlpsGHkDFtNn5A+XDBVXiemQtHlxtcvXLlU6kAvfgykK1 EcarpEO7iyyNARGqcIrpK+U= Received: (qmail 83055 invoked by alias); 25 Sep 2016 14:44:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 83031 invoked by uid 89); 25 Sep 2016 14:44:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=villevoutilainengmailcom, ville.voutilainen@gmail.com, U*ville.voutilainen, 2016-09-25 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ua0-f172.google.com Received: from mail-ua0-f172.google.com (HELO mail-ua0-f172.google.com) (209.85.217.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 25 Sep 2016 14:44:39 +0000 Received: by mail-ua0-f172.google.com with SMTP id 15so84450079uai.3; Sun, 25 Sep 2016 07:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=j0YE0ruNJQElWRVMWp/Jyxqnsz9sEb3k722Z9EgpG9k=; b=hl9ogBVUHlsRCoysnwpflE8S1+WuJNCwbJNpIMqcaz5P5KyK8e4GY4t+xFun4UNEcJ HM86c0AMTi+C0Rd7vmMxl7IGctGA651IX9IFejtJnYXHtILDAMw1n+BS7M7SUZPmlp7l y+7JbYjektUDgyKH6HrFtotCOzvuJttzZxKqOrMxeyJaHank1D8+rdVKK0L2gB+Za5hO Nks+WvvE5OHEpDg7xDcKLnwxaZuVT8lEHobjqBcIgyWUNoZyaDHAVA9Vlq33H+2EeGgy XWUAo8wvUi26sAoFOVd6V2XspETUOr14SUAwh3Iih9Nsn22Py23rFWVGapBtlnFZIdIS PD9g== X-Gm-Message-State: AA6/9RlhSwCZ+GnwTWG+XVXX7rqzu0nBjirpfBWS6caHuHRkeQPcN4QJz07tcqWeSAmY6zaSoo4mEYKAJd5DNw== X-Received: by 10.176.4.118 with SMTP id 109mr10470168uav.126.1474814678042; Sun, 25 Sep 2016 07:44:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.104.193 with HTTP; Sun, 25 Sep 2016 07:44:37 -0700 (PDT) From: Ville Voutilainen Date: Sun, 25 Sep 2016 17:44:37 +0300 Message-ID: Subject: [v3 PATCH] PR libstdc++/77717 To: "libstdc++" , "gcc-patches@gcc.gnu.org" Tested on Linux-x64. 2016-09-25 Ville Voutilainen PR libstdc++/77717 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc: Fix an out-of-bounds access. diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc index 77188b3..28e2514 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc @@ -82,8 +82,8 @@ test01() test_value(strncmp(str_1.data(), str_0.data(), 6), z); test_value(strncmp(str_1.data(), str_0.data(), 14), lt); test_value(memcmp(str_1.data(), str_0.data(), 6), z); - test_value(memcmp(str_1.data(), str_0.data(), 14), lt); - test_value(memcmp("costa marbella", "costa rica", 14), lt); + test_value(memcmp(str_1.data(), str_0.data(), 10), lt); + test_value(memcmp("costa marbella", "costa rica", 10), lt); // int compare(const basic_string_view& str) const; test_value(str_0.compare(str_1), gt); //because r>m