Skip to content

Commit

Permalink
Auto merge of rust-lang#31889 - alexcrichton:update-jemalloc-again, r…
Browse files Browse the repository at this point in the history
…=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 rust-lang#31030
  • Loading branch information
bors committed Mar 5, 2016
2 parents 3029e09 + df9e173 commit 52e0bda
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 41 deletions.
2 changes: 0 additions & 2 deletions mk/cfg/i686-pc-windows-gnu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ CFG_GNU_TRIPLE_i686-pc-windows-gnu := i686-w64-mingw32
CFG_THIRD_PARTY_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o
CFG_INSTALLED_OBJECTS_i686-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
CFG_RUSTRT_HAS_STARTUP_OBJS_i686-pc-windows-gnu := 1
# FIXME(#31030) - there's not a great reason to disable jemalloc here
CFG_DISABLE_JEMALLOC_i686-pc-windows-gnu := 1
2 changes: 0 additions & 2 deletions mk/cfg/x86_64-pc-windows-gnu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ CFG_GNU_TRIPLE_x86_64-pc-windows-gnu := x86_64-w64-mingw32
CFG_THIRD_PARTY_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o
CFG_INSTALLED_OBJECTS_x86_64-pc-windows-gnu := crt2.o dllcrt2.o rsbegin.o rsend.o
CFG_RUSTRT_HAS_STARTUP_OBJS_x86_64-pc-windows-gnu := 1
# FIXME(#31030) - there's not a great reason to disable jemalloc here
CFG_DISABLE_JEMALLOC_x86_64-pc-windows-gnu := 1
2 changes: 1 addition & 1 deletion src/jemalloc
Submodule jemalloc updated 134 files
17 changes: 13 additions & 4 deletions src/test/compile-fail/allocator-dylib-is-system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-windows everything is the system allocator on windows
// ignore-musl no dylibs on musl yet
// ignore-bitrig no jemalloc on bitrig
// ignore-openbsd no jemalloc on openbsd
// ignore-musl no dylibs
// aux-build:allocator-dylib.rs
// aux-build:allocator1.rs
// no-prefer-dynamic
// error-pattern: cannot link together two allocators

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

extern crate allocator_dylib;

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

fn main() {
allocator_dylib::foo();
Expand Down
18 changes: 13 additions & 5 deletions src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

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

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

extern crate allocator_dylib2;

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

fn main() {
allocator_dylib2::foo();
}

6 changes: 2 additions & 4 deletions src/test/run-pass/allocator-default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

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

#[cfg(not(any(windows, target_os = "bitrig", target_os = "openbsd", target_os="emscripten")))]
#[cfg(any(target_os = "linux", target_os = "macos"))]
extern crate alloc_jemalloc;
#[cfg(any(windows, target_os = "bitrig", target_os = "openbsd", target_os="emscripten"))]
extern crate alloc_system;

fn main() {
println!("{:?}", Box::new(3));
Expand Down
23 changes: 0 additions & 23 deletions src/test/run-pass/allocator-jemalloc.rs

This file was deleted.

0 comments on commit 52e0bda

Please sign in to comment.