зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #16899 - Revert "Replace intrinsics::abort with process::abort" (from jdm:revertabort); r=emilio
This reverts #16680. Calling `process::abort` from the crash handler causes the crash handler to be invoked again recursively. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #16898 Source-Repo: https://github.com/servo/servo Source-Revision: 1312ab2b284c1a988c5029e1ec28ee9f3ea5e912 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 742d1055f4b540cca19040f50941f133a6bf094d
This commit is contained in:
Родитель
643cd662e4
Коммит
f74528187b
|
@ -4,6 +4,7 @@
|
|||
|
||||
#![allow(non_camel_case_types)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(link_args)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -12,7 +12,9 @@ macro_rules! stub(
|
|||
#[allow(non_snake_case)]
|
||||
pub extern "C" fn $name() {
|
||||
println!("CEF stub function called: {}", stringify!($name));
|
||||
::std::process::abort()
|
||||
unsafe {
|
||||
::std::intrinsics::abort()
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
//!
|
||||
//! [glutin]: https://github.com/tomaka/glutin
|
||||
|
||||
#![feature(start)]
|
||||
#![feature(start, core_intrinsics)]
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
extern crate android_injected_glue;
|
||||
|
@ -58,7 +58,7 @@ pub mod platform {
|
|||
fn install_crash_handler() {
|
||||
use backtrace::Backtrace;
|
||||
use sig::ffi::Sig;
|
||||
use std::process::abort;
|
||||
use std::intrinsics::abort;
|
||||
use std::thread;
|
||||
|
||||
fn handler(_sig: i32) {
|
||||
|
@ -67,7 +67,11 @@ fn install_crash_handler() {
|
|||
.map(|n| format!(" for thread \"{}\"", n))
|
||||
.unwrap_or("".to_owned());
|
||||
println!("Stack trace{}\n{:?}", name, Backtrace::new());
|
||||
abort();
|
||||
unsafe {
|
||||
// N.B. Using process::abort() here causes the crash handler to be
|
||||
// triggered recursively.
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
signal!(Sig::SEGV, handler); // handle segfaults
|
||||
|
|
Загрузка…
Ссылка в новой задаче