Merge pull request #1026 from alexcrichton/less-throw

Don't worry about descriptive strings for malloc errors
This commit is contained in:
Alex Crichton 2018-11-09 16:14:22 -06:00 committed by GitHub
commit 02cd0c5837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -840,7 +840,11 @@ pub mod __rt {
}
}
super::throw_str("invalid malloc request");
if cfg!(debug_assertions) {
super::throw_str("invalid malloc request")
} else {
std::process::abort();
}
}
#[no_mangle]