From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 78947158013 for ; Sat, 28 Aug 2021 19:43:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BEFB5E07EE; Sat, 28 Aug 2021 19:43:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A4C9AE07EE for ; Sat, 28 Aug 2021 19:43:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5DC63342B9D for ; Sat, 28 Aug 2021 19:43:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 95D954E for ; Sat, 28 Aug 2021 19:43:07 +0000 (UTC) From: "Stephan Hartmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Stephan Hartmann" Message-ID: <1630179774.d50088b3d4fd368f392c82ac95b67a499cdb7032.sultan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-client/chromium/files/chromium-92-GetUsableSize-nullptr.patch X-VCS-Directories: www-client/chromium/files/ X-VCS-Committer: sultan X-VCS-Committer-Name: Stephan Hartmann X-VCS-Revision: d50088b3d4fd368f392c82ac95b67a499cdb7032 X-VCS-Branch: master Date: Sat, 28 Aug 2021 19:43:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 47a65686-7817-4c6d-bdc3-5a627a362b9f X-Archives-Hash: 43383f8b1671c4322fbf251ed9fbcbbc commit: d50088b3d4fd368f392c82ac95b67a499cdb7032 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Sat Aug 28 19:25:03 2021 +0000 Commit: Stephan Hartmann gentoo org> CommitDate: Sat Aug 28 19:42:54 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d50088b3 www-client/chromium: remove unused patch Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/22145 Signed-off-by: Stephan Hartmann gentoo.org> .../files/chromium-92-GetUsableSize-nullptr.patch | 46 ---------------------- 1 file changed, 46 deletions(-) diff --git a/www-client/chromium/files/chromium-92-GetUsableSize-nullptr.patch b/www-client/chromium/files/chromium-92-GetUsableSize-nullptr.patch deleted file mode 100644 index e36ed1b6615..00000000000 --- a/www-client/chromium/files/chromium-92-GetUsableSize-nullptr.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 61e16c92ff24bb71b9b7309a9d6d470ee91738bc Mon Sep 17 00:00:00 2001 -From: Bartek Nowierski -Date: Wed, 21 Jul 2021 15:01:38 +0000 -Subject: [PATCH] [PA] Make GetUsableSize() handle nullptr gracefully - -malloc_usable_size() is expected to not crush on NULL and return 0. - -Bug: 1221442 -Change-Id: I6a3b90dcf3a8ad18114c206d87b98f60d5f50eb1 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3042177 -Commit-Queue: Bartek Nowierski -Commit-Queue: Kentaro Hara -Auto-Submit: Bartek Nowierski -Reviewed-by: Kentaro Hara -Cr-Commit-Position: refs/heads/master@{#903900} ---- - -diff --git a/base/allocator/partition_allocator/partition_alloc_unittest.cc b/base/allocator/partition_allocator/partition_alloc_unittest.cc -index c1212011..8863984 100644 ---- a/base/allocator/partition_allocator/partition_alloc_unittest.cc -+++ b/base/allocator/partition_allocator/partition_alloc_unittest.cc -@@ -2838,6 +2838,10 @@ - } - } - -+TEST_F(PartitionAllocTest, GetUsableSizeNull) { -+ EXPECT_EQ(0ULL, PartitionRoot::GetUsableSize(nullptr)); -+} -+ - TEST_F(PartitionAllocTest, GetUsableSize) { - size_t delta = SystemPageSize() + 1; - for (size_t size = 1; size <= kMinDirectMappedDownsize; size += delta) { -diff --git a/base/allocator/partition_allocator/partition_root.h b/base/allocator/partition_allocator/partition_root.h -index b72a1d9..baac9525 100644 ---- a/base/allocator/partition_allocator/partition_root.h -+++ b/base/allocator/partition_allocator/partition_root.h -@@ -1220,6 +1220,9 @@ - // PartitionAlloc's internal data. Used as malloc_usable_size. - template - ALWAYS_INLINE size_t PartitionRoot::GetUsableSize(void* ptr) { -+ // malloc_usable_size() is expected to handle NULL gracefully and return 0. -+ if (!ptr) -+ return 0; - auto* slot_span = SlotSpan::FromSlotInnerPtr(ptr); - auto* root = FromSlotSpan(slot_span); - return slot_span->GetUsableSize(root);