Skip to content

Commit 52e0bda

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 3029e09 + df9e173 commit 52e0bda

7 files changed

+29
-41
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

+13-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
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
11+
// ignore-musl no dylibs
1512
// aux-build:allocator-dylib.rs
13+
// aux-build:allocator1.rs
1614
// no-prefer-dynamic
1715
// error-pattern: cannot link together two allocators
1816

@@ -23,7 +21,18 @@
2321
#![feature(alloc_jemalloc)]
2422

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

2837
fn main() {
2938
allocator_dylib::foo();

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

+13-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
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
11+
// ignore-musl no dylibs
1512
// aux-build:allocator-dylib2.rs
13+
// aux-build:allocator1.rs
1614
// error-pattern: cannot link together two allocators
1715

1816
// Ensure that rust dynamic libraries use jemalloc as their allocator, verifying
@@ -21,9 +19,19 @@
2119
#![feature(alloc_system)]
2220

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

2635
fn main() {
2736
allocator_dylib2::foo();
2837
}
29-

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

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

11-
#![feature(alloc_jemalloc, alloc_system)]
11+
#![feature(alloc_jemalloc)]
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"))]
16-
extern crate alloc_system;
1715

1816
fn main() {
1917
println!("{:?}", Box::new(3));

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

-23
This file was deleted.

0 commit comments

Comments
 (0)