Skip to content

Commit 9a949d5

Browse files
committed
Auto merge of #31889 - alexcrichton:update-jemalloc-again, r=nikomatsakis
Now that jemalloc/jemalloc@767d850 is upstream, the relevant deadlocking issue which prompted our downgrade has been resolved. As a result, there's no known issue to *not* upgrade! This also re-enables jemalloc for the pc-windows-gnu target as known issues with that have also been fixed. Closes #31030
2 parents 7cee8b9 + c5fdd8d commit 9a949d5

7 files changed

+27
-39
lines changed

mk/cfg/i686-pc-windows-gnu.mk

-2
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ CFG_GNU_TRIPLE_i686-pc-windows-gnu := i686-w64-mingw32
2525
CFG_THIRD_PARTY_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o
2626
CFG_INSTALLED_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
2727
CFG_RUSTRT_HAS_STARTUP_OBJS_i686-pc-windows-gnu := 1
28-
# FIXME(#31030) - there's not a great reason to disable jemalloc here
29-
CFG_DISABLE_JEMALLOC_i686-pc-windows-gnu := 1

mk/cfg/x86_64-pc-windows-gnu.mk

-2
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ CFG_GNU_TRIPLE_x86_64-pc-windows-gnu := x86_64-w64-mingw32
2525
CFG_THIRD_PARTY_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o
2626
CFG_INSTALLED_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
2727
CFG_RUSTRT_HAS_STARTUP_OBJS_x86_64-pc-windows-gnu := 1
28-
# FIXME(#31030) - there's not a great reason to disable jemalloc here
29-
CFG_DISABLE_JEMALLOC_x86_64-pc-windows-gnu := 1

src/jemalloc

Submodule jemalloc updated 134 files

src/test/compile-fail/allocator-dylib-is-system.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-windows everything is the system allocator on windows
12-
// ignore-musl no dylibs on musl yet
13-
// ignore-bitrig no jemalloc on bitrig
14-
// ignore-openbsd no jemalloc on openbsd
1511
// aux-build:allocator-dylib.rs
12+
// aux-build:allocator1.rs
1613
// no-prefer-dynamic
1714
// error-pattern: cannot link together two allocators
1815

@@ -23,7 +20,18 @@
2320
#![feature(alloc_jemalloc)]
2421

2522
extern crate allocator_dylib;
23+
24+
// The main purpose of this test is to ensure that `alloc_jemalloc` **fails**
25+
// here (specifically the jemalloc allocator), but currently jemalloc is
26+
// disabled on quite a few platforms (bsds, emscripten, msvc, etc). To ensure
27+
// that this just passes on those platforms we link in some other allocator to
28+
// ensure we get the same error.
29+
//
30+
// So long as we CI linux/OSX we should be good.
31+
#[cfg(any(target_os = "linux", target_os = "macos"))]
2632
extern crate alloc_jemalloc;
33+
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
34+
extern crate allocator1;
2735

2836
fn main() {
2937
allocator_dylib::foo();

src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs

+12-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-windows everything is the system allocator on windows
12-
// ignore-musl no dylibs on musl right now
13-
// ignore-bitrig no jemalloc on bitrig
14-
// ignore-openbsd no jemalloc on openbsd
1511
// aux-build:allocator-dylib2.rs
12+
// aux-build:allocator1.rs
1613
// error-pattern: cannot link together two allocators
1714

1815
// Ensure that rust dynamic libraries use jemalloc as their allocator, verifying
@@ -21,9 +18,19 @@
2118
#![feature(alloc_system)]
2219

2320
extern crate allocator_dylib2;
21+
22+
// The main purpose of this test is to ensure that `alloc_system` **fails**
23+
// here (specifically the system allocator), but currently system is
24+
// disabled on quite a few platforms (bsds, emscripten, msvc, etc). To ensure
25+
// that this just passes on those platforms we link in some other allocator to
26+
// ensure we get the same error.
27+
//
28+
// So long as we CI linux/OSX we should be good.
29+
#[cfg(any(target_os = "linux", target_os = "macos"))]
2430
extern crate alloc_system;
31+
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
32+
extern crate allocator1;
2533

2634
fn main() {
2735
allocator_dylib2::foo();
2836
}
29-

src/test/run-pass/allocator-default.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
#![feature(alloc_jemalloc, alloc_system)]
1212

13-
#[cfg(not(any(windows, target_os = "bitrig", target_os = "openbsd", target_os="emscripten")))]
13+
#[cfg(any(target_os = "linux", target_os = "macos"))]
1414
extern crate alloc_jemalloc;
15-
#[cfg(any(windows, target_os = "bitrig", target_os = "openbsd", target_os="emscripten"))]
15+
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
1616
extern crate alloc_system;
1717

1818
fn main() {

src/test/run-pass/allocator-jemalloc.rs

-23
This file was deleted.

0 commit comments

Comments
 (0)