aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock10
-rw-r--r--ports/servo/Cargo.toml3
-rw-r--r--ports/servo/non_android_main.rs15
-rw-r--r--tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini2
4 files changed, 17 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index d5c41b0d23f..58f8b71d72b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3640,11 +3640,12 @@ dependencies = [
"glutin 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)",
"keyboard-types 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
"libservo 0.0.1",
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"osmesa-src 0.1.0 (git+https://github.com/servo/osmesa-src)",
"osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"winit 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3920,8 +3921,11 @@ dependencies = [
[[package]]
name = "sig"
-version = "0.1.1"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)",
+]
[[package]]
name = "signpost"
@@ -5349,7 +5353,7 @@ dependencies = [
"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
"checksum shared_library 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8254bf098ce4d8d7cc7cc6de438c5488adc5297e5b7ffef88816c0a91bd289c1"
-"checksum sig 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c6649e43c1a1e68d29ed56d0dc3b5b6cf3b901da77cf107c4066b9e3da036df5"
+"checksum sig 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6567e29578f9bfade6a5d94a32b9a4256348358d2a3f448cab0021f9a02614a2"
"checksum signpost 0.1.0 (git+https://github.com/pcwalton/signpost.git)" = "<none>"
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d"
diff --git a/ports/servo/Cargo.toml b/ports/servo/Cargo.toml
index 92335b487d2..792cab27494 100644
--- a/ports/servo/Cargo.toml
+++ b/ports/servo/Cargo.toml
@@ -49,13 +49,14 @@ glutin = "0.19"
keyboard-types = "0.4.3"
lazy_static = "1"
libservo = {path = "../../components/servo"}
+libc = "0.2"
log = "0.4"
tinyfiledialogs = "3.0"
winit = {version = "0.18", features = ["icon_loading"]}
-sig = "0.1"
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
osmesa-sys = "0.1.2"
+sig = "1.0"
[target.'cfg(target_os = "linux")'.dependencies]
x11 = "2.0.0"
diff --git a/ports/servo/non_android_main.rs b/ports/servo/non_android_main.rs
index 6bd465ce6e8..7dd8a5008f0 100644
--- a/ports/servo/non_android_main.rs
+++ b/ports/servo/non_android_main.rs
@@ -3,7 +3,8 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#[macro_use] extern crate lazy_static;
-#[cfg(feature = "unstable")] #[macro_use] extern crate sig;
+#[cfg(all(feature = "unstable", any(target_os = "macos", target_os = "linux")))]
+#[macro_use] extern crate sig;
// The window backed by glutin
mod glutin_app;
@@ -35,26 +36,24 @@ pub mod platform {
pub fn deinit() {}
}
-#[cfg(not(feature = "unstable"))]
+#[cfg(any(not(feature = "unstable"), not(any(target_os = "macos", target_os = "linux"))))]
fn install_crash_handler() {}
-#[cfg(feature = "unstable")]
+#[cfg(all(feature = "unstable", any(target_os = "macos", target_os = "linux")))]
fn install_crash_handler() {
use backtrace::Backtrace;
+ use libc::_exit;
use sig::ffi::Sig;
- use std::intrinsics::abort;
use std::thread;
- fn handler(_sig: i32) {
+ extern "C" fn handler(sig: i32) {
let name = thread::current()
.name()
.map(|n| format!(" for thread \"{}\"", n))
.unwrap_or("".to_owned());
println!("Stack trace{}\n{:?}", name, Backtrace::new());
unsafe {
- // N.B. Using process::abort() here causes the crash handler to be
- // triggered recursively.
- abort();
+ _exit(sig);
}
}
diff --git a/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini b/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini
index 7d4d878c05d..63ad264be81 100644
--- a/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini
+++ b/tests/wpt/mozilla/meta/mozilla/sigsegv.html.ini
@@ -1,4 +1,4 @@
[sigsegv.html]
type: testharness
prefs: [dom.testbinding.enabled:true, dom.testable_crash.enabled:true]
- disabled: https://github.com/servo/servo/issues/14067
+ expected: CRASH