7e6bb868cc
Turns out std::sort() gets angry when various ranges of an array alias each other in memory. We wouldn't like it when it's angry. Fixed: chromium:1209152 Change-Id: Ic927b46c59d10f7d3856768628c773b344005979 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2897098 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Auto-Submit: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74598}
14 lines
379 B
JavaScript
14 lines
379 B
JavaScript
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --multi-mapped-mock-allocator
|
|
|
|
let size = 8 * 1024 * 1024;
|
|
let initialized = 2 * 1024 * 1008;
|
|
let array = new Uint8Array(size);
|
|
for (let i = 0; i < initialized; i++) {
|
|
array[i] = 42;
|
|
}
|
|
array.sort();
|