From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1888) id 550FB3861034; Thu, 29 Oct 2020 14:14:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 550FB3861034 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Patrick Palka To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-4528] libstdc++: Fix memory issue in ranges::lexicographical_compare testcase X-Act-Checkin: gcc X-Git-Author: Patrick Palka X-Git-Refname: refs/heads/master X-Git-Oldrev: 6e23549157d671f4f2e61756a0d0924cc59718ab X-Git-Newrev: 2e0216f9c4db8fde09706f57e6a6d80161c0da07 Message-Id: <20201029141401.550FB3861034@sourceware.org> Date: Thu, 29 Oct 2020 14:14:01 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 14:14:01 -0000 https://gcc.gnu.org/g:2e0216f9c4db8fde09706f57e6a6d80161c0da07 commit r11-4528-g2e0216f9c4db8fde09706f57e6a6d80161c0da07 Author: Patrick Palka Date: Thu Oct 29 10:11:12 2020 -0400 libstdc++: Fix memory issue in ranges::lexicographical_compare testcase libstdc++-v3/ChangeLog: * testsuite/25_algorithms/lexicographical_compare/constrained.cc: (test03): Fix initializing the vector vy with the array y of size 4. Diff: --- .../testsuite/25_algorithms/lexicographical_compare/constrained.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc index b82c872bbbb..2019bbc75e4 100644 --- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc +++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc @@ -136,7 +136,7 @@ test03() VERIFY( !ranges::lexicographical_compare(cy.begin(), cy.end(), cz.begin(), cz.end()) ); - std::vector vx(x, x+5), vy(y, y+5); + std::vector vx(x, x+5), vy(y, y+4); VERIFY( ranges::lexicographical_compare(vx, vy) ); VERIFY( !ranges::lexicographical_compare(vx, vy, ranges::greater{}) ); VERIFY( !ranges::lexicographical_compare(vy, vx) );