Skip to content

Commit be56618

Browse files
musicinmybraincopybara-github
authored andcommitted
PR #1888: Adjust Table.GrowExtremelyLargeTable to avoid OOM on i386
Imported from GitHub PR #1888 While this only covers `i386`/`i686`, which is the motivation for this PR, this test can be expected to OOM on any 32-bit platform. For now, this is the minimal change that avoids the problem [in the Fedora package](https://src.fedoraproject.org/rpms/abseil-cpp/). This fixes one of the two test failures reported in #1887. Merge 395acb7 into f28774a Merging this change closes #1888 COPYBARA_INTEGRATE_REVIEW=#1888 from musicinmybrain:extremely-large-table-32-bit 395acb7 PiperOrigin-RevId: 759154889 Change-Id: I0a105fc42c51898c277b4a056ccd6599b43e1a50
1 parent f28774a commit be56618

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

absl/container/internal/raw_hash_set_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4267,8 +4267,8 @@ struct ConstUint8Hash {
42674267
// 5. Finally we will catch up and go to overflow codepath.
42684268
TEST(Table, GrowExtremelyLargeTable) {
42694269
constexpr size_t kTargetCapacity =
4270-
#if defined(__wasm__) || defined(__asmjs__)
4271-
NextCapacity(ProbedItem4Bytes::kMaxNewCapacity); // OOMs on WASM.
4270+
#if defined(__wasm__) || defined(__asmjs__) || defined(__i386__)
4271+
NextCapacity(ProbedItem4Bytes::kMaxNewCapacity); // OOMs on WASM, 32-bit.
42724272
#else
42734273
NextCapacity(ProbedItem8Bytes::kMaxNewCapacity);
42744274
#endif

0 commit comments

Comments
 (0)