From 2d5f6a197af9694be233b76c5c0351e2c0d5f8ed Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 17 Nov 2019 18:03:43 +0100 Subject: [PATCH 001/107] feat: Bump cpp-demangle to 0.2.14 (#168) --- cabi/Cargo.lock | 6 +++--- demangle/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index 9781b2eb5..9f91ce732 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -216,7 +216,7 @@ dependencies = [ [[package]] name = "cpp_demangle" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1164,7 +1164,7 @@ name = "symbolic-demangle" version = "7.0.0" dependencies = [ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "cpp_demangle 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic-common 7.0.0", @@ -1423,7 +1423,7 @@ dependencies = [ "checksum clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum console 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ca57c2c14b8a2bf3105bc9d15574aad80babf6a9c44b1058034cdf8bd169628" -"checksum cpp_demangle 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1d355451c6fb0dd4142db91e8dbd020d0d5466393957e771032bb9bf779504b4" +"checksum cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4115af6f575a7bc82c613e9e0ed7cc36a5e4fc3a8b54920dc0c820823a31a0d6" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum debugid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "751dad1347b163aa77262232129c7ac46e2810485c9b095ac9f7caf200e97df4" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" diff --git a/demangle/Cargo.toml b/demangle/Cargo.toml index ffbc04a5a..6558f54f3 100644 --- a/demangle/Cargo.toml +++ b/demangle/Cargo.toml @@ -20,7 +20,7 @@ exclude = [ ] [dependencies] -cpp_demangle = "0.2.13" +cpp_demangle = "0.2.14" msvc-demangler = "0.8.0" rustc-demangle = "0.1.15" symbolic-common = { version = "7.0.0", path = "../common" } From 42f601faf243e3ffe3ba4799d800ca9a379b0e47 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Mon, 18 Nov 2019 11:54:04 +0100 Subject: [PATCH 002/107] build: Bump goblin to fix PT_DYNAMIC bug --- cabi/Cargo.lock | 30 +++++++++++++++++++++++++----- debuginfo/Cargo.toml | 2 +- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index 9f91ce732..e790cff3d 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -370,12 +370,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "goblin" -version = "0.0.24" -source = "git+https://github.com/m4b/goblin?rev=cfa098a528409847c568216e04f764b792f8425a#cfa098a528409847c568216e04f764b792f8425a" +version = "0.1.1" +source = "git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e#ee8b997792d37cfb35f8656c028543797425137e" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -959,6 +959,14 @@ dependencies = [ "scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "scroll" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "scroll_derive" version = "0.9.5" @@ -969,6 +977,16 @@ dependencies = [ "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "scroll_derive" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "semver" version = "0.9.0" @@ -1144,7 +1162,7 @@ dependencies = [ "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", "gimli 0.19.0 (git+https://github.com/jan-auer/gimli?rev=bf8ea0f0079505681c360d3a55d0ac1e9b498df3)", - "goblin 0.0.24 (git+https://github.com/m4b/goblin?rev=cfa098a528409847c568216e04f764b792f8425a)", + "goblin 0.1.1 (git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1444,7 +1462,7 @@ dependencies = [ "checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" "checksum gimli 0.19.0 (git+https://github.com/jan-auer/gimli?rev=bf8ea0f0079505681c360d3a55d0ac1e9b498df3)" = "" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -"checksum goblin 0.0.24 (git+https://github.com/m4b/goblin?rev=cfa098a528409847c568216e04f764b792f8425a)" = "" +"checksum goblin 0.1.1 (git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e)" = "" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" "checksum insta 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc3ee8d49a583b9c4ecb1b50777b65eec0a568e49dddfac37109ef320175533" @@ -1514,7 +1532,9 @@ dependencies = [ "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +"checksum scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" "checksum scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f84d114ef17fd144153d608fba7c446b0145d038985e7a8cc5d08bb0ce20383" +"checksum scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28" "checksum scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1aa96c45e7f5a91cb7fabe7b279f02fea7126239fc40b732316e8b6a2d0fcb" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" diff --git a/debuginfo/Cargo.toml b/debuginfo/Cargo.toml index d0a8addf5..6a624c824 100644 --- a/debuginfo/Cargo.toml +++ b/debuginfo/Cargo.toml @@ -25,7 +25,7 @@ failure = "0.1.5" fallible-iterator = "0.2.0" flate2 = { version = "1.0.9", features = ["rust_backend"], default-features = false } gimli = { git = "https://github.com/jan-auer/gimli", rev = "bf8ea0f0079505681c360d3a55d0ac1e9b498df3", features = ["read", "std"], default-features = false } -goblin = { git = "https://github.com/m4b/goblin", rev = "cfa098a528409847c568216e04f764b792f8425a" } +goblin = { git = "https://github.com/jan-auer/goblin", rev = "ee8b997792d37cfb35f8656c028543797425137e" } lazycell = "1.2.1" lazy_static = "1.3.0" pdb = { git = "https://github.com/jan-auer/pdb", rev = "6518a17aff69ed26375cf3358632abbd32073931" } From 40629e24e922258c732fcfdbffae7285c4214521 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 18 Nov 2019 12:21:42 +0100 Subject: [PATCH 003/107] feat: Added previously unsupported mach object types (#169) --- debuginfo/src/macho.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debuginfo/src/macho.rs b/debuginfo/src/macho.rs index faf4f5ff8..1ab92b911 100644 --- a/debuginfo/src/macho.rs +++ b/debuginfo/src/macho.rs @@ -114,9 +114,14 @@ impl<'d> MachObject<'d> { match self.macho.header.filetype { goblin::mach::header::MH_OBJECT => ObjectKind::Relocatable, goblin::mach::header::MH_EXECUTE => ObjectKind::Executable, - goblin::mach::header::MH_DYLIB => ObjectKind::Library, + goblin::mach::header::MH_FVMLIB => ObjectKind::Library, goblin::mach::header::MH_CORE => ObjectKind::Dump, + goblin::mach::header::MH_PRELOAD => ObjectKind::Executable, + goblin::mach::header::MH_DYLIB => ObjectKind::Library, + goblin::mach::header::MH_DYLINKER => ObjectKind::Executable, + goblin::mach::header::MH_BUNDLE => ObjectKind::Library, goblin::mach::header::MH_DSYM => ObjectKind::Debug, + goblin::mach::header::MH_KEXT_BUNDLE => ObjectKind::Library, _ => ObjectKind::Other, } } From 05631edb03dc14ffa0a37f8723cfe338f2661cdb Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Mon, 18 Nov 2019 13:29:35 +0100 Subject: [PATCH 004/107] fix(debuginfo): Detect debug companions for ELF libraries (#170) --- debuginfo/src/elf.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/debuginfo/src/elf.rs b/debuginfo/src/elf.rs index 84b5508bd..060fd461e 100644 --- a/debuginfo/src/elf.rs +++ b/debuginfo/src/elf.rs @@ -156,10 +156,18 @@ impl<'d> ElfObject<'d> { // removed. Since an executable without interpreter does not make any // sense, we assume ``Debug`` in this case. if kind == ObjectKind::Executable && self.elf.interpreter.is_none() { - ObjectKind::Debug - } else { - kind + return ObjectKind::Debug; + } + + // The same happens for libraries. However, here we can only check for + // a missing text section. If this still yields too many false positivies, + // we will have to check either the size or offset of that section in + // the future. + if kind == ObjectKind::Library && self.raw_section("text").is_none() { + return ObjectKind::Debug; } + + kind } /// The address at which the image prefers to be loaded into memory. From e7c8ff5b10b7b8e175320a7ab14a842860f885c5 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 18 Nov 2019 13:39:25 +0100 Subject: [PATCH 005/107] feat(sourcebundle): Added callback to skip over files (#167) --- debuginfo/src/sourcebundle.rs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/debuginfo/src/sourcebundle.rs b/debuginfo/src/sourcebundle.rs index 00e1680c9..885658fa9 100644 --- a/debuginfo/src/sourcebundle.rs +++ b/debuginfo/src/sourcebundle.rs @@ -854,14 +854,32 @@ where /// sources could be resolved. Otherwise, an error is returned if writing the bundle fails. /// /// This finishes the source bundle and flushes the underlying writer. - pub fn write_object( + pub fn write_object(self, object: &O, object_name: &str) -> Result + where + O: ObjectLike, + O::Error: Fail, + { + self.write_object_with_filter(object, object_name, |_| true) + } + + /// Writes a single object into the bundle. + /// + /// Returns `Ok(true)` if any source files were added to the bundle, or `Ok(false)` if no + /// sources could be resolved. Otherwise, an error is returned if writing the bundle fails. + /// + /// This finishes the source bundle and flushes the underlying writer. + /// + /// Before a file is written a callback is invoked which can return `false` to skip a file. + pub fn write_object_with_filter( mut self, object: &O, object_name: &str, + mut filter: F, ) -> Result where O: ObjectLike, O::Error: Fail, + F: FnMut(&FileEntry) -> bool, { let mut files_handled = BTreeSet::new(); let session = object @@ -883,7 +901,8 @@ where continue; } - let source = if filename.starts_with('<') && filename.ends_with('>') { + let source = if (filename.starts_with('<') && filename.ends_with('>')) || !filter(&file) + { None } else { File::open(&filename).ok().map(BufReader::new) From 46d0c5f794ed89b0c3adcd5d362259f876054938 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 2 Dec 2019 12:08:22 +0100 Subject: [PATCH 006/107] fix: Harden macho multi arch parsing code. (#172) --- debuginfo/src/macho.rs | 27 ++++++++++++++++++++++++--- debuginfo/src/object.rs | 4 +++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/debuginfo/src/macho.rs b/debuginfo/src/macho.rs index 1ab92b911..1c40593b4 100644 --- a/debuginfo/src/macho.rs +++ b/debuginfo/src/macho.rs @@ -461,7 +461,11 @@ impl<'d, 'a> Iterator for FatMachObjectIterator<'d, 'a> { self.remaining -= 1; match self.iter.next() { - Some(Ok(arch)) => Some(MachObject::parse(arch.slice(self.data))), + Some(Ok(arch)) => { + let start = (arch.offset as usize).min(self.data.len()); + let end = ((arch.offset + arch.size) as usize).min(self.data.len()); + Some(MachObject::parse(&self.data[start..end])) + } Some(Err(error)) => Some(Err(MachError::BadObject(error))), None => None, } @@ -523,7 +527,9 @@ impl<'d> FatMachO<'d> { None => return Ok(None), }; - MachObject::parse(arch.slice(self.data)).map(Some) + let start = (arch.offset as usize).min(self.data.len()); + let end = ((arch.offset + arch.size) as usize).min(self.data.len()); + MachObject::parse(&self.data[start..end]).map(Some) } } @@ -597,7 +603,22 @@ impl<'d> MachArchive<'d> { pub fn test(data: &[u8]) -> bool { match goblin::peek(&mut Cursor::new(data)) { Ok(goblin::Hint::Mach(_)) => true, - Ok(goblin::Hint::MachFat(_)) => true, + Ok(goblin::Hint::MachFat(narchs)) => { + // so this is kind of stupid but java class files share the same cutsey magic + // as a macho fat file (CAFEBABE). This means that we often claim that a java + // class file is actually a macho binary but it's not. The next 32 bytes encode + // the number of embedded architectures in a fat mach. In case of a JAR file + // we have 2 bytes for minor version and 2 bytes for major version of the class + // file format. + // + // The internet suggests the first public version of Java had the class version + // 45. Thus the logic applied here is that if the number is >= 45 we're more + // likely to have a java class file than a macho file with 45 architectures + // which should be very rare. + // + // https://docs.oracle.com/javase/specs/jvms/se6/html/ClassFile.doc.html + narchs < 45 + } _ => false, } } diff --git a/debuginfo/src/object.rs b/debuginfo/src/object.rs index 5c2305078..1efcc55c4 100644 --- a/debuginfo/src/object.rs +++ b/debuginfo/src/object.rs @@ -110,7 +110,9 @@ pub fn peek(data: &[u8], archive: bool) -> FileFormat { match goblin::peek_bytes(&magic) { Ok(Hint::Elf(_)) => return FileFormat::Elf, Ok(Hint::Mach(_)) => return FileFormat::MachO, - Ok(Hint::MachFat(_)) if archive => return FileFormat::MachO, + // mach fat needs to be tested through `MachArchive::test` because of special + // handling that is required due to disambiguation with Java class files. + Ok(Hint::MachFat(_)) if archive && MachArchive::test(data) => return FileFormat::MachO, Ok(Hint::PE) => return FileFormat::Pe, _ => (), } From 2ee53fe861fe40114966cfc3d609e2c1574b7f37 Mon Sep 17 00:00:00 2001 From: Radu Woinaroski <5281987+RaduW@users.noreply.github.com> Date: Mon, 16 Dec 2019 11:09:45 +0100 Subject: [PATCH 007/107] fix(unreal): Fix typo in ContextRuntimeProperties (#176) --- unreal/src/context.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/unreal/src/context.rs b/unreal/src/context.rs index 65a1afae7..89a89f009 100644 --- a/unreal/src/context.rs +++ b/unreal/src/context.rs @@ -118,9 +118,13 @@ pub struct Unreal4ContextRuntimeProperties { /// Misc.CPUBrand #[cfg_attr(feature = "with-serde", serde(skip_serializing_if = "Option::is_none"))] pub misc_cpu_brand: Option, - /// Misc.PrimaryGPUBrand + #[doc(hidden)] + #[deprecated(note = "use misc_primary_gpu_brand instead")] #[cfg_attr(feature = "with-serde", serde(skip_serializing_if = "Option::is_none"))] pub misc_primary_cpu_brand: Option, + /// Misc.PrimaryGPUBrand + #[cfg_attr(feature = "with-serde", serde(skip_serializing_if = "Option::is_none"))] + pub misc_primary_gpu_brand: Option, /// Misc.OSVersionMajor #[cfg_attr(feature = "with-serde", serde(skip_serializing_if = "Option::is_none"))] pub misc_os_version_major: Option, @@ -219,7 +223,15 @@ impl Unreal4ContextRuntimeProperties { } "Misc.CPUVendor" => rv.misc_cpu_vendor = get_text_or_none(&child), "Misc.CPUBrand" => rv.misc_cpu_brand = get_text_or_none(&child), - "Misc.PrimaryGPUBrand" => rv.misc_primary_cpu_brand = get_text_or_none(&child), + "Misc.PrimaryGPUBrand" => { + rv.misc_primary_gpu_brand = get_text_or_none(&child); + + #[allow(deprecated)] + { + // Shim a typo. To be removed with the next major release. + rv.misc_primary_cpu_brand = rv.misc_primary_gpu_brand.clone(); + } + } "Misc.OSVersionMajor" => rv.misc_os_version_major = get_text_or_none(&child), "Misc.OSVersionMinor" => rv.misc_os_version_minor = get_text_or_none(&child), "GameStateName" => rv.game_state_name = get_text_or_none(&child), @@ -480,7 +492,7 @@ test_unreal_runtime_properties!( "Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz" ); test_unreal_runtime_properties!( - misc_primary_cpu_brand, + misc_primary_gpu_brand, "Misc.PrimaryGPUBrand", "Parallels Display Adapter (WDDM)" ); From 921b9360109aa454c343bb95c832e058aa115ecb Mon Sep 17 00:00:00 2001 From: Radu Woinaroski <5281987+RaduW@users.noreply.github.com> Date: Mon, 16 Dec 2019 12:27:06 +0100 Subject: [PATCH 008/107] feat(unreal): Expose context and logs parsing (#174) --- .gitignore | 3 ++ unreal/src/container.rs | 4 +- unreal/src/context.rs | 3 +- unreal/src/logs.rs | 94 ++++++++++++++++++++--------------------- 4 files changed, 54 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index c003e2417..11727dbe9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ __pycache__/ # C++ .vscode/ipch + +# IDE files +.idea/ diff --git a/unreal/src/container.rs b/unreal/src/container.rs index b83c88dc1..571e28cde 100644 --- a/unreal/src/container.rs +++ b/unreal/src/container.rs @@ -11,7 +11,7 @@ use scroll::{ctx::TryFromCtx, Endian, Pread}; use crate::context::Unreal4Context; use crate::error::Unreal4Error; -use crate::logs::{parse_logs, Unreal4LogEntry}; +use crate::logs::Unreal4LogEntry; #[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] struct AnsiString(String); @@ -214,7 +214,7 @@ impl Unreal4Crash { /// Get up to `limit` log entries of this crash. pub fn logs(&self, limit: usize) -> Result, Unreal4Error> { match self.file_by_type(Unreal4FileType::Log) { - Some(file) => parse_logs(file.data(), limit), + Some(file) => Unreal4LogEntry::parse(file.data(), limit), None => Ok(Vec::new()), } } diff --git a/unreal/src/context.rs b/unreal/src/context.rs index 89a89f009..f5e127ebe 100644 --- a/unreal/src/context.rs +++ b/unreal/src/context.rs @@ -320,7 +320,8 @@ pub struct Unreal4Context { } impl Unreal4Context { - pub(crate) fn parse(data: &[u8]) -> Result { + /// Parses the unreal context XML file. + pub fn parse(data: &[u8]) -> Result { let root = Element::from_reader(data).map_err(Unreal4Error::InvalidXml)?; Ok(Unreal4Context { diff --git a/unreal/src/logs.rs b/unreal/src/logs.rs index aeae13fb7..8aa063bd2 100644 --- a/unreal/src/logs.rs +++ b/unreal/src/logs.rs @@ -30,65 +30,65 @@ pub struct Unreal4LogEntry { pub message: String, } -pub(crate) fn parse_logs( - log_slice: &[u8], - limit: usize, -) -> Result, Unreal4Error> { - let mut fallback_timestamp = None; - let logs_utf8 = std::str::from_utf8(log_slice).map_err(Unreal4Error::InvalidLogEntry)?; +impl Unreal4LogEntry { + /// Tries to parse a blob normally coming from a logs file inside an Unreal4Crash into + /// a vector of Unreal4LogEntry. + pub fn parse(log_slice: &[u8], limit: usize) -> Result, Unreal4Error> { + let mut fallback_timestamp = None; + let logs_utf8 = std::str::from_utf8(log_slice).map_err(Unreal4Error::InvalidLogEntry)?; - if let Some(first_line) = logs_utf8.lines().next() { - // First line includes the timestamp of the following 100 and some lines until - // log entries actually include timestamps - if let Some(captures) = LOG_FIRST_LINE.captures(&first_line) { - fallback_timestamp = Some( - // Using UTC but this entry is local time. Unfortunately there's no way to find the offset. - Utc.ymd( - // https://github.com/EpicGames/UnrealEngine/blob/f7626ddd147fe20a6144b521a26739c863546f4a/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformTime.cpp#L46 - captures["year"].parse::().unwrap() + 2000, - captures["month"].parse::().unwrap(), - captures["day"].parse::().unwrap(), - ) - .and_hms( - captures["hour"].parse::().unwrap(), - captures["minute"].parse::().unwrap(), - captures["second"].parse::().unwrap(), - ), - ); + if let Some(first_line) = logs_utf8.lines().next() { + // First line includes the timestamp of the following 100 and some lines until + // log entries actually include timestamps + if let Some(captures) = LOG_FIRST_LINE.captures(&first_line) { + fallback_timestamp = Some( + // Using UTC but this entry is local time. Unfortunately there's no way to find the offset. + Utc.ymd( + // https://github.com/EpicGames/UnrealEngine/blob/f7626ddd147fe20a6144b521a26739c863546f4a/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformTime.cpp#L46 + captures["year"].parse::().unwrap() + 2000, + captures["month"].parse::().unwrap(), + captures["day"].parse::().unwrap(), + ) + .and_hms( + captures["hour"].parse::().unwrap(), + captures["minute"].parse::().unwrap(), + captures["second"].parse::().unwrap(), + ), + ); + } } - } - let mut logs: Vec<_> = logs_utf8 - .lines() - .rev() - .take(limit) - .map(|line| { - let entry = LogEntry::parse(line.as_bytes()); - let (component, message) = entry.component_and_message(); - // Reads in reverse where logs include timestamp. If it never reached the point of adding - // timestamp to log entries, the first record's timestamp (local time, above) will be used - // on all records. - fallback_timestamp = entry.utc_timestamp().or(fallback_timestamp); + let mut logs: Vec<_> = logs_utf8 + .lines() + .rev() + .take(limit) + .map(|line| { + let entry = LogEntry::parse(line.as_bytes()); + let (component, message) = entry.component_and_message(); + // Reads in reverse where logs include timestamp. If it never reached the point of adding + // timestamp to log entries, the first record's timestamp (local time, above) will be used + // on all records. + fallback_timestamp = entry.utc_timestamp().or(fallback_timestamp); - Unreal4LogEntry { - timestamp: fallback_timestamp, - component: component.map(Into::into), - message: message.into(), - } - }) - .collect(); + Unreal4LogEntry { + timestamp: fallback_timestamp, + component: component.map(Into::into), + message: message.into(), + } + }) + .collect(); - logs.reverse(); - Ok(logs) + logs.reverse(); + Ok(logs) + } } - #[test] fn test_parse_logs_no_entries_with_timestamp() { let log_bytes = br"Log file open, 12/13/18 15:54:53 LogWindows: Failed to load 'aqProf.dll' (GetLastError=126) LogWindows: File 'aqProf.dll' does not exist"; - let logs = parse_logs(log_bytes, 1000).expect("logs"); + let logs = Unreal4LogEntry::parse(log_bytes, 1000).expect("logs"); assert_eq!(logs.len(), 3); assert_eq!(logs[2].component.as_ref().expect("component"), "LogWindows"); From de12af604bca33e8c72bc785d348273bf08d79ab Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Thu, 19 Dec 2019 17:10:43 +0100 Subject: [PATCH 009/107] style: Rustfmt 1.40.0 --- unreal/src/context.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unreal/src/context.rs b/unreal/src/context.rs index f5e127ebe..dcd95094b 100644 --- a/unreal/src/context.rs +++ b/unreal/src/context.rs @@ -527,8 +527,12 @@ test_unreal_runtime_properties!( "CrashReportClientVersion", "1.0", ); -test_unreal_runtime_properties!(modules, "Modules", r#"\\Mac\Home\Desktop\WindowsNoEditor\YetAnother\Binaries\Win64\YetAnother.exe -\\Mac\Home\Desktop\WindowsNoEditor\Engine\Binaries\ThirdParty\Vorbis\Win64\VS2015\libvorbis_64.dll"#); +test_unreal_runtime_properties!( + modules, + "Modules", + r#"\\Mac\Home\Desktop\WindowsNoEditor\YetAnother\Binaries\Win64\YetAnother.exe +\\Mac\Home\Desktop\WindowsNoEditor\Engine\Binaries\ThirdParty\Vorbis\Win64\VS2015\libvorbis_64.dll"# +); test_unreal_platform_properties!(is_windows, "PlatformIsRunningWindows", true); test_unreal_platform_properties!(callback_result, "PlatformCallbackResult", 123); From f928869b64f43112ec70ecd87aa24441ebc899e6 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Thu, 19 Dec 2019 17:35:28 +0100 Subject: [PATCH 010/107] fix: Clippy 1.40.0 --- common/src/cell.rs | 4 ++++ debuginfo/src/pdb.rs | 11 ++++++----- demangle/src/lib.rs | 2 -- minidump/src/processor.rs | 4 +--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/common/src/cell.rs b/common/src/cell.rs index 7cfc99893..6092ad826 100644 --- a/common/src/cell.rs +++ b/common/src/cell.rs @@ -245,10 +245,14 @@ where /// Unsafely creates a new `SelfCell` from a derived object by moving the owner. /// + /// # Safety + /// /// This is an inherently unsafe process. The caller must guarantee that the derived object only /// borrows from the owner that is moved into this container. This is useful, when cloning the /// owner by deriving a sub-object. /// + /// # Example + /// /// ```rust /// # use std::sync::Arc; /// # use symbolic_common::{AsSelf, SelfCell}; diff --git a/debuginfo/src/pdb.rs b/debuginfo/src/pdb.rs index f1514be9e..998b8a685 100644 --- a/debuginfo/src/pdb.rs +++ b/debuginfo/src/pdb.rs @@ -2,6 +2,7 @@ use std::borrow::Cow; use std::cell::{RefCell, RefMut}; +use std::cmp::Ordering; use std::collections::btree_map::{BTreeMap, Entry}; use std::fmt; use std::io::Cursor; @@ -392,11 +393,11 @@ where while let Some(item) = self.iter.next()? { self.finder.update(&self.iter); - if item.index() == index { - return Ok(item); - } else if item.index() > index { - break; - }; + match item.index().partial_cmp(&index) { + Some(Ordering::Equal) => return Ok(item), + Some(Ordering::Greater) => break, + _ => continue, + } } Err(pdb::Error::TypeNotFound(index.into()).into()) diff --git a/demangle/src/lib.rs b/demangle/src/lib.rs index 176aa433c..a04807e7a 100644 --- a/demangle/src/lib.rs +++ b/demangle/src/lib.rs @@ -18,11 +18,9 @@ //! use symbolic_common::{Language, Name}; //! use symbolic_demangle::Demangle; //! -//! # fn main() { //! let name = Name::new("__ZN3std2io4Read11read_to_end17hb85a0f6802e14499E"); //! assert_eq!(name.detect_language(), Language::Rust); //! assert_eq!(name.try_demangle(Default::default()), "std::io::Read::read_to_end"); -//! # } //! ``` #![warn(missing_docs)] diff --git a/minidump/src/processor.rs b/minidump/src/processor.rs index 22d973ec6..d456e8f1e 100644 --- a/minidump/src/processor.rs +++ b/minidump/src/processor.rs @@ -99,13 +99,11 @@ pub type ParseCodeModuleIdError = ParseDebugIdError; /// use symbolic_minidump::processor::CodeModuleId; /// # use symbolic_minidump::processor::ParseCodeModuleIdError; /// -/// # fn foo() -> Result<(), ParseCodeModuleIdError> { +/// # fn main() -> Result<(), ParseCodeModuleIdError> { /// let id = CodeModuleId::from_str("DFB8E43AF2423D73A453AEB6A777EF75a")?; /// assert_eq!("DFB8E43AF2423D73A453AEB6A777EF75a".to_string(), id.to_string()); /// # Ok(()) /// # } -/// -/// # fn main() { foo().unwrap() } /// ``` #[derive(Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] pub struct CodeModuleId { From 6a1f065183d1e143e7085a231889c26d2c2a47c5 Mon Sep 17 00:00:00 2001 From: Radu Woinaroski <5281987+RaduW@users.noreply.github.com> Date: Thu, 19 Dec 2019 18:03:10 +0100 Subject: [PATCH 011/107] fix(unreal): Remove the first line from the Unreal Log (#177) --- unreal/src/logs.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/unreal/src/logs.rs b/unreal/src/logs.rs index 8aa063bd2..33ac65451 100644 --- a/unreal/src/logs.rs +++ b/unreal/src/logs.rs @@ -61,7 +61,7 @@ impl Unreal4LogEntry { let mut logs: Vec<_> = logs_utf8 .lines() .rev() - .take(limit) + .take(limit + 1) // read one more that we need, will be dropped at the end .map(|line| { let entry = LogEntry::parse(line.as_bytes()); let (component, message) = entry.component_and_message(); @@ -78,6 +78,10 @@ impl Unreal4LogEntry { }) .collect(); + // drops either the first line in the file, which is the file header and therefore + // not a valid log, or the (limit+1)-th entry from the bottom which we are not + // interested in (since we only want (limit) entries). + logs.pop(); logs.reverse(); Ok(logs) } @@ -90,11 +94,11 @@ LogWindows: File 'aqProf.dll' does not exist"; let logs = Unreal4LogEntry::parse(log_bytes, 1000).expect("logs"); - assert_eq!(logs.len(), 3); - assert_eq!(logs[2].component.as_ref().expect("component"), "LogWindows"); + assert_eq!(logs.len(), 2); + assert_eq!(logs[1].component.as_ref().expect("component"), "LogWindows"); assert_eq!( - logs[2].timestamp.expect("timestamp").to_rfc3339(), + logs[1].timestamp.expect("timestamp").to_rfc3339(), "2018-12-13T15:54:53+00:00" ); - assert_eq!(logs[2].message, "File 'aqProf.dll' does not exist"); + assert_eq!(logs[1].message, "File 'aqProf.dll' does not exist"); } From b838270cc6ba364b8a78c321499245590a2d0f1f Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 1 Jan 2020 23:36:41 +0100 Subject: [PATCH 012/107] feat(example): Demangle function names in symcache_debug --- Cargo.toml | 2 +- examples/symcache_debug.rs | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 678172d39..782efc767 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,7 @@ required-features = ["minidump", "symcache", "demangle"] [[example]] name = "symcache_debug" -required-features = ["symcache"] +required-features = ["symcache", "demangle"] [[example]] name = "unreal_engine_crash" diff --git a/examples/symcache_debug.rs b/examples/symcache_debug.rs index 26818bd7a..28758d296 100644 --- a/examples/symcache_debug.rs +++ b/examples/symcache_debug.rs @@ -5,8 +5,9 @@ use std::u64; use clap::{App, Arg, ArgMatches}; use failure::{err_msg, Error}; -use symbolic::common::{Arch, ByteView}; +use symbolic::common::{Arch, ByteView, Language}; use symbolic::debuginfo::Archive; +use symbolic::demangle::Demangle; use symbolic::symcache::{SymCache, SymCacheWriter}; fn execute(matches: &ArgMatches) -> Result<(), Error> { @@ -91,7 +92,26 @@ fn execute(matches: &ArgMatches) -> Result<(), Error> { println!("No match :("); } else { for sym in m { - println!("{:#}", sym); + print!("{}", sym.function_name().try_demangle(Default::default())); + + let path = sym.path(); + let line = sym.line(); + let lang = sym.language(); + + if path != "" || line != 0 || lang != Language::Unknown { + print!("\n "); + if path != "" { + print!(" at {}", path); + } + if line != 0 { + print!(" line {}", line); + } + if lang != Language::Unknown { + print!(" ({})", lang); + } + } + + println!() } } return Ok(()); From d951dd683a62d32595cc232e93843bffe5bd6a17 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 8 Jan 2020 17:29:05 +0100 Subject: [PATCH 013/107] meta(github): Configure codeowners --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..d33a4c8cc --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @getsentry/owners-processing From b81a1dff80f65b29c40951c8e09227d0f42bc2a5 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Sun, 26 Jan 2020 09:52:19 +0100 Subject: [PATCH 014/107] meta(vscode): Fix virtualenv location --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5c33ab9a2..8e796b557 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,7 +17,7 @@ "rust-client.rlsPath": "rls", // Python configuration - "python.pythonPath": "${workspaceFolder}/virtualenv/bin/python", + "python.pythonPath": ".venv/bin/python", // Created by CPP Extension "files.associations": { From 53d3c8f855e4bb02762c6304864c85f32666669b Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Sun, 26 Jan 2020 10:03:31 +0100 Subject: [PATCH 015/107] fix(cabi): Update macro syntax to fix cbindgen error --- cabi/src/utils.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cabi/src/utils.rs b/cabi/src/utils.rs index 8d9a799fc..f7878db41 100644 --- a/cabi/src/utils.rs +++ b/cabi/src/utils.rs @@ -98,18 +98,18 @@ where } } -macro_rules! ffi_fn ( +macro_rules! ffi_fn { // a function that catches patnics and returns a result (err goes to tls) ( $(#[$attr:meta])* unsafe fn $name:ident($($aname:ident: $aty:ty),* $(,)*) -> Result<$rv:ty> $body:block - ) => ( + ) => { #[no_mangle] $(#[$attr])* pub unsafe extern "C" fn $name($($aname: $aty,)*) -> $rv { $crate::utils::landingpad(|| $body) } - ); + }; // a function that catches patnics and returns nothing (err goes to tls) ( @@ -122,5 +122,5 @@ macro_rules! ffi_fn ( // this silences panics and stuff $crate::utils::landingpad(|| { $body; Ok(0 as std::os::raw::c_int) }); } - } -); + }; +}; From e76276c97999523e9596109566ab59d0f4410a8d Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Sun, 26 Jan 2020 10:04:09 +0100 Subject: [PATCH 016/107] ref(cabi): Regenerate the C header --- cabi/include/symbolic.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cabi/include/symbolic.h b/cabi/include/symbolic.h index e08cf09a7..d7f5da46c 100644 --- a/cabi/include/symbolic.h +++ b/cabi/include/symbolic.h @@ -3,7 +3,7 @@ #ifndef SYMBOLIC_H_INCLUDED #define SYMBOLIC_H_INCLUDED -/* Generated with cbindgen:0.8.0 */ +/* Generated with cbindgen:0.12.2 */ /* Warning, this file is autogenerated. Do not modify this manually. */ @@ -368,6 +368,7 @@ SymbolicCfiCache *symbolic_cficache_open(const char *path); /** * Demangles a given identifier. + * * This demangles with the default behavior in symbolic. If no language * is specified, it will be auto-detected. */ @@ -376,6 +377,7 @@ SymbolicStr symbolic_demangle(const SymbolicStr *ident, /** * Demangles a given identifier. + * * This is similar to `symbolic_demangle` but does not demangle the * arguments and instead strips them. If no language is specified, it * will be auto-detected. @@ -395,12 +397,14 @@ SymbolicStr symbolic_err_get_backtrace(void); /** * Returns the last error code. + * * If there is no error, 0 is returned. */ SymbolicErrorCode symbolic_err_get_last_code(void); /** * Returns the last error message. + * * If there is no error an empty string is returned. This allocates new memory * that needs to be freed with `symbolic_str_free`. */ @@ -524,6 +528,7 @@ void symbolic_proguardmappingview_free(SymbolicProguardMappingView *view); /** * Creates a proguard mapping view from bytes. + * * This shares the underlying memory and does not copy it. */ SymbolicProguardMappingView *symbolic_proguardmappingview_from_bytes(const char *bytes, @@ -611,6 +616,7 @@ void symbolic_sourceview_free(SymbolicSourceView *view); /** * Creates a source view from a given path. + * * This shares the underlying memory and does not copy it if that is * possible. Will ignore utf-8 decoding errors. */ @@ -630,6 +636,7 @@ uint32_t symbolic_sourceview_get_line_count(const SymbolicSourceView *source_map /** * Frees a symbolic str. + * * If the string is marked as not owned then this function does not * do anything. */ @@ -637,6 +644,7 @@ void symbolic_str_free(SymbolicStr *string); /** * Creates a symbolic string from a raw C string. + * * This sets the string to owned. In case it's not owned you either have * to make sure you are not freeing the memory or you need to set the * owned flag to false. @@ -666,6 +674,7 @@ SymbolicStr symbolic_symcache_get_arch(const SymbolicSymCache *symcache); /** * Returns the internal buffer of the symcache. + * * The internal buffer is exactly `symbolic_symcache_get_size` bytes long. */ const uint8_t *symbolic_symcache_get_bytes(const SymbolicSymCache *symcache); @@ -776,6 +785,7 @@ bool symbolic_uuid_is_nil(const SymbolicUuid *uuid); /** * Formats the UUID into a string. + * * The string is newly allocated and needs to be released with * `symbolic_cstr_free`. */ From bc5246b529d3a5c5be48fe46869491bf771f2c53 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Mon, 27 Jan 2020 09:27:10 +0100 Subject: [PATCH 017/107] meta(py): Configure black as formatter --- .vscode/settings.json | 2 + Makefile | 12 +- py/setup.py | 84 ++++---- py/symbolic/__init__.py | 11 +- py/symbolic/_compat.py | 7 +- py/symbolic/common.py | 17 +- py/symbolic/debuginfo.py | 62 +++--- py/symbolic/demangle.py | 2 +- py/symbolic/exceptions.py | 16 +- py/symbolic/minidump.py | 99 ++++++---- py/symbolic/proguard.py | 42 ++-- py/symbolic/sourcemap.py | 65 +++--- py/symbolic/symcache.py | 83 ++++---- py/symbolic/unreal.py | 21 +- py/symbolic/utils.py | 30 +-- py/tests/conftest.py | 120 ++++++----- py/tests/test_common.py | 26 +-- py/tests/test_crashprobe.py | 383 +++++++++++++++++------------------- py/tests/test_debug.py | 201 ++++++++++++------- py/tests/test_demangle.py | 34 ++-- py/tests/test_heuristics.py | 6 +- py/tests/test_minidump.py | 174 ++++++++-------- py/tests/test_proguard.py | 32 +-- py/tests/test_sourcemaps.py | 77 ++++---- py/tests/test_symcache.py | 53 ++--- py/tests/test_unreal.py | 35 ++-- 26 files changed, 914 insertions(+), 780 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 8e796b557..70e871ef3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,6 +18,8 @@ // Python configuration "python.pythonPath": ".venv/bin/python", + "python.linting.enabled": false, + "python.formatting.provider": "black", // Created by CPP Extension "files.associations": { diff --git a/Makefile b/Makefile index 24d1e5eb4..524603955 100644 --- a/Makefile +++ b/Makefile @@ -45,17 +45,19 @@ test-python: .venv/bin/python # Style checking -style: style-rust +style: style-rust style-python .PHONY: style -# TODO: Style rust - style-rust: @rustup component add rustfmt --toolchain stable 2> /dev/null cargo +stable fmt -- --check cd cabi && cargo +stable fmt -- --check .PHONY: style-rust +style-python: .venv/bin/python + .venv/bin/pip install -U black + .venv/bin/black --check py + # Linting lint: lint-rust lint-python @@ -84,7 +86,7 @@ format-rust: format-python: .venv/bin/python .venv/bin/pip install -U black - .venv/bin/black tests + .venv/bin/black py .PHONY: format-python # Dependencies @@ -92,4 +94,4 @@ format-python: .venv/bin/python .venv/bin/python: Makefile @rm -rf .venv @which virtualenv || sudo easy_install virtualenv - virtualenv -p python2 .venv + virtualenv -p python3 .venv diff --git a/py/setup.py b/py/setup.py index d1963822f..0cc369844 100644 --- a/py/setup.py +++ b/py/setup.py @@ -13,28 +13,27 @@ _version_re = re.compile(r'(?m)^version\s*=\s*"(.*?)"\s*$') -DEBUG_BUILD = os.environ.get('SYMBOLIC_DEBUG') == '1' +DEBUG_BUILD = os.environ.get("SYMBOLIC_DEBUG") == "1" -with open('README') as f: +with open("README") as f: readme = f.read() -if os.path.isfile('../cabi/Cargo.toml'): - with open('../cabi/Cargo.toml') as f: +if os.path.isfile("../cabi/Cargo.toml"): + with open("../cabi/Cargo.toml") as f: version = _version_re.search(f.read()).group(1) else: - with open('version.txt') as f: + with open("version.txt") as f: version = f.readline().strip() def vendor_rust_deps(): - subprocess.Popen(['scripts/git-archive-all', 'py/rustsrc.zip'], - cwd='..').wait() + subprocess.Popen(["scripts/git-archive-all", "py/rustsrc.zip"], cwd="..").wait() def write_version(): - with open('version.txt', 'w') as f: - f.write('%s\n' % version) + with open("version.txt", "w") as f: + f.write("%s\n" % version) class CustomSDist(sdist): @@ -45,69 +44,60 @@ def run(self): def build_native(spec): - cmd = ['cargo', 'build'] + cmd = ["cargo", "build"] if not DEBUG_BUILD: - cmd.append('--release') - target = 'release' + cmd.append("--release") + target = "release" else: - target = 'debug' + target = "debug" # Step 0: find rust sources - if not os.path.isfile('../cabi/Cargo.toml'): + if not os.path.isfile("../cabi/Cargo.toml"): scratchpad = tempfile.mkdtemp() + @atexit.register def delete_scratchpad(): try: shutil.rmtree(scratchpad) except (IOError, OSError): pass - zf = zipfile.ZipFile('rustsrc.zip') + + zf = zipfile.ZipFile("rustsrc.zip") zf.extractall(scratchpad) - rust_path = scratchpad + '/rustsrc/cabi' + rust_path = scratchpad + "/rustsrc/cabi" else: - rust_path = '../cabi' + rust_path = "../cabi" scratchpad = None # Step 1: build the rust library - print('running `%s` (%s target)' % (' '.join(cmd), target)) - build = spec.add_external_build( - cmd=cmd, - path=rust_path - ) + print("running `%s` (%s target)" % (" ".join(cmd), target)) + build = spec.add_external_build(cmd=cmd, path=rust_path) - rtld_flags = ['NOW'] - if sys.platform == 'darwin': - rtld_flags.append('NODELETE') + rtld_flags = ["NOW"] + if sys.platform == "darwin": + rtld_flags.append("NODELETE") spec.add_cffi_module( - module_path='symbolic._lowlevel', - dylib=lambda: build.find_dylib('symbolic', in_path='target/%s' % target), - header_filename=lambda: build.find_header('symbolic.h', in_path='include'), - rtld_flags=rtld_flags + module_path="symbolic._lowlevel", + dylib=lambda: build.find_dylib("symbolic", in_path="target/%s" % target), + header_filename=lambda: build.find_header("symbolic.h", in_path="include"), + rtld_flags=rtld_flags, ) setup( - name='symbolic', + name="symbolic", version=version, packages=find_packages(), - author='Sentry', - license='MIT', - author_email='hello@sentry.io', - description='A python library for dealing with symbol files and more.', + author="Sentry", + license="MIT", + author_email="hello@sentry.io", + description="A python library for dealing with symbol files and more.", long_description=readme, include_package_data=True, zip_safe=False, - platforms='any', - install_requires=[ - 'milksnake>=0.1.2', - ], - setup_requires=[ - 'milksnake>=0.1.2', - ], - milksnake_tasks=[ - build_native, - ], - cmdclass={ - 'sdist': CustomSDist, - } + platforms="any", + install_requires=["milksnake>=0.1.2",], + setup_requires=["milksnake>=0.1.2",], + milksnake_tasks=[build_native,], + cmdclass={"sdist": CustomSDist,}, ) diff --git a/py/symbolic/__init__.py b/py/symbolic/__init__.py index 40af56aea..ca7984ef2 100644 --- a/py/symbolic/__init__.py +++ b/py/symbolic/__init__.py @@ -3,18 +3,19 @@ def _import_all(): import pkgutil + glob = globals() for _, modname, _ in pkgutil.iter_modules(__path__): - if modname[:1] == '_': + if modname[:1] == "_": continue - mod = __import__('symbolic.%s' % modname, glob, glob, ['__name__']) - if not hasattr(mod, '__all__'): + mod = __import__("symbolic.%s" % modname, glob, glob, ["__name__"]) + if not hasattr(mod, "__all__"): continue __all__.extend(mod.__all__) for name in mod.__all__: obj = getattr(mod, name) - if hasattr(obj, '__module__'): - obj.__module__ = 'symbolic' + if hasattr(obj, "__module__"): + obj.__module__ = "symbolic" glob[name] = obj diff --git a/py/symbolic/_compat.py b/py/symbolic/_compat.py index 86b4e97f9..34c2a0bc9 100644 --- a/py/symbolic/_compat.py +++ b/py/symbolic/_compat.py @@ -9,11 +9,14 @@ string_types = (str, unicode) range_type = xrange itervalues = lambda x: x.itervalues() - NUL = '\x00' + NUL = "\x00" + def implements_to_string(cls): cls.__unicode__ = cls.__str__ - cls.__str__ = lambda x: x.__unicode__().encode('utf-8') + cls.__str__ = lambda x: x.__unicode__().encode("utf-8") return cls + + else: text_type = str int_types = (int,) diff --git a/py/symbolic/common.py b/py/symbolic/common.py index b99e585b7..ce4a86b97 100644 --- a/py/symbolic/common.py +++ b/py/symbolic/common.py @@ -6,15 +6,15 @@ from symbolic import exceptions -__all__ = ['arch_is_known', 'arch_get_ip_reg_name', 'normalize_arch', 'parse_addr'] +__all__ = ["arch_is_known", "arch_get_ip_reg_name", "normalize_arch", "parse_addr"] ignore_arch_exc = (exceptions.UnknownArchError,) # Make sure we init the lib and turn on rust backtraces -os.environ['RUST_BACKTRACE'] = '1' -ffi.init_once(lib.symbolic_init, 'init') +os.environ["RUST_BACKTRACE"] = "1" +ffi.init_once(lib.symbolic_init, "init") def arch_is_known(arch): @@ -29,7 +29,7 @@ def normalize_arch(arch): if arch is None: return None if not isinstance(arch, string_types): - raise ValueError('Invalid architecture: expected string') + raise ValueError("Invalid architecture: expected string") normalized = rustcall(lib.symbolic_normalize_arch, encode_str(arch)) return decode_str(normalized) @@ -38,8 +38,9 @@ def normalize_arch(arch): def arch_get_ip_reg_name(arch): """Returns the ip register if known for this arch.""" try: - return str(decode_str(rustcall( - lib.symbolic_arch_ip_reg_name, encode_str(arch)))) + return str( + decode_str(rustcall(lib.symbolic_arch_ip_reg_name, encode_str(arch))) + ) except ignore_arch_exc: pass @@ -51,7 +52,7 @@ def parse_addr(x): if isinstance(x, int_types): return x if isinstance(x, string_types): - if x[:2] == '0x': + if x[:2] == "0x": return int(x[2:], 16) return int(x) - raise ValueError('Unsupported address format %r' % (x,)) + raise ValueError("Unsupported address format %r" % (x,)) diff --git a/py/symbolic/debuginfo.py b/py/symbolic/debuginfo.py index 91f34e967..ae9d267d1 100644 --- a/py/symbolic/debuginfo.py +++ b/py/symbolic/debuginfo.py @@ -10,12 +10,12 @@ __all__ = [ - 'Archive', - 'Object', - 'ObjectLookup', - 'id_from_breakpad', - 'normalize_code_id', - 'normalize_debug_id', + "Archive", + "Object", + "ObjectLookup", + "id_from_breakpad", + "normalize_code_id", + "normalize_debug_id", ] @@ -26,9 +26,8 @@ class Archive(RustObject): def open(self, path): """Opens an archive from a given path.""" if isinstance(path, text_type): - path = path.encode('utf-8') - return Archive._from_objptr( - rustcall(lib.symbolic_archive_open, path)) + path = path.encode("utf-8") + return Archive._from_objptr(rustcall(lib.symbolic_archive_open, path)) @property def object_count(self): @@ -50,11 +49,11 @@ def get_object(self, debug_id=None, arch=None): for obj in self.iter_objects(): if obj.debug_id == debug_id or obj.arch == arch: return obj - raise LookupError('Object not found') + raise LookupError("Object not found") def _get_object(self, idx): """Returns the object at a certain index.""" - cache = getattr(self, '_objcache', None) + cache = getattr(self, "_objcache", None) if cache is None: cache = self._objcache = WeakValueDictionary() rv = cache.get(idx) @@ -62,7 +61,7 @@ def _get_object(self, idx): return rv ptr = self._methodcall(lib.symbolic_archive_get_object, idx) if ptr == ffi.NULL: - raise LookupError('No object #%d' % idx) + raise LookupError("No object #%d" % idx) rv = cache[idx] = Object._from_objptr(ptr) return rv @@ -116,37 +115,37 @@ def features(self): def make_symcache(self): """Creates a symcache from the object.""" - return SymCache._from_objptr(self._methodcall( - lib.symbolic_symcache_from_object)) + return SymCache._from_objptr( + self._methodcall(lib.symbolic_symcache_from_object) + ) def make_cficache(self): """Creates a cficache from the object.""" - return CfiCache._from_objptr(self._methodcall( - lib.symbolic_cficache_from_object)) + return CfiCache._from_objptr( + self._methodcall(lib.symbolic_cficache_from_object) + ) def __repr__(self): - return '' % ( - self.debug_id, - self.arch, - ) + return "" % (self.debug_id, self.arch,) class ObjectRef(object): """Holds a reference to an object in a format.""" def __init__(self, data): - self.addr = parse_addr(data.get('image_addr')) + self.addr = parse_addr(data.get("image_addr")) # not a real address but why handle it differently - self.size = parse_addr(data.get('image_size')) - self.vmaddr = data.get('image_vmaddr') - self.code_id = data.get('code_id') - self.code_file = data.get('code_file') or data.get('name') + self.size = parse_addr(data.get("image_size")) + self.vmaddr = data.get("image_vmaddr") + self.code_id = data.get("code_id") + self.code_file = data.get("code_file") or data.get("name") self.debug_id = normalize_debug_id( - data.get('debug_id') or data.get('id') or data.get('uuid') or None) - self.debug_file = data.get('debug_file') + data.get("debug_id") or data.get("id") or data.get("uuid") or None + ) + self.debug_file = data.get("debug_file") - if data.get('arch') is not None and arch_is_known(data['arch']): - self.arch = data['arch'] + if data.get("arch") is not None and arch_is_known(data["arch"]): + self.arch = data["arch"] else: self.arch = None @@ -154,10 +153,7 @@ def __init__(self, data): self.name = self.code_file def __repr__(self): - return '' % ( - self.debug_id, - self.arch, - ) + return "" % (self.debug_id, self.arch,) class ObjectLookup(object): diff --git a/py/symbolic/demangle.py b/py/symbolic/demangle.py index 4d52f0793..fdf69d1dd 100644 --- a/py/symbolic/demangle.py +++ b/py/symbolic/demangle.py @@ -2,7 +2,7 @@ from symbolic.utils import encode_str, decode_str, rustcall -__all__ = ['demangle_name'] +__all__ = ["demangle_name"] def demangle_name(symbol, lang=None, no_args=False): diff --git a/py/symbolic/exceptions.py b/py/symbolic/exceptions.py index a28baad0d..150f0077c 100644 --- a/py/symbolic/exceptions.py +++ b/py/symbolic/exceptions.py @@ -2,7 +2,7 @@ from symbolic._lowlevel import lib -__all__ = ['SymbolicError'] +__all__ = ["SymbolicError"] exceptions_by_code = {} @@ -18,13 +18,14 @@ def __init__(self, msg): def __str__(self): rv = self.message if self.rust_info is not None: - return u'%s\n\n%s' % (rv, self.rust_info) + return u"%s\n\n%s" % (rv, self.rust_info) return rv def _make_error(error_name, base=SymbolicError, code=None): class Exc(base): pass + Exc.__name__ = Exc.__qualname__ = error_name if code is not None: Exc.code = code @@ -34,9 +35,9 @@ class Exc(base): def _get_error_base(error_name): - pieces = error_name.split('Error', 1) + pieces = error_name.split("Error", 1) if len(pieces) == 2 and pieces[0] and pieces[1]: - base_error_name = pieces[0] + 'Error' + base_error_name = pieces[0] + "Error" base_class = globals().get(base_error_name) if base_class is None: base_class = _make_error(base_error_name) @@ -46,13 +47,12 @@ def _get_error_base(error_name): def _make_exceptions(): for attr in dir(lib): - if not attr.startswith('SYMBOLIC_ERROR_CODE_'): + if not attr.startswith("SYMBOLIC_ERROR_CODE_"): continue - error_name = attr[20:].title().replace('_', '') + error_name = attr[20:].title().replace("_", "") base = _get_error_base(error_name) - exc = _make_error(error_name, base=base, - code=getattr(lib, attr)) + exc = _make_error(error_name, base=base, code=getattr(lib, attr)) exceptions_by_code[exc.code] = exc diff --git a/py/symbolic/minidump.py b/py/symbolic/minidump.py index 13acc71d4..b776ad0c7 100644 --- a/py/symbolic/minidump.py +++ b/py/symbolic/minidump.py @@ -6,11 +6,25 @@ from symbolic._compat import range_type from symbolic._lowlevel import lib, ffi -from symbolic.utils import RustObject, rustcall, attached_refs, encode_path, \ - encode_str, decode_str, make_buffered_slice_reader - -__all__ = ['CallStack', 'FrameInfoMap', 'FrameTrust', 'ProcessState', - 'StackFrame', 'CfiCache', 'CFICACHE_LATEST_VERSION'] +from symbolic.utils import ( + RustObject, + rustcall, + attached_refs, + encode_path, + encode_str, + decode_str, + make_buffered_slice_reader, +) + +__all__ = [ + "CallStack", + "FrameInfoMap", + "FrameTrust", + "ProcessState", + "StackFrame", + "CfiCache", + "CFICACHE_LATEST_VERSION", +] def _make_frame_trust(): @@ -18,14 +32,14 @@ def _make_frame_trust(): by_value = {} for attr in dir(lib): - if attr.startswith('SYMBOLIC_FRAME_TRUST_'): - name = attr[21:].lower().replace('_', '-') + if attr.startswith("SYMBOLIC_FRAME_TRUST_"): + name = attr[21:].lower().replace("_", "-") value = getattr(lib, attr) enums[name] = value by_value[value] = name - enums['by_value'] = by_value - return type('FrameTrust', (), enums) + enums["by_value"] = by_value + return type("FrameTrust", (), enums) FrameTrust = _make_frame_trust() @@ -34,6 +48,7 @@ def _make_frame_trust(): class CodeModule(RustObject): """Carries information about a code module loaded into the crashed process""" + __dealloc_func__ = None @property @@ -68,17 +83,23 @@ def size(self): @property def id(self): - warnings.warn('module.id is deprecated, use module.debug_id instead', DeprecationWarning) + warnings.warn( + "module.id is deprecated, use module.debug_id instead", DeprecationWarning + ) return self.debug_id @property def name(self): - warnings.warn('module.name is deprecated, use module.code_file instead', DeprecationWarning) + warnings.warn( + "module.name is deprecated, use module.code_file instead", + DeprecationWarning, + ) return self.code_file class StackFrame(RustObject): """A single frame in the call stack of a crashed process""" + __dealloc_func__ = None @property @@ -108,7 +129,7 @@ def module(self): @property def registers(self): - if hasattr(self, '_registers'): + if hasattr(self, "_registers"): return self._registers self._registers = {} @@ -123,6 +144,7 @@ def registers(self): class CallStack(RustObject): """A thread of the crashed process""" + __dealloc_func__ = None @property @@ -143,17 +165,16 @@ def frames(self): def get_frame(self, idx): """Retrieves the stack frame at the given index (0 is the current frame)""" if idx < self.frame_count: - frame = StackFrame._from_objptr( - self._objptr.frames[idx], shared=True) + frame = StackFrame._from_objptr(self._objptr.frames[idx], shared=True) attached_refs[frame] = self return frame else: - raise IndexError("index %d out of bounds %d" % - (idx, self.frame_count)) + raise IndexError("index %d out of bounds %d" % (idx, self.frame_count)) class SystemInfo(RustObject): """Information about the CPU and OS on which a minidump was generated.""" + __dealloc_func__ = None @property @@ -206,6 +227,7 @@ def cpu_count(self): class ProcessState(RustObject): """State of a crashed process""" + __dealloc_func__ = lib.symbolic_process_state_free @classmethod @@ -213,18 +235,21 @@ def from_minidump(cls, path, frame_infos=None): """Processes a minidump and get the state of the crashed process""" frame_infos_ptr = frame_infos._objptr if frame_infos is not None else ffi.NULL return ProcessState._from_objptr( - rustcall(lib.symbolic_process_minidump, encode_path(path), frame_infos_ptr)) + rustcall(lib.symbolic_process_minidump, encode_path(path), frame_infos_ptr) + ) @classmethod def from_minidump_buffer(cls, buffer, frame_infos=None): """Processes a minidump and get the state of the crashed process""" frame_infos_ptr = frame_infos._objptr if frame_infos is not None else ffi.NULL - return ProcessState._from_objptr(rustcall( - lib.symbolic_process_minidump_buffer, - ffi.from_buffer(buffer), - len(buffer), - frame_infos_ptr, - )) + return ProcessState._from_objptr( + rustcall( + lib.symbolic_process_minidump_buffer, + ffi.from_buffer(buffer), + len(buffer), + frame_infos_ptr, + ) + ) @property def requesting_thread(self): @@ -299,13 +324,11 @@ def threads(self): def get_thread(self, idx): """Retrieves the thread with the specified index""" if idx < self.thread_count: - stack = CallStack._from_objptr( - self._objptr.threads[idx], shared=True) + stack = CallStack._from_objptr(self._objptr.threads[idx], shared=True) attached_refs[stack] = self return stack else: - raise IndexError("index %d out of bounds %d" % - (idx, self.thread_count)) + raise IndexError("index %d out of bounds %d" % (idx, self.thread_count)) @property def module_count(self): @@ -317,29 +340,28 @@ def modules(self): def get_module(self, idx): if idx < self.module_count: - module = CodeModule._from_objptr( - self._objptr.modules[idx], shared=True) + module = CodeModule._from_objptr(self._objptr.modules[idx], shared=True) attached_refs[module] = self return module else: - raise IndexError("index %d out of bounds %d" % - (idx, self.module_count)) + raise IndexError("index %d out of bounds %d" % (idx, self.module_count)) class FrameInfoMap(RustObject): """Stack frame information (CFI) for images""" + __dealloc_func__ = lib.symbolic_frame_info_map_free @classmethod def new(cls): """Creates a new, empty frame info map""" - return FrameInfoMap._from_objptr( - rustcall(lib.symbolic_frame_info_map_new)) + return FrameInfoMap._from_objptr(rustcall(lib.symbolic_frame_info_map_new)) def add(self, id, cficache): """Adds CFI for a code module specified by the `id` argument""" - self._methodcall(lib.symbolic_frame_info_map_add, - encode_str(id), cficache._move(self)) + self._methodcall( + lib.symbolic_frame_info_map_add, encode_str(id), cficache._move(self) + ) # The most recent version for the CFI cache file format @@ -348,19 +370,20 @@ def add(self, id, cficache): class CfiCache(RustObject): """A cache for call frame information (CFI) to improve native stackwalking""" + __dealloc_func__ = lib.symbolic_cficache_free @classmethod def open(cls, path): """Loads a cficache from a file via mmap.""" - return cls._from_objptr( - rustcall(lib.symbolic_cficache_open, encode_path(path))) + return cls._from_objptr(rustcall(lib.symbolic_cficache_open, encode_path(path))) @classmethod def from_object(cls, obj): """Creates a cficache from the given object.""" return cls._from_objptr( - rustcall(lib.symbolic_cficache_from_object, obj._get_objptr())) + rustcall(lib.symbolic_cficache_from_object, obj._get_objptr()) + ) @property def version(self): diff --git a/py/symbolic/proguard.py b/py/symbolic/proguard.py index 6773da262..6aa90ccda 100644 --- a/py/symbolic/proguard.py +++ b/py/symbolic/proguard.py @@ -1,22 +1,30 @@ from symbolic._lowlevel import lib, ffi -from symbolic.utils import RustObject, rustcall, decode_str, encode_str, \ - decode_uuid, encode_path, attached_refs +from symbolic.utils import ( + RustObject, + rustcall, + decode_str, + encode_str, + decode_uuid, + encode_path, + attached_refs, +) -__all__ = ['ProguardMappingView'] +__all__ = ["ProguardMappingView"] class ProguardMappingView(RustObject): """Gives access to proguard mapping files.""" + __dealloc_func__ = lib.symbolic_proguardmappingview_free @classmethod def from_bytes(cls, data): """Constructs a mapping file from bytes.""" data = bytes(data) - rv = cls._from_objptr(rustcall( - lib.symbolic_proguardmappingview_from_bytes, - data, len(data))) + rv = cls._from_objptr( + rustcall(lib.symbolic_proguardmappingview_from_bytes, data, len(data)) + ) # we need to keep this reference alive or we crash. hard. attached_refs[rv] = data return rv @@ -24,26 +32,28 @@ def from_bytes(cls, data): @classmethod def open(cls, path): """Constructs a mapping file from a path.""" - return cls._from_objptr(rustcall( - lib.symbolic_proguardmappingview_open, - encode_path(path))) + return cls._from_objptr( + rustcall(lib.symbolic_proguardmappingview_open, encode_path(path)) + ) @property def uuid(self): """Returns the UUID of the file.""" - return decode_uuid(self._methodcall( - lib.symbolic_proguardmappingview_get_uuid)) + return decode_uuid(self._methodcall(lib.symbolic_proguardmappingview_get_uuid)) @property def has_line_info(self): """True if the file contains line information.""" - return bool(self._methodcall( - lib.symbolic_proguardmappingview_has_line_info)) + return bool(self._methodcall(lib.symbolic_proguardmappingview_has_line_info)) def lookup(self, dotted_path, lineno=None): """Given a dotted path and an optional line number this resolves to the original dotted path. """ - return decode_str(self._methodcall( - lib.symbolic_proguardmappingview_convert_dotted_path, - encode_str(dotted_path), lineno or 0)) + return decode_str( + self._methodcall( + lib.symbolic_proguardmappingview_convert_dotted_path, + encode_str(dotted_path), + lineno or 0, + ) + ) diff --git a/py/symbolic/sourcemap.py b/py/symbolic/sourcemap.py index c328fd660..01a58ca49 100644 --- a/py/symbolic/sourcemap.py +++ b/py/symbolic/sourcemap.py @@ -1,17 +1,25 @@ from symbolic._lowlevel import lib, ffi from symbolic._compat import range_type -from symbolic.utils import RustObject, rustcall, decode_str, encode_str, \ - attached_refs +from symbolic.utils import RustObject, rustcall, decode_str, encode_str, attached_refs -__all__ = ['SourceView', 'SourceMapView', 'SourceMapTokenMatch'] +__all__ = ["SourceView", "SourceMapView", "SourceMapTokenMatch"] class SourceMapTokenMatch(object): """Represents a token matched or looked up from the index.""" - def __init__(self, src_line, src_col, dst_line, dst_col, - src_id=None, name=None, src=None, function_name=None): + def __init__( + self, + src_line, + src_col, + dst_line, + dst_col, + src_id=None, + name=None, + src=None, + function_name=None, + ): self.src_line = src_line self.src_col = src_col self.dst_line = dst_line @@ -43,22 +51,21 @@ def __ne__(self, other): return not self.__eq__(other) def __repr__(self): - return '' % ( - self.src, - self.src_line, - ) + return "" % (self.src, self.src_line,) class SourceView(RustObject): """Gives reasonably efficient access to javascript sourcecode.""" + __dealloc_func__ = lib.symbolic_sourceview_free @classmethod def from_bytes(cls, data): """Constructs a source view from bytes.""" data = bytes(data) - rv = cls._from_objptr(rustcall(lib.symbolic_sourceview_from_bytes, - data, len(data))) + rv = cls._from_objptr( + rustcall(lib.symbolic_sourceview_from_bytes, data, len(data)) + ) # we need to keep this reference alive or we crash. hard. attached_refs[rv] = data return rv @@ -72,9 +79,8 @@ def __len__(self): def __getitem__(self, idx): if not isinstance(idx, slice): if idx >= len(self): - raise IndexError('No such line') - return decode_str(self._methodcall( - lib.symbolic_sourceview_get_line, idx)) + raise IndexError("No such line") + return decode_str(self._methodcall(lib.symbolic_sourceview_get_line, idx)) rv = [] for idx in range_type(*idx.indices(len(self))): @@ -91,30 +97,33 @@ def __iter__(self): class SourceMapView(RustObject): """Gives access to a source map.""" + __dealloc_func__ = lib.symbolic_sourcemapview_free @classmethod def from_json_bytes(cls, data): """Constructs a sourcemap from bytes of JSON data.""" data = bytes(data) - return cls._from_objptr(rustcall( - lib.symbolic_sourcemapview_from_json_slice, data, len(data))) + return cls._from_objptr( + rustcall(lib.symbolic_sourcemapview_from_json_slice, data, len(data)) + ) - def lookup(self, line, col, minified_function_name=None, - minified_source=None): + def lookup(self, line, col, minified_function_name=None, minified_source=None): """Looks up a token from the sourcemap and optionally also resolves a function name from a stacktrace to the original one. """ if minified_function_name is None or minified_source is None: - rv = self._methodcall( - lib.symbolic_sourcemapview_lookup_token, line, col) + rv = self._methodcall(lib.symbolic_sourcemapview_lookup_token, line, col) else: if not isinstance(minified_source, SourceView): - raise TypeError('source view required') + raise TypeError("source view required") rv = self._methodcall( lib.symbolic_sourcemapview_lookup_token_with_function_name, - line, col, encode_str(minified_function_name), - minified_source._objptr) + line, + col, + encode_str(minified_function_name), + minified_source._objptr, + ) if rv != ffi.NULL: try: return SourceMapTokenMatch._from_objptr(rv) @@ -134,8 +143,12 @@ def source_count(self): def get_source_name(self, idx): """Returns the name of the source at the given index.""" - return decode_str(self._methodcall( - lib.symbolic_sourcemapview_get_source_name, idx)) or None + return ( + decode_str( + self._methodcall(lib.symbolic_sourcemapview_get_source_name, idx) + ) + or None + ) def iter_sources(self): """Iterates over the sources in the file.""" @@ -148,7 +161,7 @@ def __len__(self): def __getitem__(self, idx): rv = self._methodcall(lib.symbolic_sourcemapview_get_token, idx) if rv == ffi.NULL: - raise IndexError('Token out of range') + raise IndexError("Token out of range") try: return SourceMapTokenMatch._from_objptr(rv) finally: diff --git a/py/symbolic/symcache.py b/py/symbolic/symcache.py index 01c460ee1..0188c75d4 100644 --- a/py/symbolic/symcache.py +++ b/py/symbolic/symcache.py @@ -3,27 +3,42 @@ from symbolic._compat import implements_to_string from symbolic._lowlevel import lib, ffi from symbolic.demangle import demangle_name -from symbolic.utils import RustObject, rustcall, decode_str, encode_str, \ - common_path_join, strip_common_path_prefix, encode_path, attached_refs, \ - SliceReader +from symbolic.utils import ( + RustObject, + rustcall, + decode_str, + encode_str, + common_path_join, + strip_common_path_prefix, + encode_path, + attached_refs, + SliceReader, +) from symbolic.common import parse_addr from symbolic import exceptions -__all__ = ['LineInfo', 'SymCache', 'find_best_instruction', - 'SYMCACHE_LATEST_VERSION'] +__all__ = ["LineInfo", "SymCache", "find_best_instruction", "SYMCACHE_LATEST_VERSION"] # the most recent version for the symcache file format. -SYMCACHE_LATEST_VERSION = rustcall( - lib.symbolic_symcache_latest_version) +SYMCACHE_LATEST_VERSION = rustcall(lib.symbolic_symcache_latest_version) @implements_to_string class LineInfo(object): - - def __init__(self, sym_addr, instr_addr, line, lang, symbol, - line_addr=None, filename=None, base_dir=None, comp_dir=None): + def __init__( + self, + sym_addr, + instr_addr, + line, + lang, + symbol, + line_addr=None, + filename=None, + base_dir=None, + comp_dir=None, + ): self.sym_addr = sym_addr self.line_addr = line_addr self.instr_addr = instr_addr @@ -58,15 +73,11 @@ def rel_path(self): return strip_common_path_prefix(self.abs_path, self.comp_dir) def __str__(self): - return '%s:%s (%s)' % ( - self.function_name, - self.line, - self.rel_path, - ) + return "%s:%s (%s)" % (self.function_name, self.line, self.rel_path,) def __repr__(self): - return 'LineInfo(%s)' % ( - ', '.join('%s=%r' % x for x in sorted(self.__dict__.items())) + return "LineInfo(%s)" % ( + ", ".join("%s=%r" % x for x in sorted(self.__dict__.items())) ) @@ -76,20 +87,21 @@ class SymCache(RustObject): @classmethod def open(cls, path): """Loads a symcache from a file via mmap.""" - return cls._from_objptr( - rustcall(lib.symbolic_symcache_open, encode_path(path))) + return cls._from_objptr(rustcall(lib.symbolic_symcache_open, encode_path(path))) @classmethod def from_object(cls, obj): """Creates a symcache from the given object.""" return cls._from_objptr( - rustcall(lib.symbolic_symcache_from_object, obj._get_objptr())) + rustcall(lib.symbolic_symcache_from_object, obj._get_objptr()) + ) @classmethod def from_bytes(cls, data): """Loads a symcache from a binary buffer.""" symcache = cls._from_objptr( - rustcall(lib.symbolic_symcache_from_bytes, data, len(data))) + rustcall(lib.symbolic_symcache_from_bytes, data, len(data)) + ) attached_refs[symcache] = data return symcache @@ -142,24 +154,25 @@ def lookup(self, addr): matches = [] for idx in range(rv.len): sym = rv.items[idx] - matches.append(LineInfo( - sym_addr=sym.sym_addr, - line_addr=sym.line_addr, - instr_addr=sym.instr_addr, - line=sym.line, - lang=decode_str(sym.lang), - symbol=decode_str(sym.symbol), - filename=decode_str(sym.filename), - base_dir=decode_str(sym.base_dir), - comp_dir=decode_str(sym.comp_dir), - )) + matches.append( + LineInfo( + sym_addr=sym.sym_addr, + line_addr=sym.line_addr, + instr_addr=sym.instr_addr, + line=sym.line, + lang=decode_str(sym.lang), + symbol=decode_str(sym.symbol), + filename=decode_str(sym.filename), + base_dir=decode_str(sym.base_dir), + comp_dir=decode_str(sym.comp_dir), + ) + ) finally: rustcall(lib.symbolic_lookup_result_free, ffi.addressof(rv)) return matches -def find_best_instruction(addr, arch, crashing_frame=False, - signal=None, ip_reg=None): +def find_best_instruction(addr, arch, crashing_frame=False, signal=None, ip_reg=None): """Given an instruction and meta data attempts to find the best one by using a heuristic we inherited from symsynd. """ @@ -168,7 +181,7 @@ def find_best_instruction(addr, arch, crashing_frame=False, encoded_arch = encode_str(arch) addr = parse_addr(addr) - ii = ffi.new('SymbolicInstructionInfo *') + ii = ffi.new("SymbolicInstructionInfo *") ii[0].addr = addr ii[0].arch = encoded_arch ii[0].crashing_frame = crashing_frame diff --git a/py/symbolic/unreal.py b/py/symbolic/unreal.py index 885e994fd..9cf6735ea 100644 --- a/py/symbolic/unreal.py +++ b/py/symbolic/unreal.py @@ -4,10 +4,16 @@ from symbolic._compat import range_type from symbolic.minidump import ProcessState -from symbolic.utils import RustObject, rustcall, decode_str, attached_refs, \ - make_buffered_slice_reader +from symbolic.utils import ( + RustObject, + rustcall, + decode_str, + attached_refs, + make_buffered_slice_reader, +) + +__all__ = ["Unreal4Crash"] -__all__ = ['Unreal4Crash'] class Unreal4Crash(RustObject): __dealloc_func__ = lib.symbolic_unreal4_crash_free @@ -16,8 +22,9 @@ class Unreal4Crash(RustObject): def from_bytes(cls, buffer): """Parses an Unreal Engine 4 crash""" buffer = ffi.from_buffer(buffer) - rv = cls._from_objptr(rustcall(lib.symbolic_unreal4_crash_from_bytes, - buffer, len(buffer))) + rv = cls._from_objptr( + rustcall(lib.symbolic_unreal4_crash_from_bytes, buffer, len(buffer)) + ) attached_refs[rv] = buffer return rv @@ -63,7 +70,7 @@ def type(self): def open_stream(self): """Returns a stream to read files from the internal buffer.""" - len_out = ffi.new('uintptr_t *') + len_out = ffi.new("uintptr_t *") rv = self._methodcall(lib.symbolic_unreal4_file_data, len_out) if rv == ffi.NULL: return None @@ -72,6 +79,6 @@ def open_stream(self): @property def size(self): """Returns the size of the file in bytes.""" - len_out = ffi.new('uintptr_t *') + len_out = ffi.new("uintptr_t *") self._methodcall(lib.symbolic_unreal4_file_data, len_out) return len_out[0] diff --git a/py/symbolic/utils.py b/py/symbolic/utils.py index 75f08e3b7..4c2549906 100644 --- a/py/symbolic/utils.py +++ b/py/symbolic/utils.py @@ -8,14 +8,14 @@ from symbolic.exceptions import exceptions_by_code, SymbolicError -__all__ = ['common_path_join', 'strip_common_path_prefix'] +__all__ = ["common_path_join", "strip_common_path_prefix"] attached_refs = weakref.WeakKeyDictionary() def _is_win_path(x): - return '\\' in x or (ntpath.isabs(x) and not posixpath.isabs(x)) + return "\\" in x or (ntpath.isabs(x) and not posixpath.isabs(x)) def common_path_join(a, b): @@ -33,8 +33,8 @@ def strip_common_path_prefix(base, prefix): path = posixpath pieces_a = path.normpath(base).split(path.sep) pieces_b = path.normpath(prefix).split(path.sep) - if pieces_a[:len(pieces_b)] == pieces_b: - return path.sep.join(pieces_a[len(pieces_b):]) + if pieces_a[: len(pieces_b)] == pieces_b: + return path.sep.join(pieces_a[len(pieces_b) :]) return path.normpath(base) @@ -44,8 +44,7 @@ class RustObject(object): _shared = False def __init__(self): - raise TypeError('Cannot instanciate %r objects' % - self.__class__.__name__) + raise TypeError("Cannot instanciate %r objects" % self.__class__.__name__) @classmethod def _from_objptr(cls, ptr, shared=False): @@ -59,7 +58,7 @@ def _methodcall(self, func, *args): def _get_objptr(self): if not self._objptr: - raise RuntimeError('Object is closed') + raise RuntimeError("Object is closed") return self._objptr def _move(self, target): @@ -97,8 +96,8 @@ def decode_str(s, free=False): """Decodes a SymbolicStr""" try: if s.len == 0: - return u'' - return ffi.unpack(s.data, s.len).decode('utf-8', 'replace') + return u"" + return ffi.unpack(s.data, s.len).decode("utf-8", "replace") finally: if free: lib.symbolic_str_free(ffi.addressof(s)) @@ -106,9 +105,9 @@ def decode_str(s, free=False): def encode_str(s): """Encodes a SymbolicStr""" - rv = ffi.new('SymbolicStr *') + rv = ffi.new("SymbolicStr *") if isinstance(s, text_type): - s = s.encode('utf-8') + s = s.encode("utf-8") rv.data = ffi.from_buffer(s) rv.len = len(s) # we have to hold a weak reference here to ensure our string does not @@ -120,9 +119,9 @@ def encode_str(s): def encode_path(s): """Encodes a path value.""" if isinstance(s, text_type): - s = s.encode('utf-8') + s = s.encode("utf-8") if NUL in s: - raise TypeError('Null bytes are not allowed in paths') + raise TypeError("Null bytes are not allowed in paths") return s @@ -147,6 +146,7 @@ def make_uuid(value): class SliceReader(io.RawIOBase): """A buffered reader that keeps the cache in memory""" + def __init__(self, buf, cache): self._buffer = buf # Hold the cache so we do not lose the reference and crash on @@ -167,8 +167,8 @@ def readinto(self, buf): end = len(self._buffer) else: end = min(self.pos + n, len(self._buffer)) - rv = self._buffer[self.pos:end] - buf[:len(rv)] = rv + rv = self._buffer[self.pos : end] + buf[: len(rv)] = rv self.pos = end return len(rv) diff --git a/py/tests/conftest.py b/py/tests/conftest.py index dbc36bef1..7c8cec608 100644 --- a/py/tests/conftest.py +++ b/py/tests/conftest.py @@ -3,14 +3,20 @@ import json import pytest -from symbolic import ObjectLookup, Archive, SourceMapView, SourceView, \ - find_best_instruction, parse_addr +from symbolic import ( + ObjectLookup, + Archive, + SourceMapView, + SourceView, + find_best_instruction, + parse_addr, +) diff_report = None def get_symcache(path, object_lookup): - dsym_path = os.path.join(path, 'Contents/Resources/DWARF') + dsym_path = os.path.join(path, "Contents/Resources/DWARF") if not os.path.isdir(dsym_path): return for fn in os.listdir(dsym_path): @@ -21,13 +27,12 @@ def get_symcache(path, object_lookup): class ReportSymbolizer(object): - def __init__(self, dsym_paths, binary_images): self.objects = ObjectLookup(binary_images) self.symcaches = {} for path in dsym_paths: - if not path.endswith('.dSYM'): + if not path.endswith(".dSYM"): continue symcache = get_symcache(path, self.objects) if symcache is not None: @@ -35,9 +40,10 @@ def __init__(self, dsym_paths, binary_images): def symbolize_backtrace(self, backtrace, meta=None): def symbolize(frame, frame_idx): - instr = frame['instruction_addr'] - instr = find_best_instruction(instr, crashing_frame=frame_idx == 0, - **(meta or {})) + instr = frame["instruction_addr"] + instr = find_best_instruction( + instr, crashing_frame=frame_idx == 0, **(meta or {}) + ) obj_ref = self.objects.find_object(instr) if obj_ref is None: return [frame] @@ -53,11 +59,11 @@ def symbolize(frame, frame_idx): result = [] for sym in rv: frame = dict(frame) - frame['symbol_name'] = sym.symbol - frame['function'] = sym.function_name - frame['abs_path'] = sym.abs_path - frame['filename'] = sym.filename - frame['line'] = sym.line + frame["symbol_name"] = sym.symbol + frame["function"] = sym.function_name + frame["abs_path"] = sym.abs_path + frame["filename"] = sym.filename + frame["line"] = sym.line result.append(frame) return result @@ -66,18 +72,18 @@ def symbolize(frame, frame_idx): rv.extend(symbolize(f, idx)) for frame in rv: - frame.setdefault('function', frame.get('symbol_name')) - frame.setdefault('filename') - frame.setdefault('line') + frame.setdefault("function", frame.get("symbol_name")) + frame.setdefault("filename") + frame.setdefault("line") return rv class DiffReport(object): - def __init__(self, config): from _pytest.config import create_terminal_writer - self.filename = '.last-run' + + self.filename = ".last-run" self.results = {} self.ran_any = False self._tw = create_terminal_writer(config, sys.stdout) @@ -88,8 +94,8 @@ def record_result(self, name, outcome): def write_to_file(self): if self.results != self.get_last_run(): - with open(self.filename, 'w') as f: - f.write(json.dumps(self.results).rstrip() + '\n') + with open(self.filename, "w") as f: + f.write(json.dumps(self.results).rstrip() + "\n") def get_last_run(self): try: @@ -116,14 +122,14 @@ def diff_with_run(self, old): diffs[key] = (None, b[key]) def _write_status(status): - if status == 'passed': - self._tw.write('PASSED', green=True) - elif status == 'failed': - self._tw.write('FAILED', red=True) - elif status == 'skipped': - self._tw.write('SKIPPED', yellow=True) + if status == "passed": + self._tw.write("PASSED", green=True) + elif status == "failed": + self._tw.write("FAILED", red=True) + elif status == "skipped": + self._tw.write("SKIPPED", yellow=True) elif status is None: - self._tw.write('MISSING', cyan=True) + self._tw.write("MISSING", cyan=True) else: self._tw.write(status.upper()) @@ -132,30 +138,33 @@ def _write_status(status): self._tw.line() if not diffs: - self._tw.sep('~', 'NO CHANGES SINCE LAST RUN') + self._tw.sep("~", "NO CHANGES SINCE LAST RUN") return - self._tw.sep('~', 'CHANGES SINCE LAST RUN FOUND') + self._tw.sep("~", "CHANGES SINCE LAST RUN FOUND") for key, (old, new) in sorted(diffs.items()): - self._tw.write(key.split('::')[-1] + ' ') + self._tw.write(key.split("::")[-1] + " ") _write_status(old) - self._tw.write(' -> ') + self._tw.write(" -> ") _write_status(new) self._tw.line() - if new == 'failed': + if new == "failed": new_failed += 1 - elif new == 'passed': + elif new == "passed": new_passed += 1 - self._tw.sep('~', 'new passed: %d, new failed: %d' % - (new_passed, new_failed)) + self._tw.sep("~", "new passed: %d, new failed: %d" % (new_passed, new_failed)) def pytest_addoption(parser): - group = parser.getgroup('general') - group.addoption('--fail-debugskip', - action='store_true', dest='fail_debugskip', default=False, - help='do not ignore debugskip tests but fail them') + group = parser.getgroup("general") + group.addoption( + "--fail-debugskip", + action="store_true", + dest="fail_debugskip", + default=False, + help="do not ignore debugskip tests but fail them", + ) def pytest_configure(config): @@ -173,9 +182,12 @@ def pytest_unconfigure(config): def change_some_failed_to_skipped(item, rep): if item.config.option.fail_debugskip: return - if item.parent and 'test_crashprobe.py' in item.parent.nodeid and \ - '-debug-' in item.nodeid: - rep.outcome = 'skipped' + if ( + item.parent + and "test_crashprobe.py" in item.parent.nodeid + and "-debug-" in item.nodeid + ): + rep.outcome = "skipped" rep._wasdebugskip = True @@ -183,39 +195,41 @@ def change_some_failed_to_skipped(item, rep): def pytest_runtest_makereport(item, call): outcome = yield rep = outcome.get_result() - if rep.when == 'call': - if rep.outcome == 'failed': + if rep.when == "call": + if rep.outcome == "failed": change_some_failed_to_skipped(item, rep) diff_report.record_result(item.nodeid, rep.outcome) def pytest_report_teststatus(report): - if getattr(report, '_wasdebugskip', False): - return 'debugfailed', 'x', 'DEBUGFAIL' + if getattr(report, "_wasdebugskip", False): + return "debugfailed", "x", "DEBUGFAIL" -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def res_path(): here = os.path.abspath(os.path.dirname(__file__)) - return os.path.join(here, 'res') + return os.path.join(here, "res") -@pytest.fixture(scope='function') +@pytest.fixture(scope="function") def make_report_sym(request): return ReportSymbolizer -@pytest.fixture(scope='function') +@pytest.fixture(scope="function") def get_sourceview(res_path): def getter(path): - with open(os.path.join(res_path, 'sourcemaps', path), 'rb') as f: + with open(os.path.join(res_path, "sourcemaps", path), "rb") as f: return SourceView.from_bytes(f.read()) + return getter -@pytest.fixture(scope='function') +@pytest.fixture(scope="function") def get_sourcemapview(res_path): def getter(path): - with open(os.path.join(res_path, 'sourcemaps', path), 'rb') as f: + with open(os.path.join(res_path, "sourcemaps", path), "rb") as f: return SourceMapView.from_json_bytes(f.read()) + return getter diff --git a/py/tests/test_common.py b/py/tests/test_common.py index c527cb0cd..781dd1b54 100644 --- a/py/tests/test_common.py +++ b/py/tests/test_common.py @@ -5,32 +5,32 @@ def test_arch_is_known(): # Generic (MachO naming convention) - assert arch_is_known('x86') - assert arch_is_known('x86_64') - assert arch_is_known('x86_64h') + assert arch_is_known("x86") + assert arch_is_known("x86_64") + assert arch_is_known("x86_64h") # Breakpad specific - assert arch_is_known('amd64') + assert arch_is_known("amd64") # Unknown and invalid - assert not arch_is_known('foo') + assert not arch_is_known("foo") assert not arch_is_known(None) assert not arch_is_known(42) def test_normalize_arch(): # Generic (MachO naming convention) - assert normalize_arch('x86') == 'x86' - assert normalize_arch('x86_64') == 'x86_64' - assert normalize_arch('x86_64h') == 'x86_64h' + assert normalize_arch("x86") == "x86" + assert normalize_arch("x86_64") == "x86_64" + assert normalize_arch("x86_64h") == "x86_64h" # Breakpad specific - assert normalize_arch('amd64') == 'x86_64' + assert normalize_arch("amd64") == "x86_64" # Unknown and invalid assert normalize_arch(None) is None with pytest.raises(UnknownArchError): - normalize_arch('foo') + normalize_arch("foo") with pytest.raises(ValueError): normalize_arch(42) @@ -38,8 +38,8 @@ def test_normalize_arch(): def test_parse_addr(): assert parse_addr(None) == 0 assert parse_addr(4096) == 0x1000 - assert parse_addr('4096') == 0x1000 - assert parse_addr('0x1000') == 0x1000 + assert parse_addr("4096") == 0x1000 + assert parse_addr("0x1000") == 0x1000 with pytest.raises(ValueError): - parse_addr('asdf') + parse_addr("asdf") diff --git a/py/tests/test_crashprobe.py b/py/tests/test_crashprobe.py index dd1cef8c7..633f6f305 100644 --- a/py/tests/test_crashprobe.py +++ b/py/tests/test_crashprobe.py @@ -7,12 +7,12 @@ TEST_PARAMETER = [ - ('1.4.1', 'release', 'arm64'), - ('1.4.1', 'release', 'armv7'), - ('1.4.1', 'release', 'x86_64'), - ('1.4.1', 'debug', 'arm64'), - ('1.4.1', 'debug', 'armv7'), - ('1.4.1', 'debug', 'x86_64'), + ("1.4.1", "release", "arm64"), + ("1.4.1", "release", "armv7"), + ("1.4.1", "release", "x86_64"), + ("1.4.1", "debug", "arm64"), + ("1.4.1", "debug", "armv7"), + ("1.4.1", "debug", "x86_64"), ] @@ -21,10 +21,11 @@ def basename(x): return os.path.basename(x) -def _load_dsyms_and_symbolize_stacktrace(filename, version, build, arch, - res_path, make_report_sym): - filename_version = version.replace(' ', '') - path = os.path.join(res_path, 'ext', version, build, arch, filename) +def _load_dsyms_and_symbolize_stacktrace( + filename, version, build, arch, res_path, make_report_sym +): + filename_version = version.replace(" ", "") + path = os.path.join(res_path, "ext", version, build, arch, filename) if not os.path.isfile(path): pytest.skip("not test file found") with open(path) as f: @@ -32,46 +33,46 @@ def _load_dsyms_and_symbolize_stacktrace(filename, version, build, arch, bt = None dsym_paths = [] - dsyms_folder = os.path.join(res_path, 'ext', version, build, 'dSYMs') + dsyms_folder = os.path.join(res_path, "ext", version, build, "dSYMs") for file in os.listdir(dsyms_folder): - if file.endswith('.dSYM'): + if file.endswith(".dSYM"): dsym_paths.append(os.path.join(dsyms_folder, file)) - rep = make_report_sym(dsym_paths, report['debug_meta']['images']) - exc = report['exception']['values'][0] - stacktrace = exc['stacktrace'] - meta = {'arch': arch} - if 'mechanism' in exc: - if 'posix_signal' in exc['mechanism']: - meta['signal'] = exc['mechanism']['posix_signal']['signal'] - if 'registers' in stacktrace: + rep = make_report_sym(dsym_paths, report["debug_meta"]["images"]) + exc = report["exception"]["values"][0] + stacktrace = exc["stacktrace"] + meta = {"arch": arch} + if "mechanism" in exc: + if "posix_signal" in exc["mechanism"]: + meta["signal"] = exc["mechanism"]["posix_signal"]["signal"] + if "registers" in stacktrace: ip_reg = arch_get_ip_reg_name(arch) if ip_reg: - meta['ip_reg'] = stacktrace['registers'].get(ip_reg) - bt = rep.symbolize_backtrace(stacktrace['frames'][::-1], - meta=meta) + meta["ip_reg"] = stacktrace["registers"].get(ip_reg) + bt = rep.symbolize_backtrace(stacktrace["frames"][::-1], meta=meta) return bt, report def _filter_system_frames(bt): new_bt = [] for frame in bt: - if any(p in frame['package'] for p in ('CrashProbeiOS', 'CrashLibiOS')) \ - and 'main.m' not in (frame.get('filename') or ''): + if any( + p in frame["package"] for p in ("CrashProbeiOS", "CrashLibiOS") + ) and "main.m" not in (frame.get("filename") or ""): new_bt.append(frame) return new_bt def _test_doCrash_call(bt, index=1): - assert bt[index]['function'] == '-[CRLDetailViewController doCrash]' - assert basename(bt[index]['filename']) == 'CRLDetailViewController.m' - assert bt[index]['line'] == 53 + assert bt[index]["function"] == "-[CRLDetailViewController doCrash]" + assert basename(bt[index]["filename"]) == "CRLDetailViewController.m" + assert bt[index]["line"] == 53 @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_pthread_list_lock_report(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Crash with _pthread_list_lock held.json', + "Crash with _pthread_list_lock held.json", version, build, arch, @@ -86,29 +87,29 @@ def test_pthread_list_lock_report(res_path, make_report_sym, version, build, arc bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashAsyncSafeThread crash]' - assert basename(bt[0]['filename']) == 'CRLCrashAsyncSafeThread.m' - assert bt[0]['line'] == 41 + assert bt[0]["function"] == "-[CRLCrashAsyncSafeThread crash]" + assert basename(bt[0]["filename"]) == "CRLCrashAsyncSafeThread.m" + assert bt[0]["line"] == 41 _test_doCrash_call(bt) -@pytest.mark.xfail(reason='C++ Exception handling doesn\'t work') +@pytest.mark.xfail(reason="C++ Exception handling doesn't work") @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_throw_c_pp_exception(res_path, make_report_sym, version, build, arch): # http://www.crashprobe.com/ios/02/ # Fails on every crash reporter - raise Exception('Fails on every crash reporter') + raise Exception("Fails on every crash reporter") @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_throw_objective_c_exception(res_path, version, build, arch, make_report_sym): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Throw Objective-C exception.json', + "Throw Objective-C exception.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/03/ @@ -119,21 +120,23 @@ def test_throw_objective_c_exception(res_path, version, build, arch, make_report bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashObjCException crash]' - assert basename(bt[0]['filename']) == 'CRLCrashObjCException.m' - assert bt[0]['line'] == 41 + assert bt[0]["function"] == "-[CRLCrashObjCException crash]" + assert basename(bt[0]["filename"]) == "CRLCrashObjCException.m" + assert bt[0]["line"] == 41 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) -def test_access_a_non_object_as_an_object(res_path, make_report_sym, version, build, arch): +def test_access_a_non_object_as_an_object( + res_path, make_report_sym, version, build, arch +): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Access a non-object as an object.json', + "Access a non-object as an object.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/04/ @@ -143,25 +146,25 @@ def test_access_a_non_object_as_an_object(res_path, make_report_sym, version, bu bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashNSLog crash]' - assert basename(bt[0]['filename']) == 'CRLCrashNSLog.m' - assert bt[0]['line'] == 41 + assert bt[0]["function"] == "-[CRLCrashNSLog crash]" + assert basename(bt[0]["filename"]) == "CRLCrashNSLog.m" + assert bt[0]["line"] == 41 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_crash_inside_objc_msg_send(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Crash inside objc_msgSend().json', + "Crash inside objc_msgSend().json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) - if arch == 'x86_64': - pytest.xfail('bad data from kscrash') + if arch == "x86_64": + pytest.xfail("bad data from kscrash") # http://www.crashprobe.com/ios/05/ # -[CRLCrashObjCMsgSend crash] (CRLCrashObjCMsgSend.m:47) @@ -170,25 +173,25 @@ def test_crash_inside_objc_msg_send(res_path, make_report_sym, version, build, a bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashObjCMsgSend crash]' - assert basename(bt[0]['filename']) == 'CRLCrashObjCMsgSend.m' - assert bt[0]['line'] == 47 + assert bt[0]["function"] == "-[CRLCrashObjCMsgSend crash]" + assert basename(bt[0]["filename"]) == "CRLCrashObjCMsgSend.m" + assert bt[0]["line"] == 47 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_message_a_released_object(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Message a released object.json', + "Message a released object.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) - if arch == 'x86_64': - pytest.xfail('bad data from kscrash') + if arch == "x86_64": + pytest.xfail("bad data from kscrash") # http://www.crashprobe.com/ios/06/ # -[CRLCrashReleasedObject crash]_block_invoke (CRLCrashReleasedObject.m:51-53) @@ -198,24 +201,24 @@ def test_message_a_released_object(res_path, make_report_sym, version, build, ar bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '__31-[CRLCrashReleasedObject crash]_block_invoke' - assert basename(bt[0]['filename']) == 'CRLCrashReleasedObject.m' - assert bt[0]['line'] == (arch == 'arm64' and 51 or 53) - assert bt[1]['function'] == '-[CRLCrashReleasedObject crash]' - assert basename(bt[1]['filename']) == 'CRLCrashReleasedObject.m' - assert bt[1]['line'] == 49 + assert bt[0]["function"] == "__31-[CRLCrashReleasedObject crash]_block_invoke" + assert basename(bt[0]["filename"]) == "CRLCrashReleasedObject.m" + assert bt[0]["line"] == (arch == "arm64" and 51 or 53) + assert bt[1]["function"] == "-[CRLCrashReleasedObject crash]" + assert basename(bt[1]["filename"]) == "CRLCrashReleasedObject.m" + assert bt[1]["line"] == 49 _test_doCrash_call(bt, 2) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_write_to_a_read_only_page(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Write to a read-only page.json', + "Write to a read-only page.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/07/ @@ -225,21 +228,23 @@ def test_write_to_a_read_only_page(res_path, make_report_sym, version, build, ar bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashROPage crash]' - assert basename(bt[0]['filename']) == 'CRLCrashROPage.m' - assert bt[0]['line'] == 42 + assert bt[0]["function"] == "-[CRLCrashROPage crash]" + assert basename(bt[0]["filename"]) == "CRLCrashROPage.m" + assert bt[0]["line"] == 42 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) -def test_execute_a_privileged_instruction(res_path, make_report_sym, version, build, arch): +def test_execute_a_privileged_instruction( + res_path, make_report_sym, version, build, arch +): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Execute a privileged instruction.json', + "Execute a privileged instruction.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/08/ @@ -250,28 +255,30 @@ def test_execute_a_privileged_instruction(res_path, make_report_sym, version, bu bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashPrivInst crash]' - assert basename(bt[0]['filename']) == 'CRLCrashPrivInst.m' - if arch == 'arm64': - assert bt[0]['line'] == 52 - elif arch == 'armv7': - assert bt[0]['line'] == 42 - elif arch == 'x86_64': - assert bt[0]['line'] == 40 + assert bt[0]["function"] == "-[CRLCrashPrivInst crash]" + assert basename(bt[0]["filename"]) == "CRLCrashPrivInst.m" + if arch == "arm64": + assert bt[0]["line"] == 52 + elif arch == "armv7": + assert bt[0]["line"] == 42 + elif arch == "x86_64": + assert bt[0]["line"] == 40 else: assert False _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) -def test_execute_an_undefined_instruction(res_path, make_report_sym, version, build, arch): +def test_execute_an_undefined_instruction( + res_path, make_report_sym, version, build, arch +): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Execute an undefined instruction.json', + "Execute an undefined instruction.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/09/ @@ -282,14 +289,14 @@ def test_execute_an_undefined_instruction(res_path, make_report_sym, version, bu bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashUndefInst crash]' - assert basename(bt[0]['filename']) == 'CRLCrashUndefInst.m' - if arch == 'arm64': - assert bt[0]['line'] == 50 - elif arch == 'armv7': - assert bt[0]['line'] == 42 - elif arch == 'x86_64': - assert bt[0]['line'] == 40 + assert bt[0]["function"] == "-[CRLCrashUndefInst crash]" + assert basename(bt[0]["filename"]) == "CRLCrashUndefInst.m" + if arch == "arm64": + assert bt[0]["line"] == 50 + elif arch == "armv7": + assert bt[0]["line"] == 42 + elif arch == "x86_64": + assert bt[0]["line"] == 40 else: assert False _test_doCrash_call(bt) @@ -298,12 +305,12 @@ def test_execute_an_undefined_instruction(res_path, make_report_sym, version, bu @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_dereference_a_null_pointer(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Dereference a NULL pointer.json', + "Dereference a NULL pointer.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/10/ @@ -313,21 +320,21 @@ def test_dereference_a_null_pointer(res_path, make_report_sym, version, build, a bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashNULL crash]' - assert basename(bt[0]['filename']) == 'CRLCrashNULL.m' - assert bt[0]['line'] == 37 + assert bt[0]["function"] == "-[CRLCrashNULL crash]" + assert basename(bt[0]["filename"]) == "CRLCrashNULL.m" + assert bt[0]["line"] == 37 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_dereference_a_bad_pointer(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Dereference a bad pointer.json', + "Dereference a bad pointer.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/11/ @@ -338,11 +345,11 @@ def test_dereference_a_bad_pointer(res_path, make_report_sym, version, build, ar bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashGarbage crash]' - assert basename(bt[0]['filename']) == 'CRLCrashGarbage.m' - assert bt[0]['line'] == arch == 'arm64' and 52 or 48 + assert bt[0]["function"] == "-[CRLCrashGarbage crash]" + assert basename(bt[0]["filename"]) == "CRLCrashGarbage.m" + assert bt[0]["line"] == arch == "arm64" and 52 or 48 # TODO check here we have one more frame on arm64 from kscrash - _test_doCrash_call(bt, arch == 'arm64' and 2 or 1) + _test_doCrash_call(bt, arch == "arm64" and 2 or 1) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) @@ -352,12 +359,7 @@ def test_jump_into_an_nx_page(res_path, make_report_sym, version, build, arch): # Nothing here is jumping to an NX page, instead the compiler will # emit a "brk #0x1" for the call to the null pointer function. bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Jump into an NX page.json', - version, - build, - arch, - res_path, - make_report_sym + "Jump into an NX page.json", version, build, arch, res_path, make_report_sym ) # http://www.crashprobe.com/ios/12/ @@ -367,18 +369,18 @@ def test_jump_into_an_nx_page(res_path, make_report_sym, version, build, arch): bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashNXPage crash]' + assert bt[0]["function"] == "-[CRLCrashNXPage crash]" # This is what crashprobe actually expects but that information is not # actually in the debug files. if 0: - assert basename(bt[0]['filename']) == 'CRLCrashNXPage.m' - assert bt[0]['line'] == 37 + assert basename(bt[0]["filename"]) == "CRLCrashNXPage.m" + assert bt[0]["line"] == 37 # So let's assert for the second best else: - assert basename(bt[0]['filename']) is None - assert bt[0]['line'] in (None, 0) + assert basename(bt[0]["filename"]) is None + assert bt[0]["line"] in (None, 0) _test_doCrash_call(bt) @@ -386,12 +388,7 @@ def test_jump_into_an_nx_page(res_path, make_report_sym, version, build, arch): @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_stack_overflow(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Stack overflow.json', - version, - build, - arch, - res_path, - make_report_sym + "Stack overflow.json", version, build, arch, res_path, make_report_sym ) # http://www.crashprobe.com/ios/13/ @@ -403,26 +400,21 @@ def test_stack_overflow(res_path, make_report_sym, version, build, arch): bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashStackGuard crash]' - assert basename(bt[0]['filename']) == 'CRLCrashStackGuard.m' + assert bt[0]["function"] == "-[CRLCrashStackGuard crash]" + assert basename(bt[0]["filename"]) == "CRLCrashStackGuard.m" - if arch == 'x86_64': + if arch == "x86_64": # Let's just say good enough - assert bt[0]['line'] == 39 + assert bt[0]["line"] == 39 else: - assert bt[0]['line'] == 38 + assert bt[0]["line"] == 38 @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) @pytest.mark.bad_crashprobe def test_call_builtin_trap(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Call __builtin_trap().json', - version, - build, - arch, - res_path, - make_report_sym + "Call __builtin_trap().json", version, build, arch, res_path, make_report_sym ) # http://www.crashprobe.com/ios/14/ @@ -432,14 +424,14 @@ def test_call_builtin_trap(res_path, make_report_sym, version, build, arch): bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashTrap crash]' - assert basename(bt[0]['filename']) == 'CRLCrashTrap.m' + assert bt[0]["function"] == "-[CRLCrashTrap crash]" + assert basename(bt[0]["filename"]) == "CRLCrashTrap.m" # Crashprobe (as well as the sourcecode) expects 37 here. This is # obviously what is expected but if you look into the dsym file you # can see that for the given address the information says it would be # in line 35. On x86 we however see the correct result. - assert bt[0]['line'] in (35, 37) + assert bt[0]["line"] in (35, 37) _test_doCrash_call(bt) @@ -447,12 +439,7 @@ def test_call_builtin_trap(res_path, make_report_sym, version, build, arch): @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_call_abort(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Call abort().json', - version, - build, - arch, - res_path, - make_report_sym + "Call abort().json", version, build, arch, res_path, make_report_sym ) # http://www.crashprobe.com/ios/15/ @@ -462,21 +449,23 @@ def test_call_abort(res_path, make_report_sym, version, build, arch): bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashAbort crash]' - assert basename(bt[0]['filename']) == 'CRLCrashAbort.m' - assert bt[0]['line'] == 37 + assert bt[0]["function"] == "-[CRLCrashAbort crash]" + assert basename(bt[0]["filename"]) == "CRLCrashAbort.m" + assert bt[0]["line"] == 37 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) -def test_corrupt_malloc_s_internal_tracking_information(res_path, make_report_sym, version, build, arch): +def test_corrupt_malloc_s_internal_tracking_information( + res_path, make_report_sym, version, build, arch +): bt, report = _load_dsyms_and_symbolize_stacktrace( "Corrupt malloc()'s internal tracking information.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/16/ # -[CRLCrashCorruptMalloc crash] (CRLCrashCorruptMalloc.m:46) @@ -484,21 +473,23 @@ def test_corrupt_malloc_s_internal_tracking_information(res_path, make_report_sy bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashCorruptMalloc crash]' - assert basename(bt[0]['filename']) == 'CRLCrashCorruptMalloc.m' - assert bt[0]['line'] == 46 + assert bt[0]["function"] == "-[CRLCrashCorruptMalloc crash]" + assert basename(bt[0]["filename"]) == "CRLCrashCorruptMalloc.m" + assert bt[0]["line"] == 46 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) -def test_corrupt_the_objective_c_runtime_s_structures(res_path, make_report_sym, version, build, arch): +def test_corrupt_the_objective_c_runtime_s_structures( + res_path, make_report_sym, version, build, arch +): bt, report = _load_dsyms_and_symbolize_stacktrace( "Corrupt the Objective-C runtime's structures.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/17/ # -[CRLCrashCorruptObjC crash] (CRLCrashCorruptObjC.m:70) @@ -506,22 +497,17 @@ def test_corrupt_the_objective_c_runtime_s_structures(res_path, make_report_sym, bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashCorruptObjC crash]' - assert basename(bt[0]['filename']) == 'CRLCrashCorruptObjC.m' - assert bt[0]['line'] == 70 + assert bt[0]["function"] == "-[CRLCrashCorruptObjC crash]" + assert basename(bt[0]["filename"]) == "CRLCrashCorruptObjC.m" + assert bt[0]["line"] == 70 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) -@pytest.mark.xfail(reason='KSCrash does not support dwarf unwinding') +@pytest.mark.xfail(reason="KSCrash does not support dwarf unwinding") def test_dwarf_unwinding(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'DWARF Unwinding.json', - version, - build, - arch, - res_path, - make_report_sym + "DWARF Unwinding.json", version, build, arch, res_path, make_report_sym ) # http://www.crashprobe.com/ios/18/ @@ -534,26 +520,28 @@ def test_dwarf_unwinding(res_path, make_report_sym, version, build, arch): assert len(bt) > 3 - assert bt[2]['function'] == '-[CRLFramelessDWARF crash]' - assert basename(bt[2]['filename']) == 'CRLFramelessDWARF.m' - assert bt[2]['line'] == 49 + assert bt[2]["function"] == "-[CRLFramelessDWARF crash]" + assert basename(bt[2]["filename"]) == "CRLFramelessDWARF.m" + assert bt[2]["line"] == 49 - assert bt[4]['function'] == 'CRLFramelessDWARF_test_crash' - assert basename(['filename']) == 'CRLFramelessDWARF.m' - assert bt[4]['line'] == 35 + assert bt[4]["function"] == "CRLFramelessDWARF_test_crash" + assert basename(["filename"]) == "CRLFramelessDWARF.m" + assert bt[4]["line"] == 35 _test_doCrash_call(bt) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) -def test_overwrite_link_register_then_crash(res_path, make_report_sym, version, build, arch): +def test_overwrite_link_register_then_crash( + res_path, make_report_sym, version, build, arch +): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Overwrite link register, then crash.json', + "Overwrite link register, then crash.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) # http://www.crashprobe.com/ios/19/ @@ -563,25 +551,25 @@ def test_overwrite_link_register_then_crash(res_path, make_report_sym, version, bt = _filter_system_frames(bt) pprint.pprint(bt) - assert bt[0]['function'] == '-[CRLCrashOverwriteLinkRegister crash]' - assert basename(bt[0]['filename']) == 'CRLCrashOverwriteLinkRegister.m' - assert bt[0]['line'] == 53 + assert bt[0]["function"] == "-[CRLCrashOverwriteLinkRegister crash]" + assert basename(bt[0]["filename"]) == "CRLCrashOverwriteLinkRegister.m" + assert bt[0]["line"] == 53 _test_doCrash_call(bt, -1) @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_smash_the_bottom_of_the_stack(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Smash the bottom of the stack.json', + "Smash the bottom of the stack.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) - if arch == 'arm64': - pytest.xfail('This test fails everywhere in arm64') + if arch == "arm64": + pytest.xfail("This test fails everywhere in arm64") # http://www.crashprobe.com/ios/20/ # -[CRLCrashSmashStackBottom crash] (CRLCrashSmashStackBottom.m:54) @@ -590,31 +578,31 @@ def test_smash_the_bottom_of_the_stack(res_path, make_report_sym, version, build pprint.pprint(bt) assert len(bt) > 0 - assert bt[0]['function'] == '-[CRLCrashSmashStackBottom crash]' - assert basename(bt[0]['filename']) == 'CRLCrashSmashStackBottom.m' + assert bt[0]["function"] == "-[CRLCrashSmashStackBottom crash]" + assert basename(bt[0]["filename"]) == "CRLCrashSmashStackBottom.m" # This is slightly wrong on x86 currently - if arch == 'x86_64': - assert bt[0]['line'] == 55 + if arch == "x86_64": + assert bt[0]["line"] == 55 else: - assert bt[0]['line'] == 54 + assert bt[0]["line"] == 54 @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) def test_smash_the_top_of_the_stack(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Smash the top of the stack.json', + "Smash the top of the stack.json", version, build, arch, res_path, - make_report_sym + make_report_sym, ) - if arch == 'arm64': - pytest.xfail('This test fails everywhere in arm64') - if arch == 'x86_64': - pytest.xfail('This test fails on x86_64') + if arch == "arm64": + pytest.xfail("This test fails everywhere in arm64") + if arch == "x86_64": + pytest.xfail("This test fails on x86_64") # http://www.crashprobe.com/ios/21/ # -[CRLCrashSmashStackTop crash] (CRLCrashSmashStackTop.m:54) @@ -623,21 +611,16 @@ def test_smash_the_top_of_the_stack(res_path, make_report_sym, version, build, a pprint.pprint(bt) assert len(bt) > 0 - assert bt[0]['function'] == '-[CRLCrashSmashStackTop crash]' - assert basename(bt[0]['filename']) == 'CRLCrashSmashStackTop.m' - assert bt[0]['line'] == 54 + assert bt[0]["function"] == "-[CRLCrashSmashStackTop crash]" + assert basename(bt[0]["filename"]) == "CRLCrashSmashStackTop.m" + assert bt[0]["line"] == 54 @pytest.mark.parametrize("version, build, arch", TEST_PARAMETER) @pytest.mark.bad_crashprobe def test_swift(res_path, make_report_sym, version, build, arch): bt, report = _load_dsyms_and_symbolize_stacktrace( - 'Swift.json', - version, - build, - arch, - res_path, - make_report_sym + "Swift.json", version, build, arch, res_path, make_report_sym ) # http://www.crashprobe.com/ios/22/ @@ -649,14 +632,14 @@ def test_swift(res_path, make_report_sym, version, build, arch): # XCode compiled with a wrong name for ARM # We are testing explicitly here to also catch demangler regressions - if arch == 'x86_64': - assert bt[0]['function'] == 'CRLCrashSwift.crash()' + if arch == "x86_64": + assert bt[0]["function"] == "CRLCrashSwift.crash()" else: - assert bt[0]['function'] == 'crash' + assert bt[0]["function"] == "crash" - assert bt[0]['line'] == 36 - assert basename(bt[0]['filename']) == 'CRLCrashSwift.swift' - assert bt[1]['function'] == '@objc CRLCrashSwift.crash()' - assert basename(bt[1]['filename']) == 'CRLCrashSwift.swift' + assert bt[0]["line"] == 36 + assert basename(bt[0]["filename"]) == "CRLCrashSwift.swift" + assert bt[1]["function"] == "@objc CRLCrashSwift.crash()" + assert basename(bt[1]["filename"]) == "CRLCrashSwift.swift" _test_doCrash_call(bt, 2) diff --git a/py/tests/test_debug.py b/py/tests/test_debug.py index 056e64fba..afd6a2733 100644 --- a/py/tests/test_debug.py +++ b/py/tests/test_debug.py @@ -1,127 +1,178 @@ import os -from symbolic import ObjectLookup, Archive, id_from_breakpad, normalize_code_id, normalize_debug_id +from symbolic import ( + ObjectLookup, + Archive, + id_from_breakpad, + normalize_code_id, + normalize_debug_id, +) def test_object_features_mac(res_path): - binary_path = os.path.join(res_path, 'minidump', 'crash_macos') + binary_path = os.path.join(res_path, "minidump", "crash_macos") archive = Archive.open(binary_path) obj = archive.get_object(arch="x86_64") - assert obj.features == set(['symtab', 'unwind']) - - binary_path = os.path.join(res_path, 'minidump', 'crash_macos.dSYM', 'Contents', 'Resources', 'DWARF', 'crash_macos') + assert obj.features == set(["symtab", "unwind"]) + + binary_path = os.path.join( + res_path, + "minidump", + "crash_macos.dSYM", + "Contents", + "Resources", + "DWARF", + "crash_macos", + ) archive = Archive.open(binary_path) obj = archive.get_object(arch="x86_64") - assert obj.features == set(['symtab', 'debug']) + assert obj.features == set(["symtab", "debug"]) def test_object_features_linux(res_path): - binary_path = os.path.join(res_path, 'minidump', 'crash_linux') + binary_path = os.path.join(res_path, "minidump", "crash_linux") archive = Archive.open(binary_path) obj = archive.get_object(arch="x86_64") - assert obj.features == set(['symtab', 'debug', 'unwind']) + assert obj.features == set(["symtab", "debug", "unwind"]) def test_id_from_breakpad(): - assert id_from_breakpad( - 'DFB8E43AF2423D73A453AEB6A777EF750') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75' - assert id_from_breakpad( - 'DFB8E43AF2423D73A453AEB6A777EF75a') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75-a' - assert id_from_breakpad( - 'DFB8E43AF2423D73A453AEB6A777EF75feedface') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75-feedface' + assert ( + id_from_breakpad("DFB8E43AF2423D73A453AEB6A777EF750") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75" + ) + assert ( + id_from_breakpad("DFB8E43AF2423D73A453AEB6A777EF75a") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75-a" + ) + assert ( + id_from_breakpad("DFB8E43AF2423D73A453AEB6A777EF75feedface") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75-feedface" + ) assert id_from_breakpad(None) == None def test_normalize_code_id(): # ELF - assert normalize_code_id( - 'f1c3bcc0279865fe3058404b2831d9e64135386c') == 'f1c3bcc0279865fe3058404b2831d9e64135386c' + assert ( + normalize_code_id("f1c3bcc0279865fe3058404b2831d9e64135386c") + == "f1c3bcc0279865fe3058404b2831d9e64135386c" + ) # MachO - assert normalize_code_id( - 'DFB8E43AF2423D73A453AEB6A777EF75') == 'dfb8e43af2423d73a453aeb6a777ef75' + assert ( + normalize_code_id("DFB8E43AF2423D73A453AEB6A777EF75") + == "dfb8e43af2423d73a453aeb6a777ef75" + ) # PE - assert normalize_code_id('5AB380779000') == '5ab380779000' + assert normalize_code_id("5AB380779000") == "5ab380779000" assert normalize_code_id(None) == None def test_normalize_debug_id(): - assert normalize_debug_id( - 'dfb8e43a-f242-3d73-a453-aeb6a777ef75') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75' - assert normalize_debug_id( - 'dfb8e43a-f242-3d73-a453-aeb6a777ef75-a') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75-a' - assert normalize_debug_id( - 'dfb8e43af2423d73a453aeb6a777ef75-a') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75-a' - assert normalize_debug_id( - 'DFB8E43AF2423D73A453AEB6A777EF750') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75' - assert normalize_debug_id( - 'DFB8E43AF2423D73A453AEB6A777EF75a') == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75-a' + assert ( + normalize_debug_id("dfb8e43a-f242-3d73-a453-aeb6a777ef75") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75" + ) + assert ( + normalize_debug_id("dfb8e43a-f242-3d73-a453-aeb6a777ef75-a") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75-a" + ) + assert ( + normalize_debug_id("dfb8e43af2423d73a453aeb6a777ef75-a") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75-a" + ) + assert ( + normalize_debug_id("DFB8E43AF2423D73A453AEB6A777EF750") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75" + ) + assert ( + normalize_debug_id("DFB8E43AF2423D73A453AEB6A777EF75a") + == "dfb8e43a-f242-3d73-a453-aeb6a777ef75-a" + ) assert normalize_debug_id(None) == None def test_object_ref_legacy_apple(): - lookup = ObjectLookup([{ - 'uuid': 'dfb8e43a-f242-3d73-a453-aeb6a777ef75', - 'image_addr': '0x1000', - 'image_size': 1024, - 'name': 'CoreFoundation', - }]) - - obj = lookup.get_object('dfb8e43a-f242-3d73-a453-aeb6a777ef75') - assert obj.name == 'CoreFoundation' + lookup = ObjectLookup( + [ + { + "uuid": "dfb8e43a-f242-3d73-a453-aeb6a777ef75", + "image_addr": "0x1000", + "image_size": 1024, + "name": "CoreFoundation", + } + ] + ) + + obj = lookup.get_object("dfb8e43a-f242-3d73-a453-aeb6a777ef75") + assert obj.name == "CoreFoundation" assert obj.code_id is None - assert obj.code_file == 'CoreFoundation' - assert obj.debug_id == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75' + assert obj.code_file == "CoreFoundation" + assert obj.debug_id == "dfb8e43a-f242-3d73-a453-aeb6a777ef75" assert obj.debug_file is None def test_object_ref_legacy_symbolic(): - lookup = ObjectLookup([{ - 'id': 'dfb8e43a-f242-3d73-a453-aeb6a777ef75', - 'image_addr': '0x1000', - 'image_size': 1024, - 'name': 'CoreFoundation', - }]) - - obj = lookup.get_object('dfb8e43a-f242-3d73-a453-aeb6a777ef75') - assert obj.name == 'CoreFoundation' + lookup = ObjectLookup( + [ + { + "id": "dfb8e43a-f242-3d73-a453-aeb6a777ef75", + "image_addr": "0x1000", + "image_size": 1024, + "name": "CoreFoundation", + } + ] + ) + + obj = lookup.get_object("dfb8e43a-f242-3d73-a453-aeb6a777ef75") + assert obj.name == "CoreFoundation" assert obj.code_id is None - assert obj.code_file == 'CoreFoundation' - assert obj.debug_id == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75' + assert obj.code_file == "CoreFoundation" + assert obj.debug_id == "dfb8e43a-f242-3d73-a453-aeb6a777ef75" assert obj.debug_file is None def test_object_ref(): - lookup = ObjectLookup([{ - 'code_id': 'DFB8E43A-F242-3D73-A453-AEB6A777EF75', - 'code_file': 'CoreFoundation', - 'debug_id': 'dfb8e43a-f242-3d73-a453-aeb6a777ef75', - 'debug_file': 'CoreFoundation.dSYM', - 'image_addr': '0x1000', - 'image_size': 1024, - }]) - - obj = lookup.get_object('dfb8e43a-f242-3d73-a453-aeb6a777ef75') - assert obj.name == 'CoreFoundation' - assert obj.code_id == 'DFB8E43A-F242-3D73-A453-AEB6A777EF75' - assert obj.code_file == 'CoreFoundation' - assert obj.debug_id == 'dfb8e43a-f242-3d73-a453-aeb6a777ef75' - assert obj.debug_file == 'CoreFoundation.dSYM' + lookup = ObjectLookup( + [ + { + "code_id": "DFB8E43A-F242-3D73-A453-AEB6A777EF75", + "code_file": "CoreFoundation", + "debug_id": "dfb8e43a-f242-3d73-a453-aeb6a777ef75", + "debug_file": "CoreFoundation.dSYM", + "image_addr": "0x1000", + "image_size": 1024, + } + ] + ) + + obj = lookup.get_object("dfb8e43a-f242-3d73-a453-aeb6a777ef75") + assert obj.name == "CoreFoundation" + assert obj.code_id == "DFB8E43A-F242-3D73-A453-AEB6A777EF75" + assert obj.code_file == "CoreFoundation" + assert obj.debug_id == "dfb8e43a-f242-3d73-a453-aeb6a777ef75" + assert obj.debug_file == "CoreFoundation.dSYM" def test_find_object(): - lookup = ObjectLookup([{ - 'code_id': 'DFB8E43A-F242-3D73-A453-AEB6A777EF75', - 'code_file': 'CoreFoundation', - 'debug_id': 'dfb8e43a-f242-3d73-a453-aeb6a777ef75', - 'debug_file': 'CoreFoundation.dSYM', - 'image_addr': '0x1000', - 'image_size': 1024, - }]) + lookup = ObjectLookup( + [ + { + "code_id": "DFB8E43A-F242-3D73-A453-AEB6A777EF75", + "code_file": "CoreFoundation", + "debug_id": "dfb8e43a-f242-3d73-a453-aeb6a777ef75", + "debug_file": "CoreFoundation.dSYM", + "image_addr": "0x1000", + "image_size": 1024, + } + ] + ) from pprint import pprint + pprint(lookup._addresses) - assert lookup.find_object('0x1000') is not None + assert lookup.find_object("0x1000") is not None assert lookup.find_object(4096) is not None assert lookup.find_object(5119) is not None diff --git a/py/tests/test_demangle.py b/py/tests/test_demangle.py index ea336c5aa..10dbf83f6 100644 --- a/py/tests/test_demangle.py +++ b/py/tests/test_demangle.py @@ -2,42 +2,42 @@ def test_swift_demangle(): - mangled = '_TFC12Swift_Tester14ViewController11doSomethingfS0_FT_T_' - expected = 'ViewController.doSomething(_:)' - assert demangle_name(mangled, lang='Swift') == expected + mangled = "_TFC12Swift_Tester14ViewController11doSomethingfS0_FT_T_" + expected = "ViewController.doSomething(_:)" + assert demangle_name(mangled, lang="Swift") == expected def test_swift_demangle_implicit(): - mangled = '_TFC12Swift_Tester14ViewController11doSomethingfS0_FT_T_' - expected = 'ViewController.doSomething(_:)' + mangled = "_TFC12Swift_Tester14ViewController11doSomethingfS0_FT_T_" + expected = "ViewController.doSomething(_:)" assert demangle_name(mangled) == expected def test_swift_demangle_options(): mangled = ( - '_TTWVSC29UIApplicationLaunchOptionsKeys21_ObjectiveCBridgeable' - '5UIKitZFS0_36_unconditionallyBridgeFromObjectiveCfGSqwx15_' - 'ObjectiveCType_x' + "_TTWVSC29UIApplicationLaunchOptionsKeys21_ObjectiveCBridgeable" + "5UIKitZFS0_36_unconditionallyBridgeFromObjectiveCfGSqwx15_" + "ObjectiveCType_x" ) simplified_expected = ( - u'protocol witness for static _ObjectiveCBridgeable._' - u'unconditionallyBridgeFromObjectiveC(_:) ' - u'in conformance UIApplicationLaunchOptionsKey' + u"protocol witness for static _ObjectiveCBridgeable._" + u"unconditionallyBridgeFromObjectiveC(_:) " + u"in conformance UIApplicationLaunchOptionsKey" ) assert demangle_name(mangled) == simplified_expected def test_cpp_demangle(): - mangled = '_ZN6google8protobuf2io25CopyingInputStreamAdaptor4SkipEi' - expected = 'google::protobuf::io::CopyingInputStreamAdaptor::Skip(int)' + mangled = "_ZN6google8protobuf2io25CopyingInputStreamAdaptor4SkipEi" + expected = "google::protobuf::io::CopyingInputStreamAdaptor::Skip(int)" assert demangle_name(mangled) == expected def test_demangle_failure_underscore(): - mangled = '_some_name' - assert demangle_name(mangled) == '_some_name' + mangled = "_some_name" + assert demangle_name(mangled) == "_some_name" def test_demangle_failure_no_underscore(): - mangled = 'some_other_name' - assert demangle_name(mangled) == 'some_other_name' + mangled = "some_other_name" + assert demangle_name(mangled) == "some_other_name" diff --git a/py/tests/test_heuristics.py b/py/tests/test_heuristics.py index 8d0161ae7..100829aa7 100644 --- a/py/tests/test_heuristics.py +++ b/py/tests/test_heuristics.py @@ -2,6 +2,6 @@ def test_ip_reg(): - assert arch_get_ip_reg_name('armv7') == 'pc' - assert arch_get_ip_reg_name('x86') == 'eip' - assert arch_get_ip_reg_name('x86_64') == 'rip' + assert arch_get_ip_reg_name("armv7") == "pc" + assert arch_get_ip_reg_name("x86") == "eip" + assert arch_get_ip_reg_name("x86_64") == "rip" diff --git a/py/tests/test_minidump.py b/py/tests/test_minidump.py index 473e0c144..675efff4a 100644 --- a/py/tests/test_minidump.py +++ b/py/tests/test_minidump.py @@ -5,7 +5,7 @@ def test_macos_without_cfi(res_path): - path = os.path.join(res_path, 'minidump', 'crash_macos.dmp') + path = os.path.join(res_path, "minidump", "crash_macos.dmp") state = ProcessState.from_minidump(path) assert state.thread_count == 1 assert state.requesting_thread == 0 @@ -13,15 +13,15 @@ def test_macos_without_cfi(res_path): assert state.crashed == True assert state.crash_time == datetime(2017, 9, 13, 12, 21, 47) assert state.crash_address == 69 # memory address: *(0x45) = 0; - assert state.crash_reason == 'EXC_BAD_ACCESS / KERN_INVALID_ADDRESS' - assert state.assertion == '' + assert state.crash_reason == "EXC_BAD_ACCESS / KERN_INVALID_ADDRESS" + assert state.assertion == "" info = state.system_info - assert info.os_name == 'Mac OS X' - assert info.os_version == '10.12.6' - assert info.os_build == '16G29' - assert info.cpu_family == 'amd64' - assert info.cpu_info == 'family 6 model 70 stepping 1' + assert info.os_name == "Mac OS X" + assert info.os_version == "10.12.6" + assert info.os_build == "16G29" + assert info.cpu_family == "amd64" + assert info.cpu_info == "family 6 model 70 stepping 1" assert info.cpu_count == 8 thread = state.get_thread(0) @@ -29,24 +29,28 @@ def test_macos_without_cfi(res_path): assert thread.frame_count == 9 frame = thread.get_frame(1) - assert frame.trust == 'scan' + assert frame.trust == "scan" assert frame.instruction == 4329952133 assert frame.return_address == 4329952134 - assert frame.registers == {'rbp': '0x00007fff5daa37c8', - 'rip': '0x000000010215d386', - 'rsp': '0x00007fff5daa3600'} + assert frame.registers == { + "rbp": "0x00007fff5daa37c8", + "rip": "0x000000010215d386", + "rsp": "0x00007fff5daa3600", + } - mid = '3F58BC3DEABE3361B5FB52A6762985980' + mid = "3F58BC3DEABE3361B5FB52A6762985980" module = next(module for module in state.modules() if module.debug_id == mid) assert module.addr == 4329947136 assert module.size == 172032 assert module.code_id is None - assert module.code_file == '/Users/jauer/Coding/breakpad/examples/target/crash_macos' - assert module.debug_file == 'crash_macos' + assert ( + module.code_file == "/Users/jauer/Coding/breakpad/examples/target/crash_macos" + ) + assert module.debug_file == "crash_macos" def test_linux_without_cfi(res_path): - path = os.path.join(res_path, 'minidump', 'crash_linux.dmp') + path = os.path.join(res_path, "minidump", "crash_linux.dmp") state = ProcessState.from_minidump(path) assert state.thread_count == 1 assert state.requesting_thread == 0 @@ -54,15 +58,15 @@ def test_linux_without_cfi(res_path): assert state.crashed == True assert state.crash_time == datetime(2017, 9, 13, 12, 17, 20) assert state.crash_address == 0 # memory address: *(0x0) = 0; - assert state.crash_reason == 'SIGSEGV /0x00000000' - assert state.assertion == '' + assert state.crash_reason == "SIGSEGV /0x00000000" + assert state.assertion == "" info = state.system_info - assert info.os_name == 'Linux' - assert info.os_version == '4.9.46-moby' - assert info.os_build == '#1 SMP Thu Sep 7 02:53:42 UTC 2017' - assert info.cpu_family == 'amd64' - assert info.cpu_info == 'family 6 model 70 stepping 1' + assert info.os_name == "Linux" + assert info.os_version == "4.9.46-moby" + assert info.os_build == "#1 SMP Thu Sep 7 02:53:42 UTC 2017" + assert info.cpu_family == "amd64" + assert info.cpu_info == "family 6 model 70 stepping 1" assert info.cpu_count == 4 thread = state.get_thread(0) @@ -70,24 +74,26 @@ def test_linux_without_cfi(res_path): assert thread.frame_count == 18 frame = thread.get_frame(1) - assert frame.trust == 'scan' + assert frame.trust == "scan" assert frame.instruction == 4202617 assert frame.return_address == 4202618 - assert frame.registers == {'rbp': '0x00007ffea5979ce0', - 'rip': '0x000000000040207a', - 'rsp': '0x00007ffea5979b28'} + assert frame.registers == { + "rbp": "0x00007ffea5979ce0", + "rip": "0x000000000040207a", + "rsp": "0x00007ffea5979b28", + } - mid = 'D2554CDB926136C4B9766A086583B9B50' + mid = "D2554CDB926136C4B9766A086583B9B50" module = next(module for module in state.modules() if module.debug_id == mid) assert module.addr == 4194304 assert module.size == 196608 - assert module.code_id == 'db4c55d26192c436b9766a086583b9b5a6d2e271' - assert module.code_file == '/breakpad/examples/target/crash_linux' - assert module.debug_file == '/breakpad/examples/target/crash_linux' + assert module.code_id == "db4c55d26192c436b9766a086583b9b5a6d2e271" + assert module.code_file == "/breakpad/examples/target/crash_linux" + assert module.debug_file == "/breakpad/examples/target/crash_linux" def test_macos_with_cfi(res_path): - module_id = '3F58BC3DEABE3361B5FB52A6762985980' + module_id = "3F58BC3DEABE3361B5FB52A6762985980" cfi = FrameInfoMap.new() cfi_path = os.path.join(res_path, "minidump", "crash_macos.sym") @@ -101,15 +107,15 @@ def test_macos_with_cfi(res_path): assert state.crashed == True assert state.crash_time == datetime(2017, 9, 13, 12, 21, 47) assert state.crash_address == 69 # memory address: *(0x45) = 0; - assert state.crash_reason == 'EXC_BAD_ACCESS / KERN_INVALID_ADDRESS' - assert state.assertion == '' + assert state.crash_reason == "EXC_BAD_ACCESS / KERN_INVALID_ADDRESS" + assert state.assertion == "" info = state.system_info - assert info.os_name == 'Mac OS X' - assert info.os_version == '10.12.6' - assert info.os_build == '16G29' - assert info.cpu_family == 'amd64' - assert info.cpu_info == 'family 6 model 70 stepping 1' + assert info.os_name == "Mac OS X" + assert info.os_version == "10.12.6" + assert info.os_build == "16G29" + assert info.cpu_family == "amd64" + assert info.cpu_info == "family 6 model 70 stepping 1" assert info.cpu_count == 8 thread = state.get_thread(0) @@ -117,29 +123,32 @@ def test_macos_with_cfi(res_path): assert thread.frame_count == 9 frame = thread.get_frame(1) - assert frame.trust == 'cfi' + assert frame.trust == "cfi" assert frame.instruction == 4329952133 assert frame.return_address == 4329952134 - assert frame.registers == {'rip': '0x000000010215d386', - 'rsp': '0x00007fff5daa3600', - 'r15': '0x0000000000000000', - 'r14': '0x0000000000000000', - 'rbx': '0x0000000000000000', - 'r13': '0x0000000000000000', - 'r12': '0x0000000000000000', - 'rbp': '0x00007fff5daa37c8'} - - module = next(module for module in state.modules() - if module.debug_id == module_id) + assert frame.registers == { + "rip": "0x000000010215d386", + "rsp": "0x00007fff5daa3600", + "r15": "0x0000000000000000", + "r14": "0x0000000000000000", + "rbx": "0x0000000000000000", + "r13": "0x0000000000000000", + "r12": "0x0000000000000000", + "rbp": "0x00007fff5daa37c8", + } + + module = next(module for module in state.modules() if module.debug_id == module_id) assert module.addr == 4329947136 assert module.size == 172032 assert module.code_id is None - assert module.code_file == '/Users/jauer/Coding/breakpad/examples/target/crash_macos' - assert module.debug_file == 'crash_macos' + assert ( + module.code_file == "/Users/jauer/Coding/breakpad/examples/target/crash_macos" + ) + assert module.debug_file == "crash_macos" def test_linux_with_cfi(res_path): - module_id = 'D2554CDB926136C4B9766A086583B9B50' + module_id = "D2554CDB926136C4B9766A086583B9B50" cfi = FrameInfoMap.new() cfi_path = os.path.join(res_path, "minidump", "crash_linux.sym") @@ -153,15 +162,15 @@ def test_linux_with_cfi(res_path): assert state.crashed == True assert state.crash_time == datetime(2017, 9, 13, 12, 17, 20) assert state.crash_address == 0 # memory address: *(0x0) = 0; - assert state.crash_reason == 'SIGSEGV /0x00000000' - assert state.assertion == '' + assert state.crash_reason == "SIGSEGV /0x00000000" + assert state.assertion == "" info = state.system_info - assert info.os_name == 'Linux' - assert info.os_version == '4.9.46-moby' - assert info.os_build == '#1 SMP Thu Sep 7 02:53:42 UTC 2017' - assert info.cpu_family == 'amd64' - assert info.cpu_info == 'family 6 model 70 stepping 1' + assert info.os_name == "Linux" + assert info.os_version == "4.9.46-moby" + assert info.os_build == "#1 SMP Thu Sep 7 02:53:42 UTC 2017" + assert info.cpu_family == "amd64" + assert info.cpu_info == "family 6 model 70 stepping 1" assert info.cpu_count == 4 thread = state.get_thread(0) @@ -169,46 +178,47 @@ def test_linux_with_cfi(res_path): assert thread.frame_count == 5 frame = thread.get_frame(1) - assert frame.trust == 'cfi' + assert frame.trust == "cfi" assert frame.instruction == 4202617 assert frame.return_address == 4202618 - assert frame.registers == {'rip': '0x000000000040207a', - 'rsp': '0x00007ffea5979b28', - 'r15': '0x0000000000000000', - 'r14': '0x0000000000000000', - 'rbx': '0x0000000000000000', - 'r13': '0x00007ffea5979dc0', - 'r12': '0x0000000000401f10', - 'rbp': '0x00007ffea5979ce0'} - - module = next(module for module in state.modules() - if module.debug_id == module_id) + assert frame.registers == { + "rip": "0x000000000040207a", + "rsp": "0x00007ffea5979b28", + "r15": "0x0000000000000000", + "r14": "0x0000000000000000", + "rbx": "0x0000000000000000", + "r13": "0x00007ffea5979dc0", + "r12": "0x0000000000401f10", + "rbp": "0x00007ffea5979ce0", + } + + module = next(module for module in state.modules() if module.debug_id == module_id) assert module.addr == 4194304 assert module.size == 196608 - assert module.code_id == 'db4c55d26192c436b9766a086583b9b5a6d2e271' - assert module.code_file == '/breakpad/examples/target/crash_linux' - assert module.debug_file == '/breakpad/examples/target/crash_linux' + assert module.code_id == "db4c55d26192c436b9766a086583b9b5a6d2e271" + assert module.code_file == "/breakpad/examples/target/crash_linux" + assert module.debug_file == "/breakpad/examples/target/crash_linux" def test_macos_cficache(res_path): - binary_path = os.path.join(res_path, 'minidump', 'crash_macos') + binary_path = os.path.join(res_path, "minidump", "crash_macos") archive = Archive.open(binary_path) obj = archive.get_object(arch="x86_64") cache = obj.make_cficache() - sym_path = os.path.join(res_path, 'minidump', 'crash_macos.sym') + sym_path = os.path.join(res_path, "minidump", "crash_macos.sym") with cache.open_stream() as sym_cache: - with open(sym_path, mode='rb') as sym_file: + with open(sym_path, mode="rb") as sym_file: assert sym_cache.read() == sym_file.read() def test_linux_cficache(res_path): - binary_path = os.path.join(res_path, 'minidump', 'crash_linux') + binary_path = os.path.join(res_path, "minidump", "crash_linux") archive = Archive.open(binary_path) obj = archive.get_object(arch="x86_64") cache = obj.make_cficache() - sym_path = os.path.join(res_path, 'minidump', 'crash_linux.sym') + sym_path = os.path.join(res_path, "minidump", "crash_linux.sym") with cache.open_stream() as sym_cache: - with open(sym_path, mode='rb') as sym_file: + with open(sym_path, mode="rb") as sym_file: assert sym_cache.read() == sym_file.read() diff --git a/py/tests/test_proguard.py b/py/tests/test_proguard.py index ee6f8ae66..835dfe9ad 100644 --- a/py/tests/test_proguard.py +++ b/py/tests/test_proguard.py @@ -4,27 +4,35 @@ def test_basics(res_path): - with open(os.path.join(res_path, 'proguard.txt'), 'rb') as f: + with open(os.path.join(res_path, "proguard.txt"), "rb") as f: mapping = f.read() view = ProguardMappingView.from_bytes(mapping) assert view.has_line_info - assert view.uuid == uuid.UUID('5cd8e873-1127-5276-81b7-8ff25043ecfd') + assert view.uuid == uuid.UUID("5cd8e873-1127-5276-81b7-8ff25043ecfd") - assert view.lookup('android.support.constraint.ConstraintLayout$a') \ - == 'android.support.constraint.ConstraintLayout$LayoutParams' + assert ( + view.lookup("android.support.constraint.ConstraintLayout$a") + == "android.support.constraint.ConstraintLayout$LayoutParams" + ) - assert view.lookup('android.support.constraint.a.b:a', 116) \ - == 'android.support.constraint.solver.ArrayRow:createRowDefinition' + assert ( + view.lookup("android.support.constraint.a.b:a", 116) + == "android.support.constraint.solver.ArrayRow:createRowDefinition" + ) def test_mmap(res_path): - view = ProguardMappingView.open(os.path.join(res_path, 'proguard.txt')) + view = ProguardMappingView.open(os.path.join(res_path, "proguard.txt")) assert view.has_line_info - assert view.uuid == uuid.UUID('5cd8e873-1127-5276-81b7-8ff25043ecfd') + assert view.uuid == uuid.UUID("5cd8e873-1127-5276-81b7-8ff25043ecfd") - assert view.lookup('android.support.constraint.ConstraintLayout$a') \ - == 'android.support.constraint.ConstraintLayout$LayoutParams' + assert ( + view.lookup("android.support.constraint.ConstraintLayout$a") + == "android.support.constraint.ConstraintLayout$LayoutParams" + ) - assert view.lookup('android.support.constraint.a.b:a', 116) \ - == 'android.support.constraint.solver.ArrayRow:createRowDefinition' + assert ( + view.lookup("android.support.constraint.a.b:a", 116) + == "android.support.constraint.solver.ArrayRow:createRowDefinition" + ) diff --git a/py/tests/test_sourcemaps.py b/py/tests/test_sourcemaps.py index 1d51df7e1..a0aae04b6 100644 --- a/py/tests/test_sourcemaps.py +++ b/py/tests/test_sourcemaps.py @@ -43,8 +43,8 @@ def verify_token_search(index): def test_basics(get_sourceview, get_sourcemapview): - minified_source = get_sourceview('demo.min.js') - sourcemap = get_sourcemapview('demo.js.map') + minified_source = get_sourceview("demo.min.js") + sourcemap = get_sourcemapview("demo.js.map") locs = [ (0, 107, "e", "onFailure", 11, 10), @@ -69,52 +69,41 @@ def test_basics(get_sourceview, get_sourcemapview): sv = sourcemap.get_sourceview(0) assert sv is not None assert sv._shared - assert sv[0] == u'var makeAFailure = (function() {' - assert sv[1] == u' function testingStuff() {' + assert sv[0] == u"var makeAFailure = (function() {" + assert sv[1] == u" function testingStuff() {" assert len(sv) == 32 def test_load_index(get_sourceview, get_sourcemapview): - view = get_sourcemapview('indexed.sourcemap.js') - f1 = get_sourceview('file1.js') - f2 = get_sourceview('file2.js') - verify_index(view, { - 'file1.js': f1, - 'file2.js': f2, - }) + view = get_sourcemapview("indexed.sourcemap.js") + f1 = get_sourceview("file1.js") + f2 = get_sourceview("file2.js") + verify_index(view, {"file1.js": f1, "file2.js": f2,}) verify_token_search(view) def test_jquery(get_sourceview, get_sourcemapview): - source = get_sourceview('jquery.js') - index = get_sourcemapview('jquery.min.map') - verify_index(index, { - 'jquery.js': source - }) + source = get_sourceview("jquery.js") + index = get_sourcemapview("jquery.min.map") + verify_index(index, {"jquery.js": source}) def test_coolstuff(get_sourceview, get_sourcemapview): - source = get_sourceview('coolstuff.js') - index = get_sourcemapview('coolstuff.min.map') - verify_index(index, { - 'coolstuff.js': source - }) + source = get_sourceview("coolstuff.js") + index = get_sourcemapview("coolstuff.min.map") + verify_index(index, {"coolstuff.js": source}) def test_unicode_names(get_sourceview, get_sourcemapview): - source = get_sourceview('unicode.js') - index = get_sourcemapview('unicode.min.map') - verify_index(index, { - 'unicode.js': source - }) + source = get_sourceview("unicode.js") + index = get_sourcemapview("unicode.min.map") + verify_index(index, {"unicode.js": source}) def test_react_dom(get_sourceview, get_sourcemapview): - source = get_sourceview('react-dom.js') - index = get_sourcemapview('react-dom.min.map') - verify_index(index, { - 'react-dom.js': source - }) + source = get_sourceview("react-dom.js") + index = get_sourcemapview("react-dom.min.map") + verify_index(index, {"react-dom.js": source}) react_token = index.lookup(0, 319) assert react_token.dst_line == 0 @@ -122,19 +111,19 @@ def test_react_dom(get_sourceview, get_sourcemapview): assert react_token.src_line == 39 assert react_token.src_col == 12 assert react_token.src_id == 0 - assert react_token.src == 'react-dom.js' - assert react_token.name == 'React' + assert react_token.src == "react-dom.js" + assert react_token.name == "React" verify_token_search(index) def test_source_access(get_sourcemapview): - index = get_sourcemapview('react-dom-full.min.map') + index = get_sourcemapview("react-dom-full.min.map") assert index.get_sourceview(0) is not None assert index.get_sourceview(1) is None def test_wrong_rn_sourcemaps_android(get_sourceview, get_sourcemapview): - index = get_sourcemapview('android-release.bundle.map') + index = get_sourcemapview("android-release.bundle.map") # Users need to update their jsc version for android # https://github.com/react-community/jsc-android-buildscripts # then the correct col will be reported. @@ -147,17 +136,17 @@ def test_wrong_rn_sourcemaps_android(get_sourceview, get_sourcemapview): # To print source code of file # print(str(index.get_sourceview(308).get_source())) - assert inline.name == 'invalidFunction' + assert inline.name == "invalidFunction" assert inline.src_col == 72 - assert inline.src_line == 40 # + 1 + assert inline.src_line == 40 # + 1 - assert function.name == 'invalidFunction' + assert function.name == "invalidFunction" assert function.src_col == 9 - assert function.src_line == 34 # + 1 + assert function.src_line == 34 # + 1 def test_wrong_rn_sourcemaps_ios(get_sourceview, get_sourcemapview): - index = get_sourcemapview('ios-release.bundle.map') + index = get_sourcemapview("ios-release.bundle.map") inline = index.lookup(311, 765) # To print found token # import pprint; pprint.pprint(inline.__dict__) @@ -167,10 +156,10 @@ def test_wrong_rn_sourcemaps_ios(get_sourceview, get_sourcemapview): # To print source code of file # print(str(index.get_sourceview(311).get_source())) - assert inline.name == 'invalidFunction' + assert inline.name == "invalidFunction" assert inline.src_col == 72 - assert inline.src_line == 40 # + 1 + assert inline.src_line == 40 # + 1 - assert function.name == 'invalidFunction' + assert function.name == "invalidFunction" assert function.src_col == 9 - assert function.src_line == 34 # + 1 + assert function.src_line == 34 # + 1 diff --git a/py/tests/test_symcache.py b/py/tests/test_symcache.py index f352c82aa..e348202b8 100644 --- a/py/tests/test_symcache.py +++ b/py/tests/test_symcache.py @@ -5,14 +5,16 @@ def test_basic(res_path): path = os.path.join( - res_path, 'ext/1.4.1/release/dSYMs/F9C4433B-260E-32C9-B5BB-ED10D8D591C3.dSYM/Contents/Resources/DWARF/CrashLibiOS') + res_path, + "ext/1.4.1/release/dSYMs/F9C4433B-260E-32C9-B5BB-ED10D8D591C3.dSYM/Contents/Resources/DWARF/CrashLibiOS", + ) archive = Archive.open(path) - obj = archive.get_object(arch='armv7') + obj = archive.get_object(arch="armv7") symcache = obj.make_symcache() # Make sure our stream starts with the header stream = symcache.open_stream() - assert stream.read(4) == b'SYMC' + assert stream.read(4) == b"SYMC" # Make s symcache from the entire thing stream = symcache.open_stream() @@ -21,54 +23,61 @@ def test_basic(res_path): def test_symbolicate_electron_darwin_dsym(res_path): path = os.path.join( - res_path, 'electron/1.8.1/Electron/CB63147AC9DC308B8CA1EE92A5042E8E0/Electron.app.dSYM/Contents/Resources/DWARF/Electron') + res_path, + "electron/1.8.1/Electron/CB63147AC9DC308B8CA1EE92A5042E8E0/Electron.app.dSYM/Contents/Resources/DWARF/Electron", + ) archive = Archive.open(path) - obj = archive.get_object(arch='x86_64') + obj = archive.get_object(arch="x86_64") symcache = obj.make_symcache() # Make sure our stream starts with the header stream = symcache.open_stream() - assert stream.read(4) == b'SYMC' + assert stream.read(4) == b"SYMC" # Make s symcache from the entire thing stream = symcache.open_stream() cache = SymCache.from_bytes(stream.read()) # Verify a known symbol - symbol = cache.lookup(0x107bb9f25 - 0x107bb9000)[0] - assert symbol.symbol == 'main' - assert symbol.lang == 'cpp' + symbol = cache.lookup(0x107BB9F25 - 0x107BB9000)[0] + assert symbol.symbol == "main" + assert symbol.lang == "cpp" assert symbol.line == 186 - assert symbol.comp_dir == '/Users/electron/workspace/electron-osx-x64/out/R' - assert symbol.base_dir == '../../atom/app' - assert symbol.filename == 'atom_main.cc' + assert symbol.comp_dir == "/Users/electron/workspace/electron-osx-x64/out/R" + assert symbol.base_dir == "../../atom/app" + assert symbol.filename == "atom_main.cc" def test_symbolicate_electron_darwin_sym(res_path): path = os.path.join( - res_path, 'electron/1.8.1/Electron/CB63147AC9DC308B8CA1EE92A5042E8E0/Electron.sym') + res_path, + "electron/1.8.1/Electron/CB63147AC9DC308B8CA1EE92A5042E8E0/Electron.sym", + ) archive = Archive.open(path) - obj = archive.get_object(arch='x86_64') + obj = archive.get_object(arch="x86_64") symcache = obj.make_symcache() # Make sure our stream starts with the header stream = symcache.open_stream() - assert stream.read(4) == b'SYMC' + assert stream.read(4) == b"SYMC" # Make s symcache from the entire thing stream = symcache.open_stream() cache = SymCache.from_bytes(stream.read()) # Verify a known symbol - symbol = cache.lookup(0x107bb9f25 - 0x107bb9000)[0] - assert symbol.symbol == 'main' - assert symbol.lang == 'unknown' + symbol = cache.lookup(0x107BB9F25 - 0x107BB9000)[0] + assert symbol.symbol == "main" + assert symbol.lang == "unknown" assert symbol.line == 186 - assert symbol.base_dir == '/Users/electron/workspace/electron-osx-x64/out/R/../../atom/app' - assert symbol.filename == 'atom_main.cc' + assert ( + symbol.base_dir + == "/Users/electron/workspace/electron-osx-x64/out/R/../../atom/app" + ) + assert symbol.filename == "atom_main.cc" # "lang" and "comp_dir" are not available in .sym files def test_unicode_ignore_decode(): - sv = SourceView.from_bytes(u'fööbar'.encode('latin1')) - assert sv[0] == u'f\ufffd\ufffdbar' + sv = SourceView.from_bytes(u"fööbar".encode("latin1")) + assert sv[0] == u"f\ufffd\ufffdbar" diff --git a/py/tests/test_unreal.py b/py/tests/test_unreal.py index 84b09d717..571ef3f5d 100644 --- a/py/tests/test_unreal.py +++ b/py/tests/test_unreal.py @@ -2,9 +2,10 @@ from symbolic import Unreal4Crash + def test_unreal_crash_files(res_path): - path = os.path.join(res_path, 'unreal', 'unreal_crash') - with open(path, mode='rb') as crash_file: + path = os.path.join(res_path, "unreal", "unreal_crash") + with open(path, mode="rb") as crash_file: buffer = crash_file.read() unreal_crash = Unreal4Crash.from_bytes(buffer) files = list(unreal_crash.files()) @@ -24,24 +25,32 @@ def test_unreal_crash_files(res_path): assert stream.size == 410700 assert len(stream.read()) == 410700 + def test_unreal_crash_context(res_path): - path = os.path.join(res_path, 'unreal', 'unreal_crash') - with open(path, mode='rb') as crash_file: + path = os.path.join(res_path, "unreal", "unreal_crash") + with open(path, mode="rb") as crash_file: buffer = crash_file.read() unreal_crash = Unreal4Crash.from_bytes(buffer) context = unreal_crash.get_context() - assert context['runtime_properties']['crash_guid'] == "UE4CC-Windows-379993BB42BD8FBED67986857D8844B5_0000" + assert ( + context["runtime_properties"]["crash_guid"] + == "UE4CC-Windows-379993BB42BD8FBED67986857D8844B5_0000" + ) + def test_unreal_crash_logs(res_path): - path = os.path.join(res_path, 'unreal', 'unreal_crash') - with open(path, mode='rb') as crash_file: + path = os.path.join(res_path, "unreal", "unreal_crash") + with open(path, mode="rb") as crash_file: buffer = crash_file.read() unreal_crash = Unreal4Crash.from_bytes(buffer) logs = unreal_crash.get_logs() assert len(logs) == 100 - assert logs[0]['timestamp'] == "2018-10-29T16:56:37Z" - assert logs[0]['component'] == "LogD3D11RHI" - assert logs[0]['message'] == "Chosen D3D11 Adapter: 0" - assert logs[99]['timestamp'] == "2018-10-29T16:56:38Z" - assert logs[99]['component'] == "LogWindows" - assert logs[99]['message'] == "Windows GetLastError: The operation completed successfully. (0)" + assert logs[0]["timestamp"] == "2018-10-29T16:56:37Z" + assert logs[0]["component"] == "LogD3D11RHI" + assert logs[0]["message"] == "Chosen D3D11 Adapter: 0" + assert logs[99]["timestamp"] == "2018-10-29T16:56:38Z" + assert logs[99]["component"] == "LogWindows" + assert ( + logs[99]["message"] + == "Windows GetLastError: The operation completed successfully. (0)" + ) From 1210517126fe1750e08b3352ed855adf5dfe9df4 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Mon, 27 Jan 2020 09:42:58 +0100 Subject: [PATCH 018/107] fix(cabi): Remove invalid semicolon --- cabi/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabi/src/utils.rs b/cabi/src/utils.rs index f7878db41..9e79fd4e7 100644 --- a/cabi/src/utils.rs +++ b/cabi/src/utils.rs @@ -123,4 +123,4 @@ macro_rules! ffi_fn { $crate::utils::landingpad(|| { $body; Ok(0 as std::os::raw::c_int) }); } }; -}; +} From 859d23dd31794874b1d7d9ae0fa6f628216509b0 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Mon, 27 Jan 2020 17:14:59 +0100 Subject: [PATCH 019/107] fix(cabi): Consistently free strings obtained from the C-ABI (#180) --- .travis.yml | 13 ++++++++++--- Makefile | 8 +++++--- cabi/include/symbolic.h | 24 +++++++++++++++++++----- cabi/src/core.rs | 26 ++++++++++++++++---------- py/symbolic/common.py | 7 +++---- py/symbolic/debuginfo.py | 21 +++++++++++++-------- py/symbolic/demangle.py | 4 +++- py/symbolic/minidump.py | 26 +++++++++++++------------- py/symbolic/proguard.py | 12 ++++++------ py/symbolic/sourcemap.py | 20 +++++++++----------- py/symbolic/symcache.py | 16 +++++++++------- py/symbolic/unreal.py | 14 ++++++++------ py/symbolic/utils.py | 6 +++--- 13 files changed, 117 insertions(+), 80 deletions(-) diff --git a/.travis.yml b/.travis.yml index a535120c4..8749aa4e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,10 @@ matrix: include: # Rust test suite - os: linux - script: make style + script: make style-rust env: TEST=style-rust - os: linux - script: make lint + script: make lint-rust env: TEST=lint-rust CXX=clang - os: linux script: make test-rust @@ -31,6 +31,13 @@ matrix: env: TEST=mac-rust # Python test suite + - os: linux + language: python + python: "3.7" + script: + - make style-python + - make lint-python + env: TEST=style-python - os: linux script: make test-python env: TEST=linux-python CXX=clang @@ -40,7 +47,7 @@ matrix: # Build wheels - os: osx - script: make wheel + script: make wheel SYMBOLIC_PYTHON=python2 before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade node env: DEPLOY=mac-wheel osx_image: xcode7.3 diff --git a/Makefile b/Makefile index 524603955..80eb029f5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +SYMBOLIC_PYTHON := python3 + all: check test .PHONY: all @@ -56,7 +58,7 @@ style-rust: style-python: .venv/bin/python .venv/bin/pip install -U black - .venv/bin/black --check py + .venv/bin/black --check py --exclude 'symbolic/_lowlevel*|dist|build|\.eggs' # Linting @@ -86,7 +88,7 @@ format-rust: format-python: .venv/bin/python .venv/bin/pip install -U black - .venv/bin/black py + .venv/bin/black py --exclude 'symbolic/_lowlevel*|dist|build|\.eggs' .PHONY: format-python # Dependencies @@ -94,4 +96,4 @@ format-python: .venv/bin/python .venv/bin/python: Makefile @rm -rf .venv @which virtualenv || sudo easy_install virtualenv - virtualenv -p python3 .venv + virtualenv -p $(SYMBOLIC_PYTHON) .venv diff --git a/cabi/include/symbolic.h b/cabi/include/symbolic.h index d7f5da46c..347018ab5 100644 --- a/cabi/include/symbolic.h +++ b/cabi/include/symbolic.h @@ -142,11 +142,26 @@ typedef struct SymbolicUnreal4Crash SymbolicUnreal4Crash; typedef struct SymbolicUnreal4File SymbolicUnreal4File; /** - * CABI wrapper around a Rust string. + * A length-prefixed UTF-8 string. + * + * As opposed to C strings, this string is not null-terminated. If the string is owned, indicated + * by the `owned` flag, the owner must call the `free` function on this string. The convention is: + * + * - When obtained as instance through return values, always free the string. + * - When obtained as pointer through field access, never free the string. */ typedef struct { + /** + * Pointer to the UTF-8 encoded string data. + */ char *data; + /** + * The length of the string pointed to by `data`. + */ uintptr_t len; + /** + * Indicates that the string is owned and must be freed. + */ bool owned; } SymbolicStr; @@ -283,6 +298,9 @@ typedef struct { * CABI wrapper around a UUID. */ typedef struct { + /** + * UUID bytes in network byte order (big endian). + */ uint8_t data[16]; } SymbolicUuid; @@ -644,10 +662,6 @@ void symbolic_str_free(SymbolicStr *string); /** * Creates a symbolic string from a raw C string. - * - * This sets the string to owned. In case it's not owned you either have - * to make sure you are not freeing the memory or you need to set the - * owned flag to false. */ SymbolicStr symbolic_str_from_cstr(const char *string); diff --git a/cabi/src/core.rs b/cabi/src/core.rs index 9295fefbe..bc6e659ed 100644 --- a/cabi/src/core.rs +++ b/cabi/src/core.rs @@ -11,11 +11,20 @@ use uuid::Uuid; use crate::utils::{set_panic_hook, Panic, LAST_ERROR}; -/// CABI wrapper around a Rust string. +/// A length-prefixed UTF-8 string. +/// +/// As opposed to C strings, this string is not null-terminated. If the string is owned, indicated +/// by the `owned` flag, the owner must call the `free` function on this string. The convention is: +/// +/// - When obtained as instance through return values, always free the string. +/// - When obtained as pointer through field access, never free the string. #[repr(C)] pub struct SymbolicStr { + /// Pointer to the UTF-8 encoded string data. pub data: *mut c_char, + /// The length of the string pointed to by `data`. pub len: usize, + /// Indicates that the string is owned and must be freed. pub owned: bool, } @@ -62,8 +71,8 @@ impl SymbolicStr { } /// Returns the Rust string managed by a `SymbolicStr`. - pub fn as_str(&self) -> &str { - unsafe { str::from_utf8_unchecked(slice::from_raw_parts(self.data as *const _, self.len)) } + pub unsafe fn as_str(&self) -> &str { + str::from_utf8_unchecked(slice::from_raw_parts(self.data as *const _, self.len)) } } @@ -97,6 +106,7 @@ impl<'a> From> for SymbolicStr { /// CABI wrapper around a UUID. #[repr(C)] pub struct SymbolicUuid { + /// UUID bytes in network byte order (big endian). pub data: [u8; 16], } @@ -107,8 +117,8 @@ impl SymbolicUuid { } /// Returns the Rust UUID managed by a `SymbolicUUID`. - pub fn as_uuid(&self) -> &Uuid { - unsafe { &*(self as *const Self as *const Uuid) } + pub unsafe fn as_uuid(&self) -> &Uuid { + &*(self as *const Self as *const Uuid) } } @@ -452,16 +462,12 @@ pub unsafe extern "C" fn symbolic_err_clear() { ffi_fn! { /// Creates a symbolic string from a raw C string. - /// - /// This sets the string to owned. In case it's not owned you either have - /// to make sure you are not freeing the memory or you need to set the - /// owned flag to false. unsafe fn symbolic_str_from_cstr(string: *const c_char) -> Result { let s = CStr::from_ptr(string).to_str()?; Ok(SymbolicStr { data: s.as_ptr() as *mut _, len: s.len(), - owned: true, + owned: false, }) } } diff --git a/py/symbolic/common.py b/py/symbolic/common.py index ce4a86b97..8f4d41440 100644 --- a/py/symbolic/common.py +++ b/py/symbolic/common.py @@ -32,15 +32,14 @@ def normalize_arch(arch): raise ValueError("Invalid architecture: expected string") normalized = rustcall(lib.symbolic_normalize_arch, encode_str(arch)) - return decode_str(normalized) + return decode_str(normalized, free=True) def arch_get_ip_reg_name(arch): """Returns the ip register if known for this arch.""" try: - return str( - decode_str(rustcall(lib.symbolic_arch_ip_reg_name, encode_str(arch))) - ) + rv = rustcall(lib.symbolic_arch_ip_reg_name, encode_str(arch)) + return str(decode_str(rv, free=True)) except ignore_arch_exc: pass diff --git a/py/symbolic/debuginfo.py b/py/symbolic/debuginfo.py index ae9d267d1..f2cb09fb8 100644 --- a/py/symbolic/debuginfo.py +++ b/py/symbolic/debuginfo.py @@ -73,12 +73,14 @@ class Object(RustObject): def arch(self): """The architecture of the object.""" # make it an ascii bytestring on 2.x - return str(decode_str(self._methodcall(lib.symbolic_object_get_arch))) + arch = self._methodcall(lib.symbolic_object_get_arch) + return str(decode_str(arch, free=True)) @property def code_id(self): """The code identifier of the object. Returns None if there is no code id.""" - code_id = decode_str(self._methodcall(lib.symbolic_object_get_code_id)) + code_id = self._methodcall(lib.symbolic_object_get_code_id) + code_id = decode_str(code_id, free=True) if code_id: return code_id return None @@ -86,17 +88,20 @@ def code_id(self): @property def debug_id(self): """The debug identifier of the object.""" - return decode_str(self._methodcall(lib.symbolic_object_get_debug_id)) + debug_id = self._methodcall(lib.symbolic_object_get_debug_id) + return decode_str(debug_id, free=True) @property def kind(self): """The kind of the object (e.g. executable, debug file, library, ...).""" - return str(decode_str(self._methodcall(lib.symbolic_object_get_kind))) + kind = self._methodcall(lib.symbolic_object_get_kind) + return str(decode_str(kind, free=True)) @property def file_format(self): """The file format of the object file (e.g. MachO, ELF, ...).""" - return str(decode_str(self._methodcall(lib.symbolic_object_get_file_format))) + format = self._methodcall(lib.symbolic_object_get_file_format) + return str(decode_str(format, free=True)) @property def features(self): @@ -204,7 +209,7 @@ def id_from_breakpad(breakpad_id): s = encode_str(breakpad_id) id = rustcall(lib.symbolic_id_from_breakpad, s) - return decode_str(id) + return decode_str(id, free=True) def normalize_code_id(code_id): @@ -214,7 +219,7 @@ def normalize_code_id(code_id): s = encode_str(code_id) id = rustcall(lib.symbolic_normalize_code_id, s) - return decode_str(id) + return decode_str(id, free=True) def normalize_debug_id(debug_id): @@ -224,4 +229,4 @@ def normalize_debug_id(debug_id): s = encode_str(debug_id) id = rustcall(lib.symbolic_normalize_debug_id, s) - return decode_str(id) + return decode_str(id, free=True) diff --git a/py/symbolic/demangle.py b/py/symbolic/demangle.py index fdf69d1dd..9a4292a3d 100644 --- a/py/symbolic/demangle.py +++ b/py/symbolic/demangle.py @@ -9,4 +9,6 @@ def demangle_name(symbol, lang=None, no_args=False): """Demangles a symbol.""" func = lib.symbolic_demangle_no_args if no_args else lib.symbolic_demangle lang_str = encode_str(lang) if lang else ffi.NULL - return decode_str(rustcall(func, encode_str(symbol), lang_str), free=True) + + demangled = rustcall(func, encode_str(symbol), lang_str) + return decode_str(demangled, free=True) diff --git a/py/symbolic/minidump.py b/py/symbolic/minidump.py index b776ad0c7..83431eb27 100644 --- a/py/symbolic/minidump.py +++ b/py/symbolic/minidump.py @@ -54,22 +54,22 @@ class CodeModule(RustObject): @property def code_id(self): """Platform native identifier of the loaded module containing the instruction""" - return decode_str(self._objptr.code_id) or None + return decode_str(self._objptr.code_id, free=False) or None @property def code_file(self): """Path to the loaded module""" - return decode_str(self._objptr.code_file) or None + return decode_str(self._objptr.code_file, free=False) or None @property def debug_id(self): """Debug identifier of the loaded module containing the instruction""" - return decode_str(self._objptr.debug_id) or None + return decode_str(self._objptr.debug_id, free=False) or None @property def debug_file(self): """Name of the debug file associated to this module""" - return decode_str(self._objptr.debug_file) or None + return decode_str(self._objptr.debug_file, free=False) or None @property def addr(self): @@ -135,8 +135,8 @@ def registers(self): self._registers = {} for idx in range_type(self._objptr.register_count): register = self._objptr.registers[idx] - name = decode_str(register.name) - value = decode_str(register.value) + name = decode_str(register.name, free=False) + value = decode_str(register.value, free=False) self._registers[name] = value return self._registers @@ -184,7 +184,7 @@ def os_name(self): its value is unknown, this field will contain a numeric value. If the information is not present in the dump, this field will be empty. """ - return decode_str(self._objptr.os_name) + return decode_str(self._objptr.os_name, free=False) @property def os_version(self): @@ -192,14 +192,14 @@ def os_version(self): "5.1.2600" or "10.4.8". The version will be formatted as three- component semantic version. If the dump does not contain this information, this field will contain "0.0.0".""" - return decode_str(self._objptr.os_version) + return decode_str(self._objptr.os_version, free=False) @property def os_build(self): """A string identifying the build of the operating system, such as "Service Pack 2" or "8L2127". If the dump does not contain this information, this field will be empty.""" - return decode_str(self._objptr.os_build) + return decode_str(self._objptr.os_build, free=False) @property def cpu_family(self): @@ -208,7 +208,7 @@ def cpu_family(self): this field will contain a numeric value. If the information is not present in the dump, this field will be empty. The values stored in this field should match those used by MinidumpSystemInfo::GetCPU.""" - return decode_str(self._objptr.cpu_family) + return decode_str(self._objptr.cpu_family, free=False) @property def cpu_info(self): @@ -216,7 +216,7 @@ def cpu_info(self): "GenuineIntel level 6 model 13 stepping 8". If the information is not present in the dump, or additional identifying information is not defined for the CPU family, this field will be empty.""" - return decode_str(self._objptr.cpu_info) + return decode_str(self._objptr.cpu_info, free=False) @property def cpu_count(self): @@ -295,14 +295,14 @@ def crash_reason(self): specific. For example, "EXCEPTION_ACCESS_VIOLATION" (Windows), "EXC_BAD_ACCESS / KERN_INVALID_ADDRESS" (Mac OS X), "SIGSEGV" (other Unix).""" - return decode_str(self._objptr.crash_reason) + return decode_str(self._objptr.crash_reason, free=False) @property def assertion(self): """If there was an assertion that was hit, a textual representation of that assertion, possibly including the file and line at which it occurred.""" - return decode_str(self._objptr.assertion) + return decode_str(self._objptr.assertion, free=False) @property def system_info(self): diff --git a/py/symbolic/proguard.py b/py/symbolic/proguard.py index 6aa90ccda..92a185896 100644 --- a/py/symbolic/proguard.py +++ b/py/symbolic/proguard.py @@ -50,10 +50,10 @@ def lookup(self, dotted_path, lineno=None): """Given a dotted path and an optional line number this resolves to the original dotted path. """ - return decode_str( - self._methodcall( - lib.symbolic_proguardmappingview_convert_dotted_path, - encode_str(dotted_path), - lineno or 0, - ) + result = self._methodcall( + lib.symbolic_proguardmappingview_convert_dotted_path, + encode_str(dotted_path), + lineno or 0, ) + + return decode_str(result, free=True) diff --git a/py/symbolic/sourcemap.py b/py/symbolic/sourcemap.py index 01a58ca49..4524125ed 100644 --- a/py/symbolic/sourcemap.py +++ b/py/symbolic/sourcemap.py @@ -37,9 +37,9 @@ def _from_objptr(cls, tm): rv.dst_line = tm.dst_line rv.dst_col = tm.dst_col rv.src_id = tm.src_id - rv.name = decode_str(tm.name) or None - rv.src = decode_str(tm.src) or None - rv.function_name = decode_str(tm.function_name) or None + rv.name = decode_str(tm.name, free=False) or None + rv.src = decode_str(tm.src, free=False) or None + rv.function_name = decode_str(tm.function_name, free=False) or None return rv def __eq__(self, other): @@ -71,7 +71,8 @@ def from_bytes(cls, data): return rv def get_source(self): - return decode_str(self._methodcall(lib.symbolic_sourceview_as_str)) + source = self._methodcall(lib.symbolic_sourceview_as_str) + return decode_str(source, free=True) def __len__(self): return self._methodcall(lib.symbolic_sourceview_get_line_count) @@ -80,7 +81,8 @@ def __getitem__(self, idx): if not isinstance(idx, slice): if idx >= len(self): raise IndexError("No such line") - return decode_str(self._methodcall(lib.symbolic_sourceview_get_line, idx)) + line = self._methodcall(lib.symbolic_sourceview_get_line, idx) + return decode_str(line, free=True) rv = [] for idx in range_type(*idx.indices(len(self))): @@ -143,12 +145,8 @@ def source_count(self): def get_source_name(self, idx): """Returns the name of the source at the given index.""" - return ( - decode_str( - self._methodcall(lib.symbolic_sourcemapview_get_source_name, idx) - ) - or None - ) + name = self._methodcall(lib.symbolic_sourcemapview_get_source_name, idx) + return decode_str(name, free=True) or None def iter_sources(self): """Iterates over the sources in the file.""" diff --git a/py/symbolic/symcache.py b/py/symbolic/symcache.py index 0188c75d4..cf4416e49 100644 --- a/py/symbolic/symcache.py +++ b/py/symbolic/symcache.py @@ -108,13 +108,15 @@ def from_bytes(cls, data): @property def arch(self): """The architecture of the symcache.""" + arch = self._methodcall(lib.symbolic_symcache_get_arch) # make it an ascii bytestring on 2.x - return str(decode_str(self._methodcall(lib.symbolic_symcache_get_arch))) + return str(decode_str(arch, free=True)) @property def debug_id(self): """The debug identifier of the object.""" - return decode_str(self._methodcall(lib.symbolic_symcache_get_debug_id)) + id = self._methodcall(lib.symbolic_symcache_get_debug_id) + return decode_str(id, free=True) @property def has_line_info(self): @@ -160,11 +162,11 @@ def lookup(self, addr): line_addr=sym.line_addr, instr_addr=sym.instr_addr, line=sym.line, - lang=decode_str(sym.lang), - symbol=decode_str(sym.symbol), - filename=decode_str(sym.filename), - base_dir=decode_str(sym.base_dir), - comp_dir=decode_str(sym.comp_dir), + lang=decode_str(sym.lang, free=False), + symbol=decode_str(sym.symbol, free=False), + filename=decode_str(sym.filename, free=False), + base_dir=decode_str(sym.base_dir, free=False), + comp_dir=decode_str(sym.comp_dir, free=False), ) ) finally: diff --git a/py/symbolic/unreal.py b/py/symbolic/unreal.py index 9cf6735ea..ddd2f270f 100644 --- a/py/symbolic/unreal.py +++ b/py/symbolic/unreal.py @@ -29,12 +29,12 @@ def from_bytes(cls, buffer): return rv def get_context(self): - rv = json.loads(decode_str(self._methodcall(lib.symbolic_unreal4_get_context))) - return rv + context_json = self._methodcall(lib.symbolic_unreal4_get_context) + return json.loads(decode_str(context_json, free=True)) def get_logs(self): - rv = json.loads(decode_str(self._methodcall(lib.symbolic_unreal4_get_logs))) - return rv + logs_json = self._methodcall(lib.symbolic_unreal4_get_logs) + return json.loads(decode_str(logs_json, free=True)) @property def _file_count(self): @@ -61,12 +61,14 @@ class Unreal4CrashFile(RustObject): @property def name(self): """The file name.""" - return str(decode_str(self._methodcall(lib.symbolic_unreal4_file_name))) + name = self._methodcall(lib.symbolic_unreal4_file_name) + return str(decode_str(name, free=True)) @property def type(self): """The type of the file""" - return str(decode_str(self._methodcall(lib.symbolic_unreal4_file_type))) + ty = self._methodcall(lib.symbolic_unreal4_file_type) + return str(decode_str(ty, free=True)) def open_stream(self): """Returns a stream to read files from the internal buffer.""" diff --git a/py/symbolic/utils.py b/py/symbolic/utils.py index 4c2549906..1b45de7d3 100644 --- a/py/symbolic/utils.py +++ b/py/symbolic/utils.py @@ -85,8 +85,8 @@ def rustcall(func, *args): return rv msg = lib.symbolic_err_get_last_message() cls = exceptions_by_code.get(err, SymbolicError) - exc = cls(decode_str(msg)) - backtrace = decode_str(lib.symbolic_err_get_backtrace()) + exc = cls(decode_str(msg, free=True)) + backtrace = decode_str(lib.symbolic_err_get_backtrace(), free=True) if backtrace: exc.rust_info = backtrace raise exc @@ -99,7 +99,7 @@ def decode_str(s, free=False): return u"" return ffi.unpack(s.data, s.len).decode("utf-8", "replace") finally: - if free: + if free and s.owned: lib.symbolic_str_free(ffi.addressof(s)) From 131c42289281b79ed0cd7ddff29577ea2a9989b8 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Thu, 30 Jan 2020 10:26:34 +0100 Subject: [PATCH 020/107] build: Bump minimum macOS version to 10.13 (#181) --- .craft.yml | 6 ++++++ .travis.yml | 32 ++++++++++++++------------------ Makefile | 2 +- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.craft.yml b/.craft.yml index 32a0c6aec..5dba8c4cb 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,4 +1,5 @@ --- +minVersion: "0.9.0" github: owner: getsentry repo: symbolic @@ -8,3 +9,8 @@ targets: - name: pypi - name: github changelogPolicy: simple +requireNames: + - /^symbolic-.*-py2.py3-none-macosx_10_13_x86_64.whl$/ + - /^symbolic-.*-py2.py3-none-manylinux1_i686.whl$/ + - /^symbolic-.*-py2.py3-none-manylinux1_x86_64.whl$/ + - /^symbolic-.*.zip$/ diff --git a/.travis.yml b/.travis.yml index 8749aa4e6..d881db675 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: rust +os: linux + cache: directories: - $HOME/.cargo @@ -14,56 +16,50 @@ after_success: - npm install -g @zeus-ci/cli - test "$DEPLOY" && ( zeus upload -t "application/zip+wheel" py/dist/* || exit 1 ) -matrix: +jobs: include: # Rust test suite - - os: linux - script: make style-rust + - script: make style-rust env: TEST=style-rust - - os: linux - script: make lint-rust + - script: make lint-rust env: TEST=lint-rust CXX=clang - - os: linux - script: make test-rust + - script: make test-rust env: TEST=linux-rust CXX=clang - os: osx script: make test-rust env: TEST=mac-rust # Python test suite - - os: linux - language: python + - language: python python: "3.7" script: - make style-python - make lint-python env: TEST=style-python - - os: linux - script: make test-python + - script: make test-python env: TEST=linux-python CXX=clang - os: osx script: make test-python env: TEST=mac-python # Build wheels - - os: osx + - if: branch ~= /^release\/.+$/ + os: osx script: make wheel SYMBOLIC_PYTHON=python2 before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade node env: DEPLOY=mac-wheel - osx_image: xcode7.3 - - os: linux + osx_image: xcode9.4 + - if: branch ~= /^release\/.+$/ script: make wheel-manylinux IMAGE=quay.io/pypa/manylinux1_x86_64 env: DEPLOY=linux-x86_64-wheel - sudo: required services: - docker - - os: linux + - if: branch ~= /^release\/.+$/ script: make wheel-manylinux IMAGE=quay.io/pypa/manylinux1_i686 env: DEPLOY=linux-x86-wheel - sudo: required services: - docker - - os: linux + - if: branch ~= /^release\/.+$/ script: make sdist env: DEPLOY=sdist diff --git a/Makefile b/Makefile index 80eb029f5..e378c6cc0 100644 --- a/Makefile +++ b/Makefile @@ -95,5 +95,5 @@ format-python: .venv/bin/python .venv/bin/python: Makefile @rm -rf .venv - @which virtualenv || sudo easy_install virtualenv + @which virtualenv || sudo pip install virtualenv virtualenv -p $(SYMBOLIC_PYTHON) .venv From cfb7bf3cc2bb80646ec8f24f38e524f3f21b6536 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2020 16:20:13 +0000 Subject: [PATCH 021/107] build(deps): bump flate2 from 1.0.11 to 1.0.13 in /cabi (#184) --- cabi/Cargo.lock | 63 ++++++++++++++++++++++---------------------- debuginfo/Cargo.toml | 2 +- unreal/Cargo.toml | 2 +- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index e790cff3d..56dce9daa 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -49,7 +49,7 @@ name = "atty" version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -65,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -75,7 +75,7 @@ version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -135,7 +135,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bzip2-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -144,7 +144,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -166,7 +166,7 @@ name = "chrono" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", @@ -185,7 +185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -206,7 +206,7 @@ dependencies = [ "clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -316,12 +316,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "flate2" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -348,7 +349,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -418,7 +419,7 @@ name = "iovec" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -433,7 +434,7 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -449,7 +450,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.62" +version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -501,13 +502,13 @@ name = "memmap" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz_oxide" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -606,7 +607,7 @@ name = "num_cpus" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -641,7 +642,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -656,7 +657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -798,7 +799,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -853,7 +854,7 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -865,7 +866,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1160,7 +1161,7 @@ dependencies = [ "dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "gimli 0.19.0 (git+https://github.com/jan-auer/gimli?rev=bf8ea0f0079505681c360d3a55d0ac1e9b498df3)", "goblin 0.1.1 (git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1236,7 +1237,7 @@ dependencies = [ "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "elementtree 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1279,7 +1280,7 @@ name = "termios" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1295,7 +1296,7 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1410,7 +1411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1455,7 +1456,7 @@ dependencies = [ "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fallible-iterator 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eb7217124812dc5672b7476d0c2d20cfe9f7c0f1ba0904b674a9762a0212f72e" "checksum fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -"checksum flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "2adaffba6388640136149e18ed080b77a78611c1e1d6de75aedcdf78df5d4682" +"checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" @@ -1471,7 +1472,7 @@ dependencies = [ "checksum jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b1d42ef453b30b7387e113da1c83ab1605d90c5b4e0eb8e96d016ed3b8c160" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" +"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" "checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" @@ -1480,7 +1481,7 @@ dependencies = [ "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -"checksum miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7108aff85b876d06f22503dcce091e29f76733b2bfdd91eebce81f5e68203a10" +"checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" "checksum msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6584cf122f02fc0396420a116cd395a9a776ec4347dffe1c5119c3fcc917c060" "checksum new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40f005c60db6e03bae699e414c58bf9aa7ea02a2d0b9bfbcf19286cc4c82b30" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" diff --git a/debuginfo/Cargo.toml b/debuginfo/Cargo.toml index 6a624c824..af0831454 100644 --- a/debuginfo/Cargo.toml +++ b/debuginfo/Cargo.toml @@ -23,7 +23,7 @@ exclude = [ dmsort = "1.0.0" failure = "0.1.5" fallible-iterator = "0.2.0" -flate2 = { version = "1.0.9", features = ["rust_backend"], default-features = false } +flate2 = { version = "1.0.13", features = ["rust_backend"], default-features = false } gimli = { git = "https://github.com/jan-auer/gimli", rev = "bf8ea0f0079505681c360d3a55d0ac1e9b498df3", features = ["read", "std"], default-features = false } goblin = { git = "https://github.com/jan-auer/goblin", rev = "ee8b997792d37cfb35f8656c028543797425137e" } lazycell = "1.2.1" diff --git a/unreal/Cargo.toml b/unreal/Cargo.toml index f8fb736d8..ac05860a6 100644 --- a/unreal/Cargo.toml +++ b/unreal/Cargo.toml @@ -29,7 +29,7 @@ chrono = "0.4.7" elementtree = "0.5.0" failure = "0.1.5" lazy_static = "1.3.0" -flate2 = { version = "1.0.9", features = ["rust_backend"], default-features = false } +flate2 = { version = "1.0.13", features = ["rust_backend"], default-features = false } regex = "1.1.9" scroll = { version = "0.9.2", features = ["derive"] } serde = { version = "1.0.94", optional = true, features = ["derive"] } From f0e217b6b54867fe93c23fa6bced02030b357c34 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2020 17:00:07 +0000 Subject: [PATCH 022/107] build(deps): bump anylog from 0.4.0 to 0.5.0 in /cabi (#182) --- cabi/Cargo.lock | 218 +++++----------------------------------------- unreal/Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 198 deletions(-) diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index 56dce9daa..38cc50c1b 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -15,13 +15,12 @@ dependencies = [ [[package]] name = "anylog" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "insta 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -29,9 +28,9 @@ name = "apple-crash-report-parser" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -44,15 +43,6 @@ dependencies = [ "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "atty" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "autocfg" version = "0.1.6" @@ -163,32 +153,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ci_info" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "clicolors-control" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "cloudabi" version = "0.0.3" @@ -197,23 +170,6 @@ dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "console" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "cpp_demangle" version = "0.2.14" @@ -237,16 +193,11 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "digest" version = "0.8.1" @@ -260,11 +211,6 @@ name = "dmsort" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "dtoa" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "elementtree" version = "0.5.0" @@ -274,11 +220,6 @@ dependencies = [ "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "failure" version = "0.1.5" @@ -394,26 +335,6 @@ name = "if_chain" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "insta" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "ci_info 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "console 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)", - "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ron 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "iovec" version = "0.1.2" @@ -453,11 +374,6 @@ name = "libc" version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "linked-hash-map" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lock_api" version = "0.2.0" @@ -466,14 +382,6 @@ dependencies = [ "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "lock_api" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "log" version = "0.4.8" @@ -625,16 +533,6 @@ dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "parking_lot_core" version = "0.5.0" @@ -650,20 +548,6 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pdb" version = "0.5.0" @@ -773,7 +657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -904,13 +788,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -918,16 +802,6 @@ name = "regex-syntax" version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "ron" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rustc-demangle" version = "0.1.16" @@ -1029,17 +903,6 @@ dependencies = [ "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "serde_yaml" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", - "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sha-1" version = "0.8.1" @@ -1074,7 +937,7 @@ dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1170,7 +1033,7 @@ dependencies = [ "pdb 0.5.0 (git+https://github.com/jan-auer/pdb?rev=6518a17aff69ed26375cf3358632abbd32073931)", "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1196,7 +1059,7 @@ dependencies = [ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic-common 7.0.0", "symbolic-debuginfo 7.0.0", ] @@ -1232,14 +1095,14 @@ dependencies = [ name = "symbolic-unreal" version = "7.0.0" dependencies = [ - "anylog 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "elementtree 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1275,17 +1138,9 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "termios" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1327,11 +1182,6 @@ dependencies = [ "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "unicode-width" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "unicode-xid" version = "0.1.0" @@ -1357,7 +1207,6 @@ name = "uuid" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1396,14 +1245,6 @@ name = "xml-rs" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "yaml-rust" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "zip" version = "0.5.3" @@ -1419,10 +1260,9 @@ dependencies = [ [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" -"checksum anylog 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2fcf751df77bc8526b739628305302630756b4d9a1820b7cb87d1d7a2902d0a4" +"checksum anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b3677680d7f74e87066850ba07976ad03296b6ec4e17bddef05564438ffb86e" "checksum apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6985ceef9ba26133142d9e11448a797b885a4414886da48c98a1e2e44f4cf55" "checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" -"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" "checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" "checksum backtrace 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)" = "5180c5a20655b14a819b652fd2378fa5f1697b6c9ddad3e695c2f9cedf6df4e2" "checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" @@ -1437,20 +1277,14 @@ dependencies = [ "checksum bzip2-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6584aa36f5ad4c9247f5323b0a42f37802b37a836f0ad87084d7a33961abe25f" "checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" -"checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68" -"checksum ci_info 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e5e881307a989a3a5e20d52a32cc05950e3c2178cccfcc9428271a6cde09f902" -"checksum clicolors-control 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90082ee5dcdd64dc4e9e0d37fbf3ee325419e39c0092191e0393df65518f741e" +"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum console 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ca57c2c14b8a2bf3105bc9d15574aad80babf6a9c44b1058034cdf8bd169628" "checksum cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4115af6f575a7bc82c613e9e0ed7cc36a5e4fc3a8b54920dc0c820823a31a0d6" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum debugid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "751dad1347b163aa77262232129c7ac46e2810485c9b095ac9f7caf200e97df4" -"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc94b97c995cfd2f02fc3972ae0f385cd441b50bb7610b59c7c779d5aec7444" -"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" "checksum elementtree 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "19c5d32d0ab83734d2d7452047ef901c105991044b7b07da30fe82371a149a25" -"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" @@ -1466,16 +1300,13 @@ dependencies = [ "checksum goblin 0.1.1 (git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e)" = "" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" -"checksum insta 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc3ee8d49a583b9c4ecb1b50777b65eec0a568e49dddfac37109ef320175533" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b1d42ef453b30b7387e113da1c83ab1605d90c5b4e0eb8e96d016ed3b8c160" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" -"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" -"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" @@ -1495,9 +1326,7 @@ dependencies = [ "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" "checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" "checksum pdb 0.5.0 (git+https://github.com/jan-auer/pdb?rev=6518a17aff69ed26375cf3358632abbd32073931)" = "" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e4fb201c5c22a55d8b24fef95f78be52738e5e1361129be1b5e862ecdb6894a" @@ -1526,9 +1355,8 @@ dependencies = [ "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" +"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87" "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" -"checksum ron 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "17f52a24414403f81528b67488cf8edc4eda977d3af1646bb6b106a600ead78f" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" @@ -1542,7 +1370,6 @@ dependencies = [ "checksum serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)" = "f4473e8506b213730ff2061073b48fa51dcc66349219e2e7c5608f0296a1d95a" "checksum serde_derive 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)" = "11e410fde43e157d789fc290d26bc940778ad0fdd47836426fbac36573710dbb" "checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" -"checksum serde_yaml 0.8.9 (registry+https://github.com/rust-lang/crates.io-index)" = "38b08a9a90e5260fe01c6480ec7c811606df6d3a660415808c3c3fa8ed95b582" "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" @@ -1555,14 +1382,12 @@ dependencies = [ "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" -"checksum termios 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72b620c5ea021d75a735c943269bb07d30c9b77d6ac6b236bc8b5c496ef05625" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" "checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" @@ -1573,5 +1398,4 @@ dependencies = [ "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5" -"checksum yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" "checksum zip 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c21bb410afa2bd823a047f5bda3adb62f51074ac7e06263b2c97ecdd47e9fc6" diff --git a/unreal/Cargo.toml b/unreal/Cargo.toml index ac05860a6..ace0b51ec 100644 --- a/unreal/Cargo.toml +++ b/unreal/Cargo.toml @@ -23,7 +23,7 @@ exclude = [ with-serde = ["serde", "chrono/serde"] [dependencies] -anylog = "0.4.0" +anylog = "0.5.0" bytes = "0.4.12" chrono = "0.4.7" elementtree = "0.5.0" From 1247179b0dba44b3c0b743a0278ff0f352f6bb38 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2020 17:44:34 +0000 Subject: [PATCH 023/107] build(deps): bump num from 0.2.0 to 0.2.1 in /cabi (#183) --- cabi/Cargo.lock | 82 ++++++++++++++++++++++++--------------------- symcache/Cargo.toml | 2 +- 2 files changed, 45 insertions(+), 39 deletions(-) diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index 38cc50c1b..c8c6159a9 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -48,6 +48,11 @@ name = "autocfg" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "backtrace" version = "0.3.37" @@ -156,8 +161,8 @@ name = "chrono" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -442,72 +447,72 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-bigint" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-complex" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.41" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-iter" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-rational" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1086,7 +1091,7 @@ version = "7.0.0" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic-common 7.0.0", "symbolic-debuginfo 7.0.0", ] @@ -1264,6 +1269,7 @@ dependencies = [ "checksum apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6985ceef9ba26133142d9e11448a797b885a4414886da48c98a1e2e44f4cf55" "checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" "checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)" = "5180c5a20655b14a819b652fd2378fa5f1697b6c9ddad3e695c2f9cedf6df4e2" "checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" @@ -1316,13 +1322,13 @@ dependencies = [ "checksum msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6584cf122f02fc0396420a116cd395a9a776ec4347dffe1c5119c3fcc917c060" "checksum new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40f005c60db6e03bae699e414c58bf9aa7ea02a2d0b9bfbcf19286cc4c82b30" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" -"checksum num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf4825417e1e1406b3782a8ce92f4d53f26ec055e3622e1881ca8e9f5f9e08db" -"checksum num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f9c3f34cdd24f334cb265d9bf8bfa8a241920d026916785747a92f0e55541a1a" -"checksum num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fcb0cf31fb3ff77e6d2a6ebd6800df7fdcd106f2ad89113c9130bcd07f93dffc" -"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" -"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" -"checksum num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2885278d5fe2adc2f75ced642d52d879bffaceb5a2e0b1d4309ffdfb239b454" -"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" +"checksum num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +"checksum num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +"checksum num-complex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" +"checksum num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" diff --git a/symcache/Cargo.toml b/symcache/Cargo.toml index f20c80a4e..7a55bc391 100644 --- a/symcache/Cargo.toml +++ b/symcache/Cargo.toml @@ -22,7 +22,7 @@ exclude = [ [dependencies] failure = "0.1.5" fnv = "1.0.6" -num = "0.2.0" +num = "0.2.1" symbolic-common = { version = "7.0.0", path = "../common" } symbolic-debuginfo = { version = "7.0.0", path = "../debuginfo" } From 5c8de65b2d4eb3095f2aa0380b35aaed3a9e34ef Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Wed, 5 Feb 2020 17:22:37 +0100 Subject: [PATCH 024/107] feat: Support react-native hermes sourcemaps (#187) --- cabi/Cargo.lock | 6 +- sourcemap/Cargo.toml | 2 +- sourcemap/src/lib.rs | 90 ++++++++++++++++--- sourcemap/tests/fixtures/README.md | 5 ++ .../tests/fixtures/react-native-hermes.map | 1 + 5 files changed, 89 insertions(+), 15 deletions(-) create mode 100644 sourcemap/tests/fixtures/README.md create mode 100644 sourcemap/tests/fixtures/react-native-hermes.map diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index c8c6159a9..7326f1059 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -936,7 +936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "sourcemap" -version = "4.1.1" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1082,7 +1082,7 @@ name = "symbolic-sourcemap" version = "7.0.0" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sourcemap 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcemap 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1380,7 +1380,7 @@ dependencies = [ "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" -"checksum sourcemap 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c9d3a3f2a4d60c8702cc6f60bca874548d0e0dcae40af629c476e56e44fa7adb" +"checksum sourcemap 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8fd57aa9e5cea41b4a3c26a61039fad5585e2154ffe057a2656540a21b03a2d2" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423" "checksum string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eea1eee654ef80933142157fdad9dd8bc43cf7c74e999e369263496f04ff4da" diff --git a/sourcemap/Cargo.toml b/sourcemap/Cargo.toml index 2b5583141..169e206c6 100644 --- a/sourcemap/Cargo.toml +++ b/sourcemap/Cargo.toml @@ -17,4 +17,4 @@ edition = "2018" [dependencies] failure = "0.1.5" -sourcemap = "4.1.0" +sourcemap = "5.0.0" diff --git a/sourcemap/src/lib.rs b/sourcemap/src/lib.rs index 174ef9b56..c22b24a3f 100644 --- a/sourcemap/src/lib.rs +++ b/sourcemap/src/lib.rs @@ -4,6 +4,7 @@ use std::borrow::Cow; use std::fmt; +use std::ops::Deref; use failure::Fail; @@ -44,12 +45,29 @@ pub struct SourceView<'a> { sv: sourcemap::SourceView<'a>, } +enum SourceMapType { + Regular(sourcemap::SourceMap), + Hermes(sourcemap::SourceMapHermes), +} + +impl Deref for SourceMapType { + type Target = sourcemap::SourceMap; + + fn deref(&self) -> &Self::Target { + match self { + SourceMapType::Regular(sm) => sm, + SourceMapType::Hermes(smh) => smh, + } + } +} + /// Represents a source map. pub struct SourceMapView { - sm: sourcemap::SourceMap, + sm: SourceMapType, } /// A matched token. +#[derive(Debug, Default, PartialEq)] pub struct TokenMatch<'a> { /// The line number in the original source file. pub src_line: u32, @@ -116,8 +134,9 @@ impl SourceMapView { pub fn from_json_slice(buffer: &[u8]) -> Result { Ok(SourceMapView { sm: match sourcemap::decode_slice(buffer)? { - sourcemap::DecodedMap::Regular(sm) => sm, - sourcemap::DecodedMap::Index(smi) => smi.flatten()?, + sourcemap::DecodedMap::Regular(sm) => SourceMapType::Regular(sm), + sourcemap::DecodedMap::Index(smi) => SourceMapType::Regular(smi.flatten()?), + sourcemap::DecodedMap::Hermes(smh) => SourceMapType::Hermes(smh), }, }) } @@ -169,14 +188,26 @@ impl SourceMapView { minified_name: &str, source: &SourceView<'b>, ) -> Option> { - self.sm.lookup_token(line, col).map(|token| { - let mut rv = self.make_token_match(token); - rv.function_name = source - .sv - .get_original_function_name(token, minified_name) - .map(str::to_owned); - rv - }) + match &self.sm { + SourceMapType::Regular(sm) => sm.lookup_token(line, col).map(|token| { + let mut rv = self.make_token_match(token); + rv.function_name = source + .sv + .get_original_function_name(token, minified_name) + .map(str::to_owned); + rv + }), + SourceMapType::Hermes(smh) => { + // we use `col + 1` here, since hermes uses bytecode offsets which are 0-based, + // and the upstream python code does a `- 1` here: + // https://github.com/getsentry/sentry/blob/fdabccac7576c80674c2fed556d4c5407657dc4c/src/sentry/lang/javascript/processor.py#L584-L586 + smh.lookup_token(line, col + 1).map(|token| { + let mut rv = self.make_token_match(token); + rv.function_name = smh.get_original_function_name(col + 1).map(str::to_owned); + rv + }) + } + } } fn make_token_match<'a>(&'a self, tok: sourcemap::Token<'a>) -> TokenMatch<'a> { @@ -192,3 +223,40 @@ impl SourceMapView { } } } + +#[test] +fn test_react_native_hermes() { + let bytes = include_bytes!("../tests/fixtures/react-native-hermes.map"); + let smv = SourceMapView::from_json_slice(bytes).unwrap(); + let sv = SourceView::new(""); + + // at foo (address at unknown:1:11939) + assert_eq!( + smv.lookup_token_with_function_name(0, 11939, "", &sv), + Some(TokenMatch { + src_line: 1, + src_col: 10, + dst_line: 0, + dst_col: 11939, + src_id: 5, + name: None, + src: Some("module.js"), + function_name: Some("foo".into()) + }) + ); + + // at anonymous (address at unknown:1:11857) + assert_eq!( + smv.lookup_token_with_function_name(0, 11857, "", &sv), + Some(TokenMatch { + src_line: 2, + src_col: 0, + dst_line: 0, + dst_col: 11857, + src_id: 4, + name: None, + src: Some("input.js"), + function_name: Some("".into()) + }) + ); +} diff --git a/sourcemap/tests/fixtures/README.md b/sourcemap/tests/fixtures/README.md new file mode 100644 index 000000000..08409e12c --- /dev/null +++ b/sourcemap/tests/fixtures/README.md @@ -0,0 +1,5 @@ +## react-native-hermes.map + +This SourceMap is one generated by the `react-native` + `hermes` pipeline. +See the `rust-sourcemap` repo for instructions on how to generate it. +Additionally, it was processed by `sentry-cli`, which basically inlines all the `sourceContent`s. diff --git a/sourcemap/tests/fixtures/react-native-hermes.map b/sourcemap/tests/fixtures/react-native-hermes.map new file mode 100644 index 000000000..2bcee80e0 --- /dev/null +++ b/sourcemap/tests/fixtures/react-native-hermes.map @@ -0,0 +1 @@ +{"version":3,"sources":["node_modules/metro/src/lib/polyfills/require.js","node_modules/react-native/Libraries/polyfills/console.js","node_modules/react-native/Libraries/polyfills/error-guard.js","node_modules/react-native/Libraries/polyfills/Object.es7.js","input.js","module.js"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @polyfill\n *\n * @format\n */\n\"use strict\";\n/* eslint-disable no-bitwise */\n\nglobal.__r = metroRequire;\nglobal.__d = define;\nglobal.__c = clear;\nglobal.__registerSegment = registerSegment;\nvar modules = clear(); // Don't use a Symbol here, it would pull in an extra polyfill with all sorts of\n// additional stuff (e.g. Array.from).\n\nconst EMPTY = {};\nconst _ref = {},\n hasOwnProperty = _ref.hasOwnProperty;\n\nif (__DEV__) {\n global.$RefreshReg$ = () => {};\n\n global.$RefreshSig$ = () => type => type;\n}\n\nfunction clear() {\n modules = Object.create(null); // We return modules here so that we can assign an initial value to modules\n // when defining it. Otherwise, we would have to do \"let modules = null\",\n // which will force us to add \"nullthrows\" everywhere.\n\n return modules;\n}\n\nif (__DEV__) {\n var verboseNamesToModuleIds = Object.create(null);\n var initializingModuleIds = [];\n}\n\nfunction define(factory, moduleId, dependencyMap) {\n if (modules[moduleId] != null) {\n if (__DEV__) {\n // (We take `inverseDependencies` from `arguments` to avoid an unused\n // named parameter in `define` in production.\n const inverseDependencies = arguments[4]; // If the module has already been defined and the define method has been\n // called with inverseDependencies, we can hot reload it.\n\n if (inverseDependencies) {\n global.__accept(moduleId, factory, dependencyMap, inverseDependencies);\n }\n } // prevent repeated calls to `global.nativeRequire` to overwrite modules\n // that are already loaded\n\n return;\n }\n\n const mod = {\n dependencyMap,\n factory,\n hasError: false,\n importedAll: EMPTY,\n importedDefault: EMPTY,\n isInitialized: false,\n publicModule: {\n exports: {}\n }\n };\n modules[moduleId] = mod;\n\n if (__DEV__) {\n // HMR\n mod.hot = createHotReloadingObject(); // DEBUGGABLE MODULES NAMES\n // we take `verboseName` from `arguments` to avoid an unused named parameter\n // in `define` in production.\n\n const verboseName = arguments[3];\n\n if (verboseName) {\n mod.verboseName = verboseName;\n verboseNamesToModuleIds[verboseName] = moduleId;\n }\n }\n}\n\nfunction metroRequire(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = verboseNamesToModuleIds[verboseName];\n\n if (moduleId == null) {\n throw new Error(`Unknown named module: \"${verboseName}\"`);\n } else {\n console.warn(\n `Requiring module \"${verboseName}\" by name is only supported for ` +\n \"debugging purposes and will BREAK IN PRODUCTION!\"\n );\n }\n } //$FlowFixMe: at this point we know that moduleId is a number\n\n const moduleIdReallyIsNumber = moduleId;\n\n if (__DEV__) {\n const initializingIndex = initializingModuleIds.indexOf(\n moduleIdReallyIsNumber\n );\n\n if (initializingIndex !== -1) {\n const cycle = initializingModuleIds\n .slice(initializingIndex)\n .map(id => (modules[id] ? modules[id].verboseName : \"[unknown]\")); // We want to show A -> B -> A:\n\n cycle.push(cycle[0]);\n console.warn(\n `Require cycle: ${cycle.join(\" -> \")}\\n\\n` +\n \"Require cycles are allowed, but can result in uninitialized values. \" +\n \"Consider refactoring to remove the need for a cycle.\"\n );\n }\n }\n\n const module = modules[moduleIdReallyIsNumber];\n return module && module.isInitialized\n ? module.publicModule.exports\n : guardedLoadModule(moduleIdReallyIsNumber, module);\n}\n\nfunction metroImportDefault(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = verboseNamesToModuleIds[verboseName];\n } //$FlowFixMe: at this point we know that moduleId is a number\n\n const moduleIdReallyIsNumber = moduleId;\n\n if (\n modules[moduleIdReallyIsNumber] &&\n modules[moduleIdReallyIsNumber].importedDefault !== EMPTY\n ) {\n return modules[moduleIdReallyIsNumber].importedDefault;\n }\n\n const exports = metroRequire(moduleIdReallyIsNumber);\n const importedDefault =\n exports && exports.__esModule ? exports.default : exports; // $FlowFixMe The metroRequire call above will throw if modules[id] is null\n\n return (modules[moduleIdReallyIsNumber].importedDefault = importedDefault);\n}\n\nmetroRequire.importDefault = metroImportDefault;\n\nfunction metroImportAll(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = verboseNamesToModuleIds[verboseName];\n } //$FlowFixMe: at this point we know that moduleId is a number\n\n const moduleIdReallyIsNumber = moduleId;\n\n if (\n modules[moduleIdReallyIsNumber] &&\n modules[moduleIdReallyIsNumber].importedAll !== EMPTY\n ) {\n return modules[moduleIdReallyIsNumber].importedAll;\n }\n\n const exports = metroRequire(moduleIdReallyIsNumber);\n let importedAll;\n\n if (exports && exports.__esModule) {\n importedAll = exports;\n } else {\n importedAll = {}; // Refrain from using Object.assign, it has to work in ES3 environments.\n\n if (exports) {\n for (const key in exports) {\n if (hasOwnProperty.call(exports, key)) {\n importedAll[key] = exports[key];\n }\n }\n }\n\n importedAll.default = exports;\n } // $FlowFixMe The metroRequire call above will throw if modules[id] is null\n\n return (modules[moduleIdReallyIsNumber].importedAll = importedAll);\n}\n\nmetroRequire.importAll = metroImportAll;\nlet inGuard = false;\n\nfunction guardedLoadModule(moduleId, module) {\n if (!inGuard && global.ErrorUtils) {\n inGuard = true;\n let returnValue;\n\n try {\n returnValue = loadModuleImplementation(moduleId, module);\n } catch (e) {\n // TODO: (moti) T48204692 Type this use of ErrorUtils.\n global.ErrorUtils.reportFatalError(e);\n }\n\n inGuard = false;\n return returnValue;\n } else {\n return loadModuleImplementation(moduleId, module);\n }\n}\n\nconst ID_MASK_SHIFT = 16;\nconst LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT;\n\nfunction unpackModuleId(moduleId) {\n const segmentId = moduleId >>> ID_MASK_SHIFT;\n const localId = moduleId & LOCAL_ID_MASK;\n return {\n segmentId,\n localId\n };\n}\n\nmetroRequire.unpackModuleId = unpackModuleId;\n\nfunction packModuleId(value) {\n return (value.segmentId << ID_MASK_SHIFT) + value.localId;\n}\n\nmetroRequire.packModuleId = packModuleId;\nconst moduleDefinersBySegmentID = [];\n\nfunction registerSegment(segmentID, moduleDefiner) {\n moduleDefinersBySegmentID[segmentID] = moduleDefiner;\n}\n\nfunction loadModuleImplementation(moduleId, module) {\n if (!module && moduleDefinersBySegmentID.length > 0) {\n const _unpackModuleId = unpackModuleId(moduleId),\n segmentId = _unpackModuleId.segmentId,\n localId = _unpackModuleId.localId;\n\n const definer = moduleDefinersBySegmentID[segmentId];\n\n if (definer != null) {\n definer(localId);\n module = modules[moduleId];\n }\n }\n\n const nativeRequire = global.nativeRequire;\n\n if (!module && nativeRequire) {\n const _unpackModuleId2 = unpackModuleId(moduleId),\n segmentId = _unpackModuleId2.segmentId,\n localId = _unpackModuleId2.localId;\n\n nativeRequire(localId, segmentId);\n module = modules[moduleId];\n }\n\n if (!module) {\n throw unknownModuleError(moduleId);\n }\n\n if (module.hasError) {\n throw moduleThrewError(moduleId, module.error);\n } // `metroRequire` calls into the require polyfill itself are not analyzed and\n // replaced so that they use numeric module IDs.\n // The systrace module will expose itself on the metroRequire function so that\n // it can be used here.\n // TODO(t9759686) Scan polyfills for dependencies, too\n\n if (__DEV__) {\n var Systrace = metroRequire.Systrace,\n Refresh = metroRequire.Refresh;\n } // We must optimistically mark module as initialized before running the\n // factory to keep any require cycles inside the factory from causing an\n // infinite require loop.\n\n module.isInitialized = true;\n const _module = module,\n factory = _module.factory,\n dependencyMap = _module.dependencyMap;\n\n if (__DEV__) {\n initializingModuleIds.push(moduleId);\n }\n\n try {\n if (__DEV__) {\n // $FlowFixMe: we know that __DEV__ is const and `Systrace` exists\n Systrace.beginEvent(\"JS_require_\" + (module.verboseName || moduleId));\n }\n\n const moduleObject = module.publicModule;\n\n if (__DEV__) {\n moduleObject.hot = module.hot;\n var prevRefreshReg = global.$RefreshReg$;\n var prevRefreshSig = global.$RefreshSig$;\n\n if (Refresh != null) {\n const RefreshRuntime = Refresh;\n\n global.$RefreshReg$ = (type, id) => {\n RefreshRuntime.register(type, moduleId + \" \" + id);\n };\n\n global.$RefreshSig$ =\n RefreshRuntime.createSignatureFunctionForTransform;\n }\n }\n\n moduleObject.id = moduleId; // keep args in sync with with defineModuleCode in\n // metro/src/Resolver/index.js\n // and metro/src/ModuleGraph/worker.js\n\n factory(\n global,\n metroRequire,\n metroImportDefault,\n metroImportAll,\n moduleObject,\n moduleObject.exports,\n dependencyMap\n ); // avoid removing factory in DEV mode as it breaks HMR\n\n if (!__DEV__) {\n // $FlowFixMe: This is only sound because we never access `factory` again\n module.factory = undefined;\n module.dependencyMap = undefined;\n }\n\n if (__DEV__) {\n // $FlowFixMe: we know that __DEV__ is const and `Systrace` exists\n Systrace.endEvent();\n\n if (Refresh != null) {\n registerExportsForReactRefresh(Refresh, moduleObject.exports, moduleId);\n }\n }\n\n return moduleObject.exports;\n } catch (e) {\n module.hasError = true;\n module.error = e;\n module.isInitialized = false;\n module.publicModule.exports = undefined;\n throw e;\n } finally {\n if (__DEV__) {\n if (initializingModuleIds.pop() !== moduleId) {\n throw new Error(\n \"initializingModuleIds is corrupt; something is terribly wrong\"\n );\n }\n\n global.$RefreshReg$ = prevRefreshReg;\n global.$RefreshSig$ = prevRefreshSig;\n }\n }\n}\n\nfunction unknownModuleError(id) {\n let message = 'Requiring unknown module \"' + id + '\".';\n\n if (__DEV__) {\n message +=\n \" If you are sure the module exists, try restarting Metro. \" +\n \"You may also want to run `yarn` or `npm install`.\";\n }\n\n return Error(message);\n}\n\nfunction moduleThrewError(id, error) {\n const displayName = (__DEV__ && modules[id] && modules[id].verboseName) || id;\n return Error(\n 'Requiring module \"' + displayName + '\", which threw an exception: ' + error\n );\n}\n\nif (__DEV__) {\n metroRequire.Systrace = {\n beginEvent: () => {},\n endEvent: () => {}\n };\n\n metroRequire.getModules = () => {\n return modules;\n }; // HOT MODULE RELOADING\n\n var createHotReloadingObject = function() {\n const hot = {\n _acceptCallback: null,\n _disposeCallback: null,\n _didAccept: false,\n accept: callback => {\n hot._didAccept = true;\n hot._acceptCallback = callback;\n },\n dispose: callback => {\n hot._disposeCallback = callback;\n }\n };\n return hot;\n };\n\n let reactRefreshTimeout = null;\n\n const metroHotUpdateModule = function(\n id,\n factory,\n dependencyMap,\n inverseDependencies\n ) {\n const mod = modules[id];\n\n if (!mod) {\n if (factory) {\n // New modules are going to be handled by the define() method.\n return;\n }\n\n throw unknownModuleError(id);\n }\n\n if (!mod.hasError && !mod.isInitialized) {\n // The module hasn't actually been executed yet,\n // so we can always safely replace it.\n mod.factory = factory;\n mod.dependencyMap = dependencyMap;\n return;\n }\n\n const Refresh = metroRequire.Refresh;\n const pendingModuleIDs = [id];\n const updatedModuleIDs = [];\n const seenModuleIDs = new Set();\n const refreshBoundaryIDs = new Set(); // In this loop, we will traverse the dependency tree upwards from the\n // changed module. Updates \"bubble\" up to the closest accepted parent.\n //\n // If we reach the module root and nothing along the way accepted the update,\n // we know hot reload is going to fail. In that case we return false.\n //\n // The main purpose of this loop is to figure out whether it's safe to apply\n // a hot update. It is only safe when the update was accepted somewhere\n // along the way upwards for each of its parent dependency module chains.\n //\n // If we didn't have this check, we'd risk re-evaluating modules that\n // have side effects and lead to confusing and meaningless crashes.\n\n while (pendingModuleIDs.length > 0) {\n const pendingID = pendingModuleIDs.pop(); // Don't process twice if we have a cycle.\n\n if (seenModuleIDs.has(pendingID)) {\n continue;\n }\n\n seenModuleIDs.add(pendingID); // If the module accepts itself, no need to bubble.\n // We can stop worrying about this module chain and pick the next one.\n\n const pendingModule = modules[pendingID];\n\n if (pendingModule != null) {\n const pendingHot = pendingModule.hot;\n\n if (pendingHot == null) {\n throw new Error(\n \"[Refresh] Expected module.hot to always exist in DEV.\"\n );\n } // A module can be accepted manually from within itself.\n\n let canAccept = pendingHot._didAccept;\n\n if (!canAccept && Refresh != null) {\n // Or React Refresh may mark it accepted based on exports.\n const isBoundary = isReactRefreshBoundary(\n Refresh,\n pendingModule.publicModule.exports\n );\n\n if (isBoundary) {\n canAccept = true;\n refreshBoundaryIDs.add(pendingID);\n }\n }\n\n if (canAccept) {\n updatedModuleIDs.push(pendingID);\n continue;\n }\n } // If we bubble through the roof, there is no way to do a hot update.\n // Bail out altogether. This is the failure case.\n\n const parentIDs = inverseDependencies[pendingID];\n\n if (parentIDs.length === 0) {\n // Reload the app because the hot reload can't succeed.\n // This should work both on web and React Native.\n performFullRefresh();\n return;\n } // This module didn't accept but maybe all its parents did?\n // Put them all in the queue to run the same set of checks.\n\n updatedModuleIDs.push(pendingID);\n parentIDs.forEach(parentID => pendingModuleIDs.push(parentID));\n } // If we reached here, it is likely that hot reload will be successful.\n // Run the actual factories.\n\n seenModuleIDs.clear();\n\n for (let i = 0; i < updatedModuleIDs.length; i++) {\n // Don't process twice if we have a cycle.\n const updatedID = updatedModuleIDs[i];\n\n if (seenModuleIDs.has(updatedID)) {\n continue;\n }\n\n seenModuleIDs.add(updatedID);\n const mod = modules[updatedID];\n\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the updated module.\");\n }\n\n const prevExports = mod.publicModule.exports;\n const didError = runUpdatedModule(\n updatedID,\n updatedID === id ? factory : undefined,\n updatedID === id ? dependencyMap : undefined\n );\n const nextExports = mod.publicModule.exports;\n\n if (didError) {\n // The user was shown a redbox about module initialization.\n // There's nothing for us to do here until it's fixed.\n return;\n }\n\n if (refreshBoundaryIDs.has(updatedID)) {\n // Since we just executed the code for it, it's possible\n // that the new exports make it ineligible for being a boundary.\n const isNoLongerABoundary = !isReactRefreshBoundary(\n Refresh,\n nextExports\n ); // It can also become ineligible if its exports are incompatible\n // with the previous exports.\n // For example, if you add/remove/change exports, we'll want\n // to re-execute the importing modules, and force those components\n // to re-render. Similarly, if you convert a class component\n // to a function, we want to invalidate the boundary.\n\n const didInvalidate = shouldInvalidateReactRefreshBoundary(\n Refresh,\n prevExports,\n nextExports\n );\n\n if (isNoLongerABoundary || didInvalidate) {\n // We'll be conservative. The only case in which we won't do a full\n // reload is if all parent modules are also refresh boundaries.\n // In that case we'll add them to the current queue.\n const parentIDs = inverseDependencies[updatedID];\n\n if (parentIDs.length === 0) {\n // Looks like we bubbled to the root. Can't recover from that.\n performFullRefresh();\n return;\n } // Schedule all parent refresh boundaries to re-run in this loop.\n\n for (let j = 0; j < parentIDs.length; j++) {\n const parentID = parentIDs[j];\n const parentMod = modules[parentID];\n\n if (parentMod == null) {\n throw new Error(\"[Refresh] Expected to find parent module.\");\n }\n\n const canAcceptParent = isReactRefreshBoundary(\n Refresh,\n parentMod.publicModule.exports\n );\n\n if (canAcceptParent) {\n // All parents will have to re-run too.\n refreshBoundaryIDs.add(parentID);\n updatedModuleIDs.push(parentID);\n } else {\n performFullRefresh();\n return;\n }\n }\n }\n }\n }\n\n if (Refresh != null) {\n // Debounce a little in case there are multiple updates queued up.\n // This is also useful because __accept may be called multiple times.\n if (reactRefreshTimeout == null) {\n reactRefreshTimeout = setTimeout(() => {\n reactRefreshTimeout = null; // Update React components.\n\n Refresh.performReactRefresh();\n }, 30);\n }\n }\n };\n\n const runUpdatedModule = function(id, factory, dependencyMap) {\n const mod = modules[id];\n\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the module.\");\n }\n\n const hot = mod.hot;\n\n if (!hot) {\n throw new Error(\"[Refresh] Expected module.hot to always exist in DEV.\");\n }\n\n if (hot._disposeCallback) {\n try {\n hot._disposeCallback();\n } catch (error) {\n console.error(\n `Error while calling dispose handler for module ${id}: `,\n error\n );\n }\n }\n\n if (factory) {\n mod.factory = factory;\n }\n\n if (dependencyMap) {\n mod.dependencyMap = dependencyMap;\n }\n\n mod.hasError = false;\n mod.error = undefined;\n mod.importedAll = EMPTY;\n mod.importedDefault = EMPTY;\n mod.isInitialized = false;\n const prevExports = mod.publicModule.exports;\n mod.publicModule.exports = {};\n hot._didAccept = false;\n hot._acceptCallback = null;\n hot._disposeCallback = null;\n metroRequire(id);\n\n if (mod.hasError) {\n // This error has already been reported via a redbox.\n // We know it's likely a typo or some mistake that was just introduced.\n // Our goal now is to keep the rest of the application working so that by\n // the time user fixes the error, the app isn't completely destroyed\n // underneath the redbox. So we'll revert the module object to the last\n // successful export and stop propagating this update.\n mod.hasError = false;\n mod.isInitialized = true;\n mod.error = null;\n mod.publicModule.exports = prevExports; // We errored. Stop the update.\n\n return true;\n }\n\n if (hot._acceptCallback) {\n try {\n hot._acceptCallback();\n } catch (error) {\n console.error(\n `Error while calling accept handler for module ${id}: `,\n error\n );\n }\n } // No error.\n\n return false;\n };\n\n const performFullRefresh = () => {\n /* global window */\n if (\n typeof window !== \"undefined\" &&\n window.location != null &&\n typeof window.location.reload === \"function\"\n ) {\n window.location.reload();\n } else {\n // This is attached in setUpDeveloperTools.\n const Refresh = metroRequire.Refresh;\n\n if (Refresh != null) {\n Refresh.performFullRefresh();\n } else {\n console.warn(\"Could not reload the application after an edit.\");\n }\n }\n }; // Modules that only export components become React Refresh boundaries.\n\n var isReactRefreshBoundary = function(Refresh, moduleExports) {\n if (Refresh.isLikelyComponentType(moduleExports)) {\n return true;\n }\n\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n // Exit if we can't iterate over exports.\n return false;\n }\n\n let hasExports = false;\n let areAllExportsComponents = true;\n\n for (const key in moduleExports) {\n hasExports = true;\n\n if (key === \"__esModule\") {\n continue;\n }\n\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n\n if (desc && desc.get) {\n // Don't invoke getters as they may have side effects.\n return false;\n }\n\n const exportValue = moduleExports[key];\n\n if (!Refresh.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n\n return hasExports && areAllExportsComponents;\n };\n\n var shouldInvalidateReactRefreshBoundary = (\n Refresh,\n prevExports,\n nextExports\n ) => {\n const prevSignature = getRefreshBoundarySignature(Refresh, prevExports);\n const nextSignature = getRefreshBoundarySignature(Refresh, nextExports);\n\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n\n for (let i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n\n return false;\n }; // When this signature changes, it's unsafe to stop at this refresh boundary.\n\n var getRefreshBoundarySignature = (Refresh, moduleExports) => {\n const signature = [];\n signature.push(Refresh.getFamilyByType(moduleExports));\n\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return signature;\n }\n\n for (const key in moduleExports) {\n if (key === \"__esModule\") {\n continue;\n }\n\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n\n if (desc && desc.get) {\n continue;\n }\n\n const exportValue = moduleExports[key];\n signature.push(key);\n signature.push(Refresh.getFamilyByType(exportValue));\n }\n\n return signature;\n };\n\n var registerExportsForReactRefresh = (Refresh, moduleExports, moduleID) => {\n Refresh.register(moduleExports, moduleID + \" %exports%\");\n\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return;\n }\n\n for (const key in moduleExports) {\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n\n if (desc && desc.get) {\n // Don't invoke getters as they may have side effects.\n continue;\n }\n\n const exportValue = moduleExports[key];\n const typeID = moduleID + \" %exports% \" + key;\n Refresh.register(exportValue, typeID);\n }\n };\n\n global.__accept = metroHotUpdateModule;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @polyfill\n * @nolint\n * @format\n */\n\n/* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void, no-control-regex */\n\n/**\n * This pipes all of our console logging functions to native logging so that\n * JavaScript errors in required modules show up in Xcode via NSLog.\n */\nconst inspect = (function() {\n // Copyright Joyent, Inc. and other Node contributors.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a\n // copy of this software and associated documentation files (the\n // \"Software\"), to deal in the Software without restriction, including\n // without limitation the rights to use, copy, modify, merge, publish,\n // distribute, sublicense, and/or sell copies of the Software, and to permit\n // persons to whom the Software is furnished to do so, subject to the\n // following conditions:\n //\n // The above copyright notice and this permission notice shall be included\n // in all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n // USE OR OTHER DEALINGS IN THE SOFTWARE.\n //\n // https://github.com/joyent/node/blob/master/lib/util.js\n\n function inspect(obj, opts) {\n var ctx = {\n seen: [],\n formatValueCalls: 0,\n stylize: stylizeNoColor,\n };\n return formatValue(ctx, obj, opts.depth);\n }\n\n function stylizeNoColor(str, styleType) {\n return str;\n }\n\n function arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n }\n\n function formatValue(ctx, value, recurseTimes) {\n ctx.formatValueCalls++;\n if (ctx.formatValueCalls > 200) {\n return `[TOO BIG formatValueCalls ${\n ctx.formatValueCalls\n } exceeded limit of 200]`;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (\n isError(value) &&\n (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)\n ) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '',\n array = false,\n braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n key,\n array,\n );\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n }\n\n function formatPrimitive(ctx, value) {\n if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple =\n \"'\" +\n JSON.stringify(value)\n .replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') +\n \"'\";\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value)) return ctx.stylize('' + value, 'number');\n if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value)) return ctx.stylize('null', 'null');\n }\n\n function formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n }\n\n function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(\n formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n String(i),\n true,\n ),\n );\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(\n formatProperty(ctx, value, recurseTimes, visibleKeys, key, true),\n );\n }\n });\n return output;\n }\n\n function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || {value: value[key]};\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str\n .split('\\n')\n .map(function(line) {\n return ' ' + line;\n })\n .join('\\n')\n .substr(2);\n } else {\n str =\n '\\n' +\n str\n .split('\\n')\n .map(function(line) {\n return ' ' + line;\n })\n .join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n }\n\n function reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return (\n braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1]\n );\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n }\n\n // NOTE: These type checking functions intentionally don't use `instanceof`\n // because it is fragile and can be easily faked with `Object.create()`.\n function isArray(ar) {\n return Array.isArray(ar);\n }\n\n function isBoolean(arg) {\n return typeof arg === 'boolean';\n }\n\n function isNull(arg) {\n return arg === null;\n }\n\n function isNullOrUndefined(arg) {\n return arg == null;\n }\n\n function isNumber(arg) {\n return typeof arg === 'number';\n }\n\n function isString(arg) {\n return typeof arg === 'string';\n }\n\n function isSymbol(arg) {\n return typeof arg === 'symbol';\n }\n\n function isUndefined(arg) {\n return arg === void 0;\n }\n\n function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n }\n\n function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n }\n\n function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n }\n\n function isError(e) {\n return (\n isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error)\n );\n }\n\n function isFunction(arg) {\n return typeof arg === 'function';\n }\n\n function objectToString(o) {\n return Object.prototype.toString.call(o);\n }\n\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n return inspect;\n})();\n\nconst OBJECT_COLUMN_NAME = '(index)';\nconst LOG_LEVELS = {\n trace: 0,\n info: 1,\n warn: 2,\n error: 3,\n};\nconst INSPECTOR_LEVELS = [];\nINSPECTOR_LEVELS[LOG_LEVELS.trace] = 'debug';\nINSPECTOR_LEVELS[LOG_LEVELS.info] = 'log';\nINSPECTOR_LEVELS[LOG_LEVELS.warn] = 'warning';\nINSPECTOR_LEVELS[LOG_LEVELS.error] = 'error';\n\n// Strip the inner function in getNativeLogFunction(), if in dev also\n// strip method printing to originalConsole.\nconst INSPECTOR_FRAMES_TO_SKIP = __DEV__ ? 2 : 1;\n\nfunction getNativeLogFunction(level) {\n return function() {\n let str;\n if (arguments.length === 1 && typeof arguments[0] === 'string') {\n str = arguments[0];\n } else {\n str = Array.prototype.map\n .call(arguments, function(arg) {\n return inspect(arg, {depth: 10});\n })\n .join(', ');\n }\n\n let logLevel = level;\n if (str.slice(0, 9) === 'Warning: ' && logLevel >= LOG_LEVELS.error) {\n // React warnings use console.error so that a stack trace is shown,\n // but we don't (currently) want these to show a redbox\n // (Note: Logic duplicated in ExceptionsManager.js.)\n logLevel = LOG_LEVELS.warn;\n }\n if (global.__inspectorLog) {\n global.__inspectorLog(\n INSPECTOR_LEVELS[logLevel],\n str,\n [].slice.call(arguments),\n INSPECTOR_FRAMES_TO_SKIP,\n );\n }\n if (groupStack.length) {\n str = groupFormat('', str);\n }\n global.nativeLoggingHook(str, logLevel);\n };\n}\n\nfunction repeat(element, n) {\n return Array.apply(null, Array(n)).map(function() {\n return element;\n });\n}\n\nfunction consoleTablePolyfill(rows) {\n // convert object -> array\n if (!Array.isArray(rows)) {\n var data = rows;\n rows = [];\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n var row = data[key];\n row[OBJECT_COLUMN_NAME] = key;\n rows.push(row);\n }\n }\n }\n if (rows.length === 0) {\n global.nativeLoggingHook('', LOG_LEVELS.info);\n return;\n }\n\n var columns = Object.keys(rows[0]).sort();\n var stringRows = [];\n var columnWidths = [];\n\n // Convert each cell to a string. Also\n // figure out max cell width for each column\n columns.forEach(function(k, i) {\n columnWidths[i] = k.length;\n for (var j = 0; j < rows.length; j++) {\n var cellStr = (rows[j][k] || '?').toString();\n stringRows[j] = stringRows[j] || [];\n stringRows[j][i] = cellStr;\n columnWidths[i] = Math.max(columnWidths[i], cellStr.length);\n }\n });\n\n // Join all elements in the row into a single string with | separators\n // (appends extra spaces to each cell to make separators | aligned)\n function joinRow(row, space) {\n var cells = row.map(function(cell, i) {\n var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');\n return cell + extraSpaces;\n });\n space = space || ' ';\n return cells.join(space + '|' + space);\n }\n\n var separators = columnWidths.map(function(columnWidth) {\n return repeat('-', columnWidth).join('');\n });\n var separatorRow = joinRow(separators, '-');\n var header = joinRow(columns);\n var table = [header, separatorRow];\n\n for (var i = 0; i < rows.length; i++) {\n table.push(joinRow(stringRows[i]));\n }\n\n // Notice extra empty line at the beginning.\n // Native logging hook adds \"RCTLog >\" at the front of every\n // logged string, which would shift the header and screw up\n // the table\n global.nativeLoggingHook('\\n' + table.join('\\n'), LOG_LEVELS.info);\n}\n\nconst GROUP_PAD = '\\u2502'; // Box light vertical\nconst GROUP_OPEN = '\\u2510'; // Box light down+left\nconst GROUP_CLOSE = '\\u2518'; // Box light up+left\n\nconst groupStack = [];\n\nfunction groupFormat(prefix, msg) {\n // Insert group formatting before the console message\n return groupStack.join('') + prefix + ' ' + (msg || '');\n}\n\nfunction consoleGroupPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupCollapsedPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupEndPolyfill() {\n groupStack.pop();\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);\n}\n\nfunction consoleAssertPolyfill(expression, label) {\n if (!expression) {\n global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);\n }\n}\n\nif (global.nativeLoggingHook) {\n const originalConsole = global.console;\n // Preserve the original `console` as `originalConsole`\n if (__DEV__ && originalConsole) {\n const descriptor = Object.getOwnPropertyDescriptor(global, 'console');\n if (descriptor) {\n Object.defineProperty(global, 'originalConsole', descriptor);\n }\n }\n\n global.console = {\n error: getNativeLogFunction(LOG_LEVELS.error),\n info: getNativeLogFunction(LOG_LEVELS.info),\n log: getNativeLogFunction(LOG_LEVELS.info),\n warn: getNativeLogFunction(LOG_LEVELS.warn),\n trace: getNativeLogFunction(LOG_LEVELS.trace),\n debug: getNativeLogFunction(LOG_LEVELS.trace),\n table: consoleTablePolyfill,\n group: consoleGroupPolyfill,\n groupEnd: consoleGroupEndPolyfill,\n groupCollapsed: consoleGroupCollapsedPolyfill,\n assert: consoleAssertPolyfill,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n\n // If available, also call the original `console` method since that is\n // sometimes useful. Ex: on OS X, this will let you see rich output in\n // the Safari Web Inspector console.\n if (__DEV__ && originalConsole) {\n Object.keys(console).forEach(methodName => {\n const reactNativeMethod = console[methodName];\n if (originalConsole[methodName]) {\n console[methodName] = function() {\n // TODO(T43930203): remove this special case once originalConsole.assert properly checks\n // the condition\n if (methodName === 'assert') {\n if (!arguments[0]) {\n originalConsole.assert(...arguments);\n }\n } else {\n originalConsole[methodName](...arguments);\n }\n reactNativeMethod.apply(console, arguments);\n };\n }\n });\n\n // The following methods are not supported by this polyfill but\n // we still should pass them to original console if they are\n // supported by it.\n [\n 'clear',\n 'dir',\n 'dirxml',\n 'groupCollapsed',\n 'profile',\n 'profileEnd',\n ].forEach(methodName => {\n if (typeof originalConsole[methodName] === 'function') {\n console[methodName] = function() {\n originalConsole[methodName](...arguments);\n };\n }\n });\n }\n} else if (!global.console) {\n const log = global.print || function consoleLoggingStub() {};\n global.console = {\n error: log,\n info: log,\n log: log,\n warn: log,\n trace: log,\n debug: log,\n table: log,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n * @polyfill\n */\n\nlet _inGuard = 0;\n\ntype ErrorHandler = (error: mixed, isFatal: boolean) => void;\ntype Fn = (...Args) => Return;\n\n/**\n * This is the error handler that is called when we encounter an exception\n * when loading a module. This will report any errors encountered before\n * ExceptionsManager is configured.\n */\nlet _globalHandler: ErrorHandler = function onError(\n e: mixed,\n isFatal: boolean,\n) {\n throw e;\n};\n\n/**\n * The particular require runtime that we are using looks for a global\n * `ErrorUtils` object and if it exists, then it requires modules with the\n * error handler specified via ErrorUtils.setGlobalHandler by calling the\n * require function with applyWithGuard. Since the require module is loaded\n * before any of the modules, this ErrorUtils must be defined (and the handler\n * set) globally before requiring anything.\n */\nconst ErrorUtils = {\n setGlobalHandler(fun: ErrorHandler): void {\n _globalHandler = fun;\n },\n getGlobalHandler(): ErrorHandler {\n return _globalHandler;\n },\n reportError(error: mixed): void {\n _globalHandler && _globalHandler(error, false);\n },\n reportFatalError(error: mixed): void {\n // NOTE: This has an untyped call site in Metro.\n _globalHandler && _globalHandler(error, true);\n },\n applyWithGuard, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n // Unused, but some code synced from www sets it to null.\n unused_onError?: null,\n // Some callers pass a name here, which we ignore.\n unused_name?: ?string,\n ): ?TOut {\n try {\n _inGuard++;\n // $FlowFixMe: TODO T48204745 (1) apply(context, null) is fine. (2) array -> rest array should work\n return fun.apply(context, args);\n } catch (e) {\n ErrorUtils.reportError(e);\n } finally {\n _inGuard--;\n }\n return null;\n },\n applyWithGuardIfNeeded, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n ): ?TOut {\n if (ErrorUtils.inGuard()) {\n // $FlowFixMe: TODO T48204745 (1) apply(context, null) is fine. (2) array -> rest array should work\n return fun.apply(context, args);\n } else {\n ErrorUtils.applyWithGuard(fun, context, args);\n }\n return null;\n },\n inGuard(): boolean {\n return !!_inGuard;\n },\n guard, TOut>(\n fun: Fn,\n name?: ?string,\n context?: ?mixed,\n ): ?(...TArgs) => ?TOut {\n // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types\n // should be sufficient.\n if (typeof fun !== 'function') {\n console.warn('A function must be passed to ErrorUtils.guard, got ', fun);\n return null;\n }\n const guardName = name ?? fun.name ?? '';\n function guarded(...args: TArgs): ?TOut {\n return ErrorUtils.applyWithGuard(\n fun,\n context ?? this,\n args,\n null,\n guardName,\n );\n }\n\n return guarded;\n },\n};\n\nglobal.ErrorUtils = ErrorUtils;\n\nexport type ErrorUtilsT = typeof ErrorUtils;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @polyfill\n * @nolint\n */\n\n(function() {\n 'use strict';\n\n const hasOwnProperty = Object.prototype.hasOwnProperty;\n\n /**\n * Returns an array of the given object's own enumerable entries.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries\n */\n if (typeof Object.entries !== 'function') {\n Object.entries = function(object) {\n // `null` and `undefined` values are not allowed.\n if (object == null) {\n throw new TypeError('Object.entries called on non-object');\n }\n\n const entries = [];\n for (const key in object) {\n if (hasOwnProperty.call(object, key)) {\n entries.push([key, object[key]]);\n }\n }\n return entries;\n };\n }\n\n /**\n * Returns an array of the given object's own enumerable entries.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\n */\n if (typeof Object.values !== 'function') {\n Object.values = function(object) {\n // `null` and `undefined` values are not allowed.\n if (object == null) {\n throw new TypeError('Object.values called on non-object');\n }\n\n const values = [];\n for (const key in object) {\n if (hasOwnProperty.call(object, key)) {\n values.push(object[key]);\n }\n }\n return values;\n };\n }\n})();\n","import { foo } from \"./module.js\"\n\nfoo();\n","export function foo() {\n throw new Error(\"lets throw!\");\n}\n"],"names":["__DEV__","Object","metroRequire","metroImportDefault","metroImportAll","unpackModuleId","modules","EMPTY","createHotReloadingObject","verboseNamesToModuleIds","global","console","initializingModuleIds","module","guardedLoadModule","Error","exports","hasOwnProperty","inGuard","loadModuleImplementation","ID_MASK_SHIFT","moduleId","LOCAL_ID_MASK","value","moduleDefinersBySegmentID","unknownModuleError","RefreshRuntime","registerExportsForReactRefresh","moduleThrewError","hot","Set","pendingModuleIDs","isReactRefreshBoundary","performFullRefresh","runUpdatedModule","updatedID","shouldInvalidateReactRefreshBoundary","reactRefreshTimeout","setTimeout","Refresh","window","hasExports","getRefreshBoundarySignature","moduleID","LOG_LEVELS","Array","level","INSPECTOR_LEVELS","INSPECTOR_FRAMES_TO_SKIP","groupStack","groupFormat","inspect","element","OBJECT_COLUMN_NAME","rows","columnWidths","stringRows","space","repeat","cell","Math","msg","GROUP_OPEN","GROUP_PAD","GROUP_CLOSE","stylizeNoColor","formatValue","hash","formatPrimitive","arrayToHash","isError","isFunction","isRegExp","isDate","isArray","RegExp","Date","formatError","formatArray","reduceToSingleString","braces","formatProperty","ctx","recurseTimes","visibleKeys","array","isUndefined","isString","isNumber","isBoolean","isNull","JSON","String","output","name","base","numLinesEst","prev","arg","isObject","objectToString","e","originalConsole","methodName","reactNativeMethod","_globalHandler","_inGuard","ErrorUtils","fun","context","guardName","TypeError"],"mappings":"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","x_facebook_sources":[[{"names":["","global.$RefreshReg$","global.$RefreshSig$","","clear","define","metroRequire","initializingModuleIds.slice.map$argument_0","metroImportDefault","metroImportAll","guardedLoadModule","unpackModuleId","packModuleId","registerSegment","loadModuleImplementation","unknownModuleError","moduleThrewError","metroRequire.Systrace.beginEvent","metroRequire.Systrace.endEvent","metroRequire.getModules","createHotReloadingObject","hot.accept","hot.dispose","metroHotUpdateModule","parentIDs.forEach$argument_0","setTimeout$argument_0","runUpdatedModule","performFullRefresh","isReactRefreshBoundary","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","registerExportsForReactRefresh"],"mappings":"AAA;wBCyB,QD;wBEE,MC,YH;AIG;CJM;AKO;CL2C;AME;aCyB,2DD;CNe;AQE;CRoB;ASI;CTmC;AUK;CViB;AWK;CXO;AYI;CZE;AaK;CbE;AcE;8BbqE;SaE;CduD;AeE;CfU;AgBE;ChBK;gBiBI,QjB;ckBC,QlB;4BmBG;GnBE;iCoBE;cCK;ODG;eEC;OFE;GpBG;+BuBI;wBCgG,2CD;yCEgG;SFI;GvBG;2B0BE;G1BuE;6B2BE;G3BkB;+B4BE;G5BmC;6C6BE;G7BmB;oC8BE;G9B2B;uC+BE;G/BqB"}],[{"names":["","","inspect","stylizeNoColor","arrayToHash","array.forEach$argument_0","formatValue","keys.map$argument_0","formatPrimitive","formatError","formatArray","keys.forEach$argument_0","formatProperty","str.split.map$argument_0","reduceToSingleString","output.reduce$argument_0","isArray","isBoolean","isNull","isNullOrUndefined","isNumber","isString","isSymbol","isUndefined","isRegExp","isObject","isDate","isError","isFunction","objectToString","hasOwnProperty","getNativeLogFunction","Array.prototype.map.call$argument_1","repeat","Array.apply.map$argument_0","consoleTablePolyfill","columns.forEach$argument_0","joinRow","row.map$argument_0","columnWidths.map$argument_0","groupFormat","consoleGroupPolyfill","consoleGroupCollapsedPolyfill","consoleGroupEndPolyfill","consoleAssertPolyfill","Object.keys.forEach$argument_0","methodName","forEach$argument_0","consoleLoggingStub"],"mappings":"AAA;iBCiB;ECwB;GDO;EEE;GFE;EGE;kBCG;KDE;GHG;EKE;wBC6F;ODS;GLM;EOE;GPgB;EQE;GRE;ESE;iBCkB;KDM;GTE;EWE;mBC4B;eDE;qBCQ;iBDE;GX0B;EaE;+BCE;KDI;Gbc;EeI;GfE;EgBE;GhBE;EiBE;GjBE;EkBE;GlBE;EmBE;GnBE;EoBE;GpBE;EqBE;GrBE;EsBE;GtBE;EuBE;GvBE;EwBE;GxBE;EyBE;GzBE;E0BE;G1BK;E2BE;G3BE;E4BE;G5BE;E6BE;G7BE;CDG;A+BmB;S9BC;yB+BM;S/BE;G8BuB;C/BC;AiCE;yCCC;GDE;CjCC;AmCE;kBCwB;GDQ;EEI;wBCC;KDG;GFG;oCIE;GJE;CnCc;AwCQ;CxCG;AyCE;CzCG;A0CE;C1CG;A2CE;C3CG;A4CE;C5CI;iC6CmC;8BCG;SDW;K7CE;c+CY;8BDE;SCE;K/CE;8BgDG,gChD"}],[{"names":["","onError","ErrorUtils.setGlobalHandler","ErrorUtils.getGlobalHandler","ErrorUtils.reportError","ErrorUtils.reportFatalError","ErrorUtils.applyWithGuard","ErrorUtils.applyWithGuardIfNeeded","ErrorUtils.inGuard","ErrorUtils.guard","guarded"],"mappings":"AAA;mCCqB;CDK;EEW;GFE;EGC;GHE;EIC;GJE;EKC;GLG;EMC;GNmB;EOC;GPY;EQC;GRE;ESC;ICY;KDQ;GTG"}],[{"names":["","","entries","values"],"mappings":"AAA;CCW;qBCU;KDa;oBEQ;KFa;CDE"}],[{"names":[""],"mappings":"AAA"}],[{"names":["","foo"],"mappings":"AAA,OC;CDE"}]]} \ No newline at end of file From 4d26d54a6f352937302f23ae1234df4cfcfa8cc3 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Thu, 6 Feb 2020 10:07:08 +0100 Subject: [PATCH 025/107] meta: Changelog for 7.1.0 --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c2ad03b6..5fbd428d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,30 @@ # Changelog +## 7.1.0 + +_This release is not available on crates.io_ + +**Features**: + +- Support skipping over files when creating source bundles (#167) +- Support for React Native Hermes source maps (#187) + +**Bug Fixes**: + +- Resolved an error in processing DWARF CFI +- Resolved an error reading ELF fiels with stripped `PT_DYNAMIC` header +- Support for Breakpad functions without names +- Multiple fixes in PDB and PE file processing +- Fix compilation with MSVC (#164) +- Added unmapped MachO object types (#169) +- Proper detection for ELF stripped debug companion files (#170) +- Detect Java class files which share the same magic as MachO files (#172) +- Fix memory leaks in the python binding (#180) + ## 7.0.0 +_This release is not available on crates.io_ + **New Features**: - A new API to parse Unreal Engine 4 Crash reports (#152). From 89a0b9507bab92887afae1ff48ce16ea2de0c9f3 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Thu, 6 Feb 2020 10:08:47 +0100 Subject: [PATCH 026/107] release: 7.1.0 --- Cargo.toml | 18 +++++++-------- cabi/Cargo.lock | 52 ++++++++++++++++++++++---------------------- cabi/Cargo.toml | 4 ++-- common/Cargo.toml | 2 +- debuginfo/Cargo.toml | 4 ++-- demangle/Cargo.toml | 4 ++-- minidump/Cargo.toml | 6 ++--- proguard/Cargo.toml | 4 ++-- sourcemap/Cargo.toml | 2 +- symcache/Cargo.toml | 6 ++--- unreal/Cargo.toml | 2 +- 11 files changed, 52 insertions(+), 52 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 782efc767..498466a14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -45,14 +45,14 @@ unreal = ["symbolic-unreal"] unreal-serde = ["unreal", "common-serde", "symbolic-unreal/with-serde"] [dependencies] -symbolic-common = { version = "7.0.0", path = "common" } -symbolic-debuginfo = { version = "7.0.0", path = "debuginfo", optional = true } -symbolic-demangle = { version = "7.0.0", path = "demangle", optional = true } -symbolic-minidump = { version = "7.0.0", path = "minidump", optional = true } -symbolic-proguard = { version = "7.0.0", path = "proguard", optional = true } -symbolic-sourcemap = { version = "7.0.0", path = "sourcemap", optional = true } -symbolic-symcache = { version = "7.0.0", path = "symcache", optional = true } -symbolic-unreal = { version = "7.0.0", path = "unreal", optional = true } +symbolic-common = { version = "7.1.0", path = "common" } +symbolic-debuginfo = { version = "7.1.0", path = "debuginfo", optional = true } +symbolic-demangle = { version = "7.1.0", path = "demangle", optional = true } +symbolic-minidump = { version = "7.1.0", path = "minidump", optional = true } +symbolic-proguard = { version = "7.1.0", path = "proguard", optional = true } +symbolic-sourcemap = { version = "7.1.0", path = "sourcemap", optional = true } +symbolic-symcache = { version = "7.1.0", path = "symcache", optional = true } +symbolic-unreal = { version = "7.1.0", path = "unreal", optional = true } [dev-dependencies] clap = "2.33.0" diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index 7326f1059..feb3fcc4b 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -987,32 +987,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "symbolic" -version = "7.0.0" +version = "7.1.0" dependencies = [ - "symbolic-common 7.0.0", - "symbolic-debuginfo 7.0.0", - "symbolic-demangle 7.0.0", - "symbolic-minidump 7.0.0", - "symbolic-proguard 7.0.0", - "symbolic-sourcemap 7.0.0", - "symbolic-symcache 7.0.0", - "symbolic-unreal 7.0.0", + "symbolic-common 7.1.0", + "symbolic-debuginfo 7.1.0", + "symbolic-demangle 7.1.0", + "symbolic-minidump 7.1.0", + "symbolic-proguard 7.1.0", + "symbolic-sourcemap 7.1.0", + "symbolic-symcache 7.1.0", + "symbolic-unreal 7.1.0", ] [[package]] name = "symbolic-cabi" -version = "7.0.0" +version = "7.1.0" dependencies = [ "apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic 7.0.0", + "symbolic 7.1.0", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "symbolic-common" -version = "7.0.0" +version = "7.1.0" dependencies = [ "debugid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1024,7 +1024,7 @@ dependencies = [ [[package]] name = "symbolic-debuginfo" -version = "7.0.0" +version = "7.1.0" dependencies = [ "dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1042,44 +1042,44 @@ dependencies = [ "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.0.0", + "symbolic-common 7.1.0", "zip 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "symbolic-demangle" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.0.0", + "symbolic-common 7.1.0", ] [[package]] name = "symbolic-minidump" -version = "7.0.0" +version = "7.1.0" dependencies = [ "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.0.0", - "symbolic-debuginfo 7.0.0", + "symbolic-common 7.1.0", + "symbolic-debuginfo 7.1.0", ] [[package]] name = "symbolic-proguard" -version = "7.0.0" +version = "7.1.0" dependencies = [ "proguard 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.0.0", + "symbolic-common 7.1.0", ] [[package]] name = "symbolic-sourcemap" -version = "7.0.0" +version = "7.1.0" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "sourcemap 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1087,18 +1087,18 @@ dependencies = [ [[package]] name = "symbolic-symcache" -version = "7.0.0" +version = "7.1.0" dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.0.0", - "symbolic-debuginfo 7.0.0", + "symbolic-common 7.1.0", + "symbolic-debuginfo 7.1.0", ] [[package]] name = "symbolic-unreal" -version = "7.0.0" +version = "7.1.0" dependencies = [ "anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/cabi/Cargo.toml b/cabi/Cargo.toml index 38a00e7dd..b70044783 100644 --- a/cabi/Cargo.toml +++ b/cabi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-cabi" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -30,4 +30,4 @@ serde_json = "1.0.40" uuid = "0.7.4" failure = "0.1.5" apple-crash-report-parser = { version = "0.3.1", features = ["with_serde"] } -symbolic = { version = "7.0.0", path = "..", features = ["debuginfo", "demangle", "minidump", "proguard", "sourcemap", "symcache", "unreal-serde"] } +symbolic = { version = "7.1.0", path = "..", features = ["debuginfo", "demangle", "minidump", "proguard", "sourcemap", "symcache", "unreal-serde"] } diff --git a/common/Cargo.toml b/common/Cargo.toml index 7ac54e2a9..9f99fd677 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-common" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", diff --git a/debuginfo/Cargo.toml b/debuginfo/Cargo.toml index af0831454..c7ce88c18 100644 --- a/debuginfo/Cargo.toml +++ b/debuginfo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-debuginfo" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -36,7 +36,7 @@ regex = "1.1.9" serde = { version = "1.0.94", features = ["derive"] } serde_json = "1.0.40" smallvec = "0.6.10" -symbolic-common = { version = "7.0.0", path = "../common" } +symbolic-common = { version = "7.1.0", path = "../common" } zip = "0.5.2" [dev-dependencies] diff --git a/demangle/Cargo.toml b/demangle/Cargo.toml index 6558f54f3..196fde6d9 100644 --- a/demangle/Cargo.toml +++ b/demangle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-demangle" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -23,7 +23,7 @@ exclude = [ cpp_demangle = "0.2.14" msvc-demangler = "0.8.0" rustc-demangle = "0.1.15" -symbolic-common = { version = "7.0.0", path = "../common" } +symbolic-common = { version = "7.1.0", path = "../common" } [build-dependencies] cc = "1.0.37" diff --git a/minidump/Cargo.toml b/minidump/Cargo.toml index f279b529e..c8aec4b35 100644 --- a/minidump/Cargo.toml +++ b/minidump/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-minidump" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -31,8 +31,8 @@ failure = "0.1.5" lazy_static = "1.3.0" regex = "1.1.9" serde = { version = "1.0.94", optional = true } -symbolic-common = { version = "7.0.0", path = "../common" } -symbolic-debuginfo = { version = "7.0.0", path = "../debuginfo" } +symbolic-common = { version = "7.1.0", path = "../common" } +symbolic-debuginfo = { version = "7.1.0", path = "../debuginfo" } [build-dependencies] cc = { version = "1.0.37", features = ["parallel"] } diff --git a/proguard/Cargo.toml b/proguard/Cargo.toml index 6c193241b..6d9ce1193 100644 --- a/proguard/Cargo.toml +++ b/proguard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-proguard" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -18,4 +18,4 @@ edition = "2018" [dependencies] proguard = "2.0.0" -symbolic-common = { version = "7.0.0", path = "../common" } +symbolic-common = { version = "7.1.0", path = "../common" } diff --git a/sourcemap/Cargo.toml b/sourcemap/Cargo.toml index 169e206c6..376f441bc 100644 --- a/sourcemap/Cargo.toml +++ b/sourcemap/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-sourcemap" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", diff --git a/symcache/Cargo.toml b/symcache/Cargo.toml index 7a55bc391..bf34ab2dc 100644 --- a/symcache/Cargo.toml +++ b/symcache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-symcache" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -23,8 +23,8 @@ exclude = [ failure = "0.1.5" fnv = "1.0.6" num = "0.2.1" -symbolic-common = { version = "7.0.0", path = "../common" } -symbolic-debuginfo = { version = "7.0.0", path = "../debuginfo" } +symbolic-common = { version = "7.1.0", path = "../common" } +symbolic-debuginfo = { version = "7.1.0", path = "../debuginfo" } [dev-dependencies] insta = "0.8.1" diff --git a/unreal/Cargo.toml b/unreal/Cargo.toml index ace0b51ec..4df17bb05 100644 --- a/unreal/Cargo.toml +++ b/unreal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-unreal" -version = "7.0.0" +version = "7.1.0" license = "MIT" authors = [ "Armin Ronacher ", From d4e335cb4e8d178b9578a428b2221a6577d267c5 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Fri, 7 Feb 2020 11:32:28 +0100 Subject: [PATCH 027/107] meta(craft): Disable crates releases --- .craft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.craft.yml b/.craft.yml index 5dba8c4cb..54b531f98 100644 --- a/.craft.yml +++ b/.craft.yml @@ -5,7 +5,7 @@ github: repo: symbolic preReleaseCommand: bash scripts/bump-version targets: - - name: crates + # - name: crates - name: pypi - name: github changelogPolicy: simple From 42c36c26bd5974ffa551251d37769d060374b21c Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Wed, 19 Feb 2020 10:01:54 +0100 Subject: [PATCH 028/107] fix: Using Hermes SourceMaps with non-hermes stackframes (#189) --- .gitignore | 3 + sourcemap/src/lib.rs | 70 ++++++++++++++++--- sourcemap/tests/fixtures/README.md | 4 ++ .../tests/fixtures/react-native-metro.js | 9 +++ .../tests/fixtures/react-native-metro.js.map | 1 + 5 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 sourcemap/tests/fixtures/react-native-metro.js create mode 100644 sourcemap/tests/fixtures/react-native-metro.js.map diff --git a/.gitignore b/.gitignore index 11727dbe9..9e81fbcfd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# OS +.DS_Store + # Rust target/ **/*.rs.bk diff --git a/sourcemap/src/lib.rs b/sourcemap/src/lib.rs index c22b24a3f..13930aac1 100644 --- a/sourcemap/src/lib.rs +++ b/sourcemap/src/lib.rs @@ -189,15 +189,15 @@ impl SourceMapView { source: &SourceView<'b>, ) -> Option> { match &self.sm { - SourceMapType::Regular(sm) => sm.lookup_token(line, col).map(|token| { - let mut rv = self.make_token_match(token); - rv.function_name = source - .sv - .get_original_function_name(token, minified_name) - .map(str::to_owned); - rv - }), - SourceMapType::Hermes(smh) => { + // Instead of regular line/column pairs, Hermes uses bytecode offsets, which always + // have `line == 0`. + // However, a `SourceMapHermes` is defined by having `x_facebook_sources` scope + // information, which can actually be used without Hermes. + // So if our stack frame has `line > 0` (0-based), it is extremely likely we don’t run + // on hermes at all, in which case just fall back to regular sourcemap logic. + // Luckily, `metro` puts a prelude on line 0, + // so regular non-hermes user code should always have `line > 0`. + SourceMapType::Hermes(smh) if line == 0 => { // we use `col + 1` here, since hermes uses bytecode offsets which are 0-based, // and the upstream python code does a `- 1` here: // https://github.com/getsentry/sentry/blob/fdabccac7576c80674c2fed556d4c5407657dc4c/src/sentry/lang/javascript/processor.py#L584-L586 @@ -207,6 +207,14 @@ impl SourceMapView { rv }) } + _ => self.sm.lookup_token(line, col).map(|token| { + let mut rv = self.make_token_match(token); + rv.function_name = source + .sv + .get_original_function_name(token, minified_name) + .map(str::to_owned); + rv + }), } } @@ -245,7 +253,7 @@ fn test_react_native_hermes() { }) ); - // at anonymous (address at unknown:1:11857) + // at anonymous (address at unknown:1:11857) assert_eq!( smv.lookup_token_with_function_name(0, 11857, "", &sv), Some(TokenMatch { @@ -260,3 +268,45 @@ fn test_react_native_hermes() { }) ); } + +#[test] +fn test_react_native_metro() { + let source = include_str!("../tests/fixtures/react-native-metro.js"); + let bytes = include_bytes!("../tests/fixtures/react-native-metro.js.map"); + let smv = SourceMapView::from_json_slice(bytes).unwrap(); + let sv = SourceView::new(source); + + // e.foo (react-native-metro.js:7:101) + assert_eq!( + smv.lookup_token_with_function_name(6, 100, "e.foo", &sv), + Some(TokenMatch { + src_line: 1, + src_col: 10, + dst_line: 6, + dst_col: 100, + src_id: 6, + name: None, + src: Some("module.js"), + function_name: None, + }) + ); + + // at react-native-metro.js:6:44 + assert_eq!( + smv.lookup_token_with_function_name(5, 43, "", &sv), + Some(TokenMatch { + src_line: 2, + src_col: 0, + dst_line: 5, + dst_col: 39, + src_id: 5, + name: Some("foo"), + src: Some("input.js"), + function_name: None, + }) + ); + + // in case we have a `metro` bundle, but a `hermes` bytecode offset (something out of range), + // we can’t resolve this. + assert_eq!(smv.lookup_token_with_function_name(0, 11857, "", &sv), None); +} diff --git a/sourcemap/tests/fixtures/README.md b/sourcemap/tests/fixtures/README.md index 08409e12c..a82e06db2 100644 --- a/sourcemap/tests/fixtures/README.md +++ b/sourcemap/tests/fixtures/README.md @@ -3,3 +3,7 @@ This SourceMap is one generated by the `react-native` + `hermes` pipeline. See the `rust-sourcemap` repo for instructions on how to generate it. Additionally, it was processed by `sentry-cli`, which basically inlines all the `sourceContent`s. + +## react-native-metro.js.map + +This is the SourceMap as generated by `metro` alone, without running the code through `hermes`. diff --git a/sourcemap/tests/fixtures/react-native-metro.js b/sourcemap/tests/fixtures/react-native-metro.js new file mode 100644 index 000000000..a33d4c630 --- /dev/null +++ b/sourcemap/tests/fixtures/react-native-metro.js @@ -0,0 +1,9 @@ +var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=this.process||{};process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||"production"; +!(function(r){"use strict";r.__r=o,r.__d=function(r,i,n){if(null!=e[i])return;var o={dependencyMap:n,factory:r,hasError:!1,importedAll:t,importedDefault:t,isInitialized:!1,publicModule:{exports:{}}};e[i]=o},r.__c=n,r.__registerSegment=function(r,e){s[r]=e};var e=n(),t={},i={}.hasOwnProperty;function n(){return e=Object.create(null)}function o(r){var t=r,i=e[t];return i&&i.isInitialized?i.publicModule.exports:d(t,i)}function l(r){var i=r;if(e[i]&&e[i].importedDefault!==t)return e[i].importedDefault;var n=o(i),l=n&&n.__esModule?n.default:n;return e[i].importedDefault=l}function u(r){var n=r;if(e[n]&&e[n].importedAll!==t)return e[n].importedAll;var l,u=o(n);if(u&&u.__esModule)l=u;else{if(l={},u)for(var a in u)i.call(u,a)&&(l[a]=u[a]);l.default=u}return e[n].importedAll=l}o.importDefault=l,o.importAll=u;var a=!1;function d(e,t){if(!a&&r.ErrorUtils){var i;a=!0;try{i=v(e,t)}catch(e){r.ErrorUtils.reportFatalError(e)}return a=!1,i}return v(e,t)}var c=16,f=65535;function p(r){return{segmentId:r>>>c,localId:r&f}}o.unpackModuleId=p,o.packModuleId=function(r){return(r.segmentId<0){var n=p(t),a=n.segmentId,d=n.localId,c=s[a];null!=c&&(c(d),i=e[t])}var f=r.nativeRequire;if(!i&&f){var v=p(t),h=v.segmentId;f(v.localId,h),i=e[t]}if(!i)throw Error('Requiring unknown module "'+t+'".');if(i.hasError)throw m(t,i.error);i.isInitialized=!0;var I=i,g=I.factory,y=I.dependencyMap;try{var _=i.publicModule;return _.id=t,g(r,o,l,u,_,_.exports,y),i.factory=void 0,i.dependencyMap=void 0,_.exports}catch(r){throw i.hasError=!0,i.error=r,i.isInitialized=!1,i.publicModule.exports=void 0,r}}function m(r,e){return Error('Requiring module "'+r+'", which threw an exception: '+e)}})('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof global?global:'undefined'!=typeof window?window:this); +!(function(n){var e=(function(){function n(n,e){return n}function e(n){var e={};return n.forEach(function(n,r){e[n]=!0}),e}function r(n,r,u){if(n.formatValueCalls++,n.formatValueCalls>200)return"[TOO BIG formatValueCalls "+n.formatValueCalls+" exceeded limit of 200]";var f=t(n,r);if(f)return f;var c=Object.keys(r),s=e(c);if(d(r)&&(c.indexOf('message')>=0||c.indexOf('description')>=0))return o(r);if(0===c.length){if(v(r)){var p=r.name?': '+r.name:'';return n.stylize('[Function'+p+']','special')}if(g(r))return n.stylize(RegExp.prototype.toString.call(r),'regexp');if(y(r))return n.stylize(Date.prototype.toString.call(r),'date');if(d(r))return o(r)}var h,b,m='',j=!1,O=['{','}'];(h=r,Array.isArray(h)&&(j=!0,O=['[',']']),v(r))&&(m=' [Function'+(r.name?': '+r.name:'')+']');return g(r)&&(m=' '+RegExp.prototype.toString.call(r)),y(r)&&(m=' '+Date.prototype.toUTCString.call(r)),d(r)&&(m=' '+o(r)),0!==c.length||j&&0!=r.length?u<0?g(r)?n.stylize(RegExp.prototype.toString.call(r),'regexp'):n.stylize('[Object]','special'):(n.seen.push(r),b=j?i(n,r,u,s,c):c.map(function(e){return a(n,r,u,s,e,j)}),n.seen.pop(),l(b,m,O)):O[0]+m+O[1]}function t(n,e){if(s(e))return n.stylize('undefined','undefined');if('string'==typeof e){var r="'"+JSON.stringify(e).replace(/^"|"$/g,'').replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(r,'string')}return c(e)?n.stylize(''+e,'number'):u(e)?n.stylize(''+e,'boolean'):f(e)?n.stylize('null','null'):void 0}function o(n){return'['+Error.prototype.toString.call(n)+']'}function i(n,e,r,t,o){for(var i=[],l=0,u=e.length;l-1&&(u=a?u.split('\n').map(function(n){return' '+n}).join('\n').substr(2):'\n'+u.split('\n').map(function(n){return' '+n}).join('\n')):u=n.stylize('[Circular]','special')),s(l)){if(a&&i.match(/^\d+$/))return u;(l=JSON.stringify(''+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=n.stylize(l,'name')):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=n.stylize(l,'string'))}return l+': '+u}function l(n,e,r){return n.reduce(function(n,e){return 0,e.indexOf('\n')>=0&&0,n+e.replace(/\u001b\[\d\d?m/g,'').length+1},0)>60?r[0]+(''===e?'':e+'\n ')+' '+n.join(',\n ')+' '+r[1]:r[0]+e+' '+n.join(', ')+' '+r[1]}function u(n){return'boolean'==typeof n}function f(n){return null===n}function c(n){return'number'==typeof n}function s(n){return void 0===n}function g(n){return p(n)&&'[object RegExp]'===h(n)}function p(n){return'object'==typeof n&&null!==n}function y(n){return p(n)&&'[object Date]'===h(n)}function d(n){return p(n)&&('[object Error]'===h(n)||n instanceof Error)}function v(n){return'function'==typeof n}function h(n){return Object.prototype.toString.call(n)}function b(n,e){return Object.prototype.hasOwnProperty.call(n,e)}return function(e,t){return r({seen:[],formatValueCalls:0,stylize:n},e,t.depth)}})(),r='(index)',t={trace:0,info:1,warn:2,error:3},o=[];o[t.trace]='debug',o[t.info]='log',o[t.warn]='warning',o[t.error]='error';var i=1;function a(r){return function(){var a;a=1===arguments.length&&'string'==typeof arguments[0]?arguments[0]:Array.prototype.map.call(arguments,function(n){return e(n,{depth:10})}).join(', ');var l=r;'Warning: '===a.slice(0,9)&&l>=t.error&&(l=t.warn),n.__inspectorLog&&n.__inspectorLog(o[l],a,[].slice.call(arguments),i),s.length&&(a=g('',a)),n.nativeLoggingHook(a,l)}}function l(n,e){return Array.apply(null,Array(e)).map(function(){return n})}var u="\u2502",f="\u2510",c="\u2518",s=[];function g(n,e){return s.join('')+n+' '+(e||'')}if(n.nativeLoggingHook){n.console;n.console={error:a(t.error),info:a(t.info),log:a(t.info),warn:a(t.warn),trace:a(t.trace),debug:a(t.trace),table:function(e){if(!Array.isArray(e)){var o=e;for(var i in e=[],o)if(o.hasOwnProperty(i)){var a=o[i];a[r]=i,e.push(a)}}if(0!==e.length){var u=Object.keys(e[0]).sort(),f=[],c=[];u.forEach(function(n,r){c[r]=n.length;for(var t=0;t';return function(){for(var r=arguments.length,u=new Array(r),e=0;e {};\n\n global.$RefreshSig$ = () => type => type;\n}\n\nfunction clear() {\n modules = Object.create(null); // We return modules here so that we can assign an initial value to modules\n // when defining it. Otherwise, we would have to do \"let modules = null\",\n // which will force us to add \"nullthrows\" everywhere.\n\n return modules;\n}\n\nif (__DEV__) {\n var verboseNamesToModuleIds = Object.create(null);\n var initializingModuleIds = [];\n}\n\nfunction define(factory, moduleId, dependencyMap) {\n if (modules[moduleId] != null) {\n if (__DEV__) {\n // (We take `inverseDependencies` from `arguments` to avoid an unused\n // named parameter in `define` in production.\n const inverseDependencies = arguments[4]; // If the module has already been defined and the define method has been\n // called with inverseDependencies, we can hot reload it.\n\n if (inverseDependencies) {\n global.__accept(moduleId, factory, dependencyMap, inverseDependencies);\n }\n } // prevent repeated calls to `global.nativeRequire` to overwrite modules\n // that are already loaded\n\n return;\n }\n\n const mod = {\n dependencyMap,\n factory,\n hasError: false,\n importedAll: EMPTY,\n importedDefault: EMPTY,\n isInitialized: false,\n publicModule: {\n exports: {}\n }\n };\n modules[moduleId] = mod;\n\n if (__DEV__) {\n // HMR\n mod.hot = createHotReloadingObject(); // DEBUGGABLE MODULES NAMES\n // we take `verboseName` from `arguments` to avoid an unused named parameter\n // in `define` in production.\n\n const verboseName = arguments[3];\n\n if (verboseName) {\n mod.verboseName = verboseName;\n verboseNamesToModuleIds[verboseName] = moduleId;\n }\n }\n}\n\nfunction metroRequire(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = verboseNamesToModuleIds[verboseName];\n\n if (moduleId == null) {\n throw new Error(`Unknown named module: \"${verboseName}\"`);\n } else {\n console.warn(\n `Requiring module \"${verboseName}\" by name is only supported for ` +\n \"debugging purposes and will BREAK IN PRODUCTION!\"\n );\n }\n } //$FlowFixMe: at this point we know that moduleId is a number\n\n const moduleIdReallyIsNumber = moduleId;\n\n if (__DEV__) {\n const initializingIndex = initializingModuleIds.indexOf(\n moduleIdReallyIsNumber\n );\n\n if (initializingIndex !== -1) {\n const cycle = initializingModuleIds\n .slice(initializingIndex)\n .map(id => (modules[id] ? modules[id].verboseName : \"[unknown]\")); // We want to show A -> B -> A:\n\n cycle.push(cycle[0]);\n console.warn(\n `Require cycle: ${cycle.join(\" -> \")}\\n\\n` +\n \"Require cycles are allowed, but can result in uninitialized values. \" +\n \"Consider refactoring to remove the need for a cycle.\"\n );\n }\n }\n\n const module = modules[moduleIdReallyIsNumber];\n return module && module.isInitialized\n ? module.publicModule.exports\n : guardedLoadModule(moduleIdReallyIsNumber, module);\n}\n\nfunction metroImportDefault(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = verboseNamesToModuleIds[verboseName];\n } //$FlowFixMe: at this point we know that moduleId is a number\n\n const moduleIdReallyIsNumber = moduleId;\n\n if (\n modules[moduleIdReallyIsNumber] &&\n modules[moduleIdReallyIsNumber].importedDefault !== EMPTY\n ) {\n return modules[moduleIdReallyIsNumber].importedDefault;\n }\n\n const exports = metroRequire(moduleIdReallyIsNumber);\n const importedDefault =\n exports && exports.__esModule ? exports.default : exports; // $FlowFixMe The metroRequire call above will throw if modules[id] is null\n\n return (modules[moduleIdReallyIsNumber].importedDefault = importedDefault);\n}\n\nmetroRequire.importDefault = metroImportDefault;\n\nfunction metroImportAll(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = verboseNamesToModuleIds[verboseName];\n } //$FlowFixMe: at this point we know that moduleId is a number\n\n const moduleIdReallyIsNumber = moduleId;\n\n if (\n modules[moduleIdReallyIsNumber] &&\n modules[moduleIdReallyIsNumber].importedAll !== EMPTY\n ) {\n return modules[moduleIdReallyIsNumber].importedAll;\n }\n\n const exports = metroRequire(moduleIdReallyIsNumber);\n let importedAll;\n\n if (exports && exports.__esModule) {\n importedAll = exports;\n } else {\n importedAll = {}; // Refrain from using Object.assign, it has to work in ES3 environments.\n\n if (exports) {\n for (const key in exports) {\n if (hasOwnProperty.call(exports, key)) {\n importedAll[key] = exports[key];\n }\n }\n }\n\n importedAll.default = exports;\n } // $FlowFixMe The metroRequire call above will throw if modules[id] is null\n\n return (modules[moduleIdReallyIsNumber].importedAll = importedAll);\n}\n\nmetroRequire.importAll = metroImportAll;\nlet inGuard = false;\n\nfunction guardedLoadModule(moduleId, module) {\n if (!inGuard && global.ErrorUtils) {\n inGuard = true;\n let returnValue;\n\n try {\n returnValue = loadModuleImplementation(moduleId, module);\n } catch (e) {\n // TODO: (moti) T48204692 Type this use of ErrorUtils.\n global.ErrorUtils.reportFatalError(e);\n }\n\n inGuard = false;\n return returnValue;\n } else {\n return loadModuleImplementation(moduleId, module);\n }\n}\n\nconst ID_MASK_SHIFT = 16;\nconst LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT;\n\nfunction unpackModuleId(moduleId) {\n const segmentId = moduleId >>> ID_MASK_SHIFT;\n const localId = moduleId & LOCAL_ID_MASK;\n return {\n segmentId,\n localId\n };\n}\n\nmetroRequire.unpackModuleId = unpackModuleId;\n\nfunction packModuleId(value) {\n return (value.segmentId << ID_MASK_SHIFT) + value.localId;\n}\n\nmetroRequire.packModuleId = packModuleId;\nconst moduleDefinersBySegmentID = [];\n\nfunction registerSegment(segmentID, moduleDefiner) {\n moduleDefinersBySegmentID[segmentID] = moduleDefiner;\n}\n\nfunction loadModuleImplementation(moduleId, module) {\n if (!module && moduleDefinersBySegmentID.length > 0) {\n const _unpackModuleId = unpackModuleId(moduleId),\n segmentId = _unpackModuleId.segmentId,\n localId = _unpackModuleId.localId;\n\n const definer = moduleDefinersBySegmentID[segmentId];\n\n if (definer != null) {\n definer(localId);\n module = modules[moduleId];\n }\n }\n\n const nativeRequire = global.nativeRequire;\n\n if (!module && nativeRequire) {\n const _unpackModuleId2 = unpackModuleId(moduleId),\n segmentId = _unpackModuleId2.segmentId,\n localId = _unpackModuleId2.localId;\n\n nativeRequire(localId, segmentId);\n module = modules[moduleId];\n }\n\n if (!module) {\n throw unknownModuleError(moduleId);\n }\n\n if (module.hasError) {\n throw moduleThrewError(moduleId, module.error);\n } // `metroRequire` calls into the require polyfill itself are not analyzed and\n // replaced so that they use numeric module IDs.\n // The systrace module will expose itself on the metroRequire function so that\n // it can be used here.\n // TODO(t9759686) Scan polyfills for dependencies, too\n\n if (__DEV__) {\n var Systrace = metroRequire.Systrace,\n Refresh = metroRequire.Refresh;\n } // We must optimistically mark module as initialized before running the\n // factory to keep any require cycles inside the factory from causing an\n // infinite require loop.\n\n module.isInitialized = true;\n const _module = module,\n factory = _module.factory,\n dependencyMap = _module.dependencyMap;\n\n if (__DEV__) {\n initializingModuleIds.push(moduleId);\n }\n\n try {\n if (__DEV__) {\n // $FlowFixMe: we know that __DEV__ is const and `Systrace` exists\n Systrace.beginEvent(\"JS_require_\" + (module.verboseName || moduleId));\n }\n\n const moduleObject = module.publicModule;\n\n if (__DEV__) {\n moduleObject.hot = module.hot;\n var prevRefreshReg = global.$RefreshReg$;\n var prevRefreshSig = global.$RefreshSig$;\n\n if (Refresh != null) {\n const RefreshRuntime = Refresh;\n\n global.$RefreshReg$ = (type, id) => {\n RefreshRuntime.register(type, moduleId + \" \" + id);\n };\n\n global.$RefreshSig$ =\n RefreshRuntime.createSignatureFunctionForTransform;\n }\n }\n\n moduleObject.id = moduleId; // keep args in sync with with defineModuleCode in\n // metro/src/Resolver/index.js\n // and metro/src/ModuleGraph/worker.js\n\n factory(\n global,\n metroRequire,\n metroImportDefault,\n metroImportAll,\n moduleObject,\n moduleObject.exports,\n dependencyMap\n ); // avoid removing factory in DEV mode as it breaks HMR\n\n if (!__DEV__) {\n // $FlowFixMe: This is only sound because we never access `factory` again\n module.factory = undefined;\n module.dependencyMap = undefined;\n }\n\n if (__DEV__) {\n // $FlowFixMe: we know that __DEV__ is const and `Systrace` exists\n Systrace.endEvent();\n\n if (Refresh != null) {\n registerExportsForReactRefresh(Refresh, moduleObject.exports, moduleId);\n }\n }\n\n return moduleObject.exports;\n } catch (e) {\n module.hasError = true;\n module.error = e;\n module.isInitialized = false;\n module.publicModule.exports = undefined;\n throw e;\n } finally {\n if (__DEV__) {\n if (initializingModuleIds.pop() !== moduleId) {\n throw new Error(\n \"initializingModuleIds is corrupt; something is terribly wrong\"\n );\n }\n\n global.$RefreshReg$ = prevRefreshReg;\n global.$RefreshSig$ = prevRefreshSig;\n }\n }\n}\n\nfunction unknownModuleError(id) {\n let message = 'Requiring unknown module \"' + id + '\".';\n\n if (__DEV__) {\n message +=\n \" If you are sure the module exists, try restarting Metro. \" +\n \"You may also want to run `yarn` or `npm install`.\";\n }\n\n return Error(message);\n}\n\nfunction moduleThrewError(id, error) {\n const displayName = (__DEV__ && modules[id] && modules[id].verboseName) || id;\n return Error(\n 'Requiring module \"' + displayName + '\", which threw an exception: ' + error\n );\n}\n\nif (__DEV__) {\n metroRequire.Systrace = {\n beginEvent: () => {},\n endEvent: () => {}\n };\n\n metroRequire.getModules = () => {\n return modules;\n }; // HOT MODULE RELOADING\n\n var createHotReloadingObject = function() {\n const hot = {\n _acceptCallback: null,\n _disposeCallback: null,\n _didAccept: false,\n accept: callback => {\n hot._didAccept = true;\n hot._acceptCallback = callback;\n },\n dispose: callback => {\n hot._disposeCallback = callback;\n }\n };\n return hot;\n };\n\n let reactRefreshTimeout = null;\n\n const metroHotUpdateModule = function(\n id,\n factory,\n dependencyMap,\n inverseDependencies\n ) {\n const mod = modules[id];\n\n if (!mod) {\n if (factory) {\n // New modules are going to be handled by the define() method.\n return;\n }\n\n throw unknownModuleError(id);\n }\n\n if (!mod.hasError && !mod.isInitialized) {\n // The module hasn't actually been executed yet,\n // so we can always safely replace it.\n mod.factory = factory;\n mod.dependencyMap = dependencyMap;\n return;\n }\n\n const Refresh = metroRequire.Refresh;\n const pendingModuleIDs = [id];\n const updatedModuleIDs = [];\n const seenModuleIDs = new Set();\n const refreshBoundaryIDs = new Set(); // In this loop, we will traverse the dependency tree upwards from the\n // changed module. Updates \"bubble\" up to the closest accepted parent.\n //\n // If we reach the module root and nothing along the way accepted the update,\n // we know hot reload is going to fail. In that case we return false.\n //\n // The main purpose of this loop is to figure out whether it's safe to apply\n // a hot update. It is only safe when the update was accepted somewhere\n // along the way upwards for each of its parent dependency module chains.\n //\n // If we didn't have this check, we'd risk re-evaluating modules that\n // have side effects and lead to confusing and meaningless crashes.\n\n while (pendingModuleIDs.length > 0) {\n const pendingID = pendingModuleIDs.pop(); // Don't process twice if we have a cycle.\n\n if (seenModuleIDs.has(pendingID)) {\n continue;\n }\n\n seenModuleIDs.add(pendingID); // If the module accepts itself, no need to bubble.\n // We can stop worrying about this module chain and pick the next one.\n\n const pendingModule = modules[pendingID];\n\n if (pendingModule != null) {\n const pendingHot = pendingModule.hot;\n\n if (pendingHot == null) {\n throw new Error(\n \"[Refresh] Expected module.hot to always exist in DEV.\"\n );\n } // A module can be accepted manually from within itself.\n\n let canAccept = pendingHot._didAccept;\n\n if (!canAccept && Refresh != null) {\n // Or React Refresh may mark it accepted based on exports.\n const isBoundary = isReactRefreshBoundary(\n Refresh,\n pendingModule.publicModule.exports\n );\n\n if (isBoundary) {\n canAccept = true;\n refreshBoundaryIDs.add(pendingID);\n }\n }\n\n if (canAccept) {\n updatedModuleIDs.push(pendingID);\n continue;\n }\n } // If we bubble through the roof, there is no way to do a hot update.\n // Bail out altogether. This is the failure case.\n\n const parentIDs = inverseDependencies[pendingID];\n\n if (parentIDs.length === 0) {\n // Reload the app because the hot reload can't succeed.\n // This should work both on web and React Native.\n performFullRefresh();\n return;\n } // This module didn't accept but maybe all its parents did?\n // Put them all in the queue to run the same set of checks.\n\n updatedModuleIDs.push(pendingID);\n parentIDs.forEach(parentID => pendingModuleIDs.push(parentID));\n } // If we reached here, it is likely that hot reload will be successful.\n // Run the actual factories.\n\n seenModuleIDs.clear();\n\n for (let i = 0; i < updatedModuleIDs.length; i++) {\n // Don't process twice if we have a cycle.\n const updatedID = updatedModuleIDs[i];\n\n if (seenModuleIDs.has(updatedID)) {\n continue;\n }\n\n seenModuleIDs.add(updatedID);\n const mod = modules[updatedID];\n\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the updated module.\");\n }\n\n const prevExports = mod.publicModule.exports;\n const didError = runUpdatedModule(\n updatedID,\n updatedID === id ? factory : undefined,\n updatedID === id ? dependencyMap : undefined\n );\n const nextExports = mod.publicModule.exports;\n\n if (didError) {\n // The user was shown a redbox about module initialization.\n // There's nothing for us to do here until it's fixed.\n return;\n }\n\n if (refreshBoundaryIDs.has(updatedID)) {\n // Since we just executed the code for it, it's possible\n // that the new exports make it ineligible for being a boundary.\n const isNoLongerABoundary = !isReactRefreshBoundary(\n Refresh,\n nextExports\n ); // It can also become ineligible if its exports are incompatible\n // with the previous exports.\n // For example, if you add/remove/change exports, we'll want\n // to re-execute the importing modules, and force those components\n // to re-render. Similarly, if you convert a class component\n // to a function, we want to invalidate the boundary.\n\n const didInvalidate = shouldInvalidateReactRefreshBoundary(\n Refresh,\n prevExports,\n nextExports\n );\n\n if (isNoLongerABoundary || didInvalidate) {\n // We'll be conservative. The only case in which we won't do a full\n // reload is if all parent modules are also refresh boundaries.\n // In that case we'll add them to the current queue.\n const parentIDs = inverseDependencies[updatedID];\n\n if (parentIDs.length === 0) {\n // Looks like we bubbled to the root. Can't recover from that.\n performFullRefresh();\n return;\n } // Schedule all parent refresh boundaries to re-run in this loop.\n\n for (let j = 0; j < parentIDs.length; j++) {\n const parentID = parentIDs[j];\n const parentMod = modules[parentID];\n\n if (parentMod == null) {\n throw new Error(\"[Refresh] Expected to find parent module.\");\n }\n\n const canAcceptParent = isReactRefreshBoundary(\n Refresh,\n parentMod.publicModule.exports\n );\n\n if (canAcceptParent) {\n // All parents will have to re-run too.\n refreshBoundaryIDs.add(parentID);\n updatedModuleIDs.push(parentID);\n } else {\n performFullRefresh();\n return;\n }\n }\n }\n }\n }\n\n if (Refresh != null) {\n // Debounce a little in case there are multiple updates queued up.\n // This is also useful because __accept may be called multiple times.\n if (reactRefreshTimeout == null) {\n reactRefreshTimeout = setTimeout(() => {\n reactRefreshTimeout = null; // Update React components.\n\n Refresh.performReactRefresh();\n }, 30);\n }\n }\n };\n\n const runUpdatedModule = function(id, factory, dependencyMap) {\n const mod = modules[id];\n\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the module.\");\n }\n\n const hot = mod.hot;\n\n if (!hot) {\n throw new Error(\"[Refresh] Expected module.hot to always exist in DEV.\");\n }\n\n if (hot._disposeCallback) {\n try {\n hot._disposeCallback();\n } catch (error) {\n console.error(\n `Error while calling dispose handler for module ${id}: `,\n error\n );\n }\n }\n\n if (factory) {\n mod.factory = factory;\n }\n\n if (dependencyMap) {\n mod.dependencyMap = dependencyMap;\n }\n\n mod.hasError = false;\n mod.error = undefined;\n mod.importedAll = EMPTY;\n mod.importedDefault = EMPTY;\n mod.isInitialized = false;\n const prevExports = mod.publicModule.exports;\n mod.publicModule.exports = {};\n hot._didAccept = false;\n hot._acceptCallback = null;\n hot._disposeCallback = null;\n metroRequire(id);\n\n if (mod.hasError) {\n // This error has already been reported via a redbox.\n // We know it's likely a typo or some mistake that was just introduced.\n // Our goal now is to keep the rest of the application working so that by\n // the time user fixes the error, the app isn't completely destroyed\n // underneath the redbox. So we'll revert the module object to the last\n // successful export and stop propagating this update.\n mod.hasError = false;\n mod.isInitialized = true;\n mod.error = null;\n mod.publicModule.exports = prevExports; // We errored. Stop the update.\n\n return true;\n }\n\n if (hot._acceptCallback) {\n try {\n hot._acceptCallback();\n } catch (error) {\n console.error(\n `Error while calling accept handler for module ${id}: `,\n error\n );\n }\n } // No error.\n\n return false;\n };\n\n const performFullRefresh = () => {\n /* global window */\n if (\n typeof window !== \"undefined\" &&\n window.location != null &&\n typeof window.location.reload === \"function\"\n ) {\n window.location.reload();\n } else {\n // This is attached in setUpDeveloperTools.\n const Refresh = metroRequire.Refresh;\n\n if (Refresh != null) {\n Refresh.performFullRefresh();\n } else {\n console.warn(\"Could not reload the application after an edit.\");\n }\n }\n }; // Modules that only export components become React Refresh boundaries.\n\n var isReactRefreshBoundary = function(Refresh, moduleExports) {\n if (Refresh.isLikelyComponentType(moduleExports)) {\n return true;\n }\n\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n // Exit if we can't iterate over exports.\n return false;\n }\n\n let hasExports = false;\n let areAllExportsComponents = true;\n\n for (const key in moduleExports) {\n hasExports = true;\n\n if (key === \"__esModule\") {\n continue;\n }\n\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n\n if (desc && desc.get) {\n // Don't invoke getters as they may have side effects.\n return false;\n }\n\n const exportValue = moduleExports[key];\n\n if (!Refresh.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n\n return hasExports && areAllExportsComponents;\n };\n\n var shouldInvalidateReactRefreshBoundary = (\n Refresh,\n prevExports,\n nextExports\n ) => {\n const prevSignature = getRefreshBoundarySignature(Refresh, prevExports);\n const nextSignature = getRefreshBoundarySignature(Refresh, nextExports);\n\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n\n for (let i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n\n return false;\n }; // When this signature changes, it's unsafe to stop at this refresh boundary.\n\n var getRefreshBoundarySignature = (Refresh, moduleExports) => {\n const signature = [];\n signature.push(Refresh.getFamilyByType(moduleExports));\n\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return signature;\n }\n\n for (const key in moduleExports) {\n if (key === \"__esModule\") {\n continue;\n }\n\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n\n if (desc && desc.get) {\n continue;\n }\n\n const exportValue = moduleExports[key];\n signature.push(key);\n signature.push(Refresh.getFamilyByType(exportValue));\n }\n\n return signature;\n };\n\n var registerExportsForReactRefresh = (Refresh, moduleExports, moduleID) => {\n Refresh.register(moduleExports, moduleID + \" %exports%\");\n\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return;\n }\n\n for (const key in moduleExports) {\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n\n if (desc && desc.get) {\n // Don't invoke getters as they may have side effects.\n continue;\n }\n\n const exportValue = moduleExports[key];\n const typeID = moduleID + \" %exports% \" + key;\n Refresh.register(exportValue, typeID);\n }\n };\n\n global.__accept = metroHotUpdateModule;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @polyfill\n * @nolint\n * @format\n */\n\n/* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void, no-control-regex */\n\n/**\n * This pipes all of our console logging functions to native logging so that\n * JavaScript errors in required modules show up in Xcode via NSLog.\n */\nconst inspect = (function() {\n // Copyright Joyent, Inc. and other Node contributors.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a\n // copy of this software and associated documentation files (the\n // \"Software\"), to deal in the Software without restriction, including\n // without limitation the rights to use, copy, modify, merge, publish,\n // distribute, sublicense, and/or sell copies of the Software, and to permit\n // persons to whom the Software is furnished to do so, subject to the\n // following conditions:\n //\n // The above copyright notice and this permission notice shall be included\n // in all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n // USE OR OTHER DEALINGS IN THE SOFTWARE.\n //\n // https://github.com/joyent/node/blob/master/lib/util.js\n\n function inspect(obj, opts) {\n var ctx = {\n seen: [],\n formatValueCalls: 0,\n stylize: stylizeNoColor,\n };\n return formatValue(ctx, obj, opts.depth);\n }\n\n function stylizeNoColor(str, styleType) {\n return str;\n }\n\n function arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n }\n\n function formatValue(ctx, value, recurseTimes) {\n ctx.formatValueCalls++;\n if (ctx.formatValueCalls > 200) {\n return `[TOO BIG formatValueCalls ${\n ctx.formatValueCalls\n } exceeded limit of 200]`;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (\n isError(value) &&\n (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)\n ) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '',\n array = false,\n braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n key,\n array,\n );\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n }\n\n function formatPrimitive(ctx, value) {\n if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple =\n \"'\" +\n JSON.stringify(value)\n .replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') +\n \"'\";\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value)) return ctx.stylize('' + value, 'number');\n if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value)) return ctx.stylize('null', 'null');\n }\n\n function formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n }\n\n function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(\n formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n String(i),\n true,\n ),\n );\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(\n formatProperty(ctx, value, recurseTimes, visibleKeys, key, true),\n );\n }\n });\n return output;\n }\n\n function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || {value: value[key]};\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str\n .split('\\n')\n .map(function(line) {\n return ' ' + line;\n })\n .join('\\n')\n .substr(2);\n } else {\n str =\n '\\n' +\n str\n .split('\\n')\n .map(function(line) {\n return ' ' + line;\n })\n .join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n }\n\n function reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return (\n braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1]\n );\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n }\n\n // NOTE: These type checking functions intentionally don't use `instanceof`\n // because it is fragile and can be easily faked with `Object.create()`.\n function isArray(ar) {\n return Array.isArray(ar);\n }\n\n function isBoolean(arg) {\n return typeof arg === 'boolean';\n }\n\n function isNull(arg) {\n return arg === null;\n }\n\n function isNullOrUndefined(arg) {\n return arg == null;\n }\n\n function isNumber(arg) {\n return typeof arg === 'number';\n }\n\n function isString(arg) {\n return typeof arg === 'string';\n }\n\n function isSymbol(arg) {\n return typeof arg === 'symbol';\n }\n\n function isUndefined(arg) {\n return arg === void 0;\n }\n\n function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n }\n\n function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n }\n\n function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n }\n\n function isError(e) {\n return (\n isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error)\n );\n }\n\n function isFunction(arg) {\n return typeof arg === 'function';\n }\n\n function objectToString(o) {\n return Object.prototype.toString.call(o);\n }\n\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n return inspect;\n})();\n\nconst OBJECT_COLUMN_NAME = '(index)';\nconst LOG_LEVELS = {\n trace: 0,\n info: 1,\n warn: 2,\n error: 3,\n};\nconst INSPECTOR_LEVELS = [];\nINSPECTOR_LEVELS[LOG_LEVELS.trace] = 'debug';\nINSPECTOR_LEVELS[LOG_LEVELS.info] = 'log';\nINSPECTOR_LEVELS[LOG_LEVELS.warn] = 'warning';\nINSPECTOR_LEVELS[LOG_LEVELS.error] = 'error';\n\n// Strip the inner function in getNativeLogFunction(), if in dev also\n// strip method printing to originalConsole.\nconst INSPECTOR_FRAMES_TO_SKIP = __DEV__ ? 2 : 1;\n\nfunction getNativeLogFunction(level) {\n return function() {\n let str;\n if (arguments.length === 1 && typeof arguments[0] === 'string') {\n str = arguments[0];\n } else {\n str = Array.prototype.map\n .call(arguments, function(arg) {\n return inspect(arg, {depth: 10});\n })\n .join(', ');\n }\n\n let logLevel = level;\n if (str.slice(0, 9) === 'Warning: ' && logLevel >= LOG_LEVELS.error) {\n // React warnings use console.error so that a stack trace is shown,\n // but we don't (currently) want these to show a redbox\n // (Note: Logic duplicated in ExceptionsManager.js.)\n logLevel = LOG_LEVELS.warn;\n }\n if (global.__inspectorLog) {\n global.__inspectorLog(\n INSPECTOR_LEVELS[logLevel],\n str,\n [].slice.call(arguments),\n INSPECTOR_FRAMES_TO_SKIP,\n );\n }\n if (groupStack.length) {\n str = groupFormat('', str);\n }\n global.nativeLoggingHook(str, logLevel);\n };\n}\n\nfunction repeat(element, n) {\n return Array.apply(null, Array(n)).map(function() {\n return element;\n });\n}\n\nfunction consoleTablePolyfill(rows) {\n // convert object -> array\n if (!Array.isArray(rows)) {\n var data = rows;\n rows = [];\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n var row = data[key];\n row[OBJECT_COLUMN_NAME] = key;\n rows.push(row);\n }\n }\n }\n if (rows.length === 0) {\n global.nativeLoggingHook('', LOG_LEVELS.info);\n return;\n }\n\n var columns = Object.keys(rows[0]).sort();\n var stringRows = [];\n var columnWidths = [];\n\n // Convert each cell to a string. Also\n // figure out max cell width for each column\n columns.forEach(function(k, i) {\n columnWidths[i] = k.length;\n for (var j = 0; j < rows.length; j++) {\n var cellStr = (rows[j][k] || '?').toString();\n stringRows[j] = stringRows[j] || [];\n stringRows[j][i] = cellStr;\n columnWidths[i] = Math.max(columnWidths[i], cellStr.length);\n }\n });\n\n // Join all elements in the row into a single string with | separators\n // (appends extra spaces to each cell to make separators | aligned)\n function joinRow(row, space) {\n var cells = row.map(function(cell, i) {\n var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');\n return cell + extraSpaces;\n });\n space = space || ' ';\n return cells.join(space + '|' + space);\n }\n\n var separators = columnWidths.map(function(columnWidth) {\n return repeat('-', columnWidth).join('');\n });\n var separatorRow = joinRow(separators, '-');\n var header = joinRow(columns);\n var table = [header, separatorRow];\n\n for (var i = 0; i < rows.length; i++) {\n table.push(joinRow(stringRows[i]));\n }\n\n // Notice extra empty line at the beginning.\n // Native logging hook adds \"RCTLog >\" at the front of every\n // logged string, which would shift the header and screw up\n // the table\n global.nativeLoggingHook('\\n' + table.join('\\n'), LOG_LEVELS.info);\n}\n\nconst GROUP_PAD = '\\u2502'; // Box light vertical\nconst GROUP_OPEN = '\\u2510'; // Box light down+left\nconst GROUP_CLOSE = '\\u2518'; // Box light up+left\n\nconst groupStack = [];\n\nfunction groupFormat(prefix, msg) {\n // Insert group formatting before the console message\n return groupStack.join('') + prefix + ' ' + (msg || '');\n}\n\nfunction consoleGroupPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupCollapsedPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupEndPolyfill() {\n groupStack.pop();\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);\n}\n\nfunction consoleAssertPolyfill(expression, label) {\n if (!expression) {\n global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);\n }\n}\n\nif (global.nativeLoggingHook) {\n const originalConsole = global.console;\n // Preserve the original `console` as `originalConsole`\n if (__DEV__ && originalConsole) {\n const descriptor = Object.getOwnPropertyDescriptor(global, 'console');\n if (descriptor) {\n Object.defineProperty(global, 'originalConsole', descriptor);\n }\n }\n\n global.console = {\n error: getNativeLogFunction(LOG_LEVELS.error),\n info: getNativeLogFunction(LOG_LEVELS.info),\n log: getNativeLogFunction(LOG_LEVELS.info),\n warn: getNativeLogFunction(LOG_LEVELS.warn),\n trace: getNativeLogFunction(LOG_LEVELS.trace),\n debug: getNativeLogFunction(LOG_LEVELS.trace),\n table: consoleTablePolyfill,\n group: consoleGroupPolyfill,\n groupEnd: consoleGroupEndPolyfill,\n groupCollapsed: consoleGroupCollapsedPolyfill,\n assert: consoleAssertPolyfill,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n\n // If available, also call the original `console` method since that is\n // sometimes useful. Ex: on OS X, this will let you see rich output in\n // the Safari Web Inspector console.\n if (__DEV__ && originalConsole) {\n Object.keys(console).forEach(methodName => {\n const reactNativeMethod = console[methodName];\n if (originalConsole[methodName]) {\n console[methodName] = function() {\n // TODO(T43930203): remove this special case once originalConsole.assert properly checks\n // the condition\n if (methodName === 'assert') {\n if (!arguments[0]) {\n originalConsole.assert(...arguments);\n }\n } else {\n originalConsole[methodName](...arguments);\n }\n reactNativeMethod.apply(console, arguments);\n };\n }\n });\n\n // The following methods are not supported by this polyfill but\n // we still should pass them to original console if they are\n // supported by it.\n [\n 'clear',\n 'dir',\n 'dirxml',\n 'groupCollapsed',\n 'profile',\n 'profileEnd',\n ].forEach(methodName => {\n if (typeof originalConsole[methodName] === 'function') {\n console[methodName] = function() {\n originalConsole[methodName](...arguments);\n };\n }\n });\n }\n} else if (!global.console) {\n const log = global.print || function consoleLoggingStub() {};\n global.console = {\n error: log,\n info: log,\n log: log,\n warn: log,\n trace: log,\n debug: log,\n table: log,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n * @polyfill\n */\n\nlet _inGuard = 0;\n\ntype ErrorHandler = (error: mixed, isFatal: boolean) => void;\ntype Fn = (...Args) => Return;\n\n/**\n * This is the error handler that is called when we encounter an exception\n * when loading a module. This will report any errors encountered before\n * ExceptionsManager is configured.\n */\nlet _globalHandler: ErrorHandler = function onError(\n e: mixed,\n isFatal: boolean,\n) {\n throw e;\n};\n\n/**\n * The particular require runtime that we are using looks for a global\n * `ErrorUtils` object and if it exists, then it requires modules with the\n * error handler specified via ErrorUtils.setGlobalHandler by calling the\n * require function with applyWithGuard. Since the require module is loaded\n * before any of the modules, this ErrorUtils must be defined (and the handler\n * set) globally before requiring anything.\n */\nconst ErrorUtils = {\n setGlobalHandler(fun: ErrorHandler): void {\n _globalHandler = fun;\n },\n getGlobalHandler(): ErrorHandler {\n return _globalHandler;\n },\n reportError(error: mixed): void {\n _globalHandler && _globalHandler(error, false);\n },\n reportFatalError(error: mixed): void {\n // NOTE: This has an untyped call site in Metro.\n _globalHandler && _globalHandler(error, true);\n },\n applyWithGuard, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n // Unused, but some code synced from www sets it to null.\n unused_onError?: null,\n // Some callers pass a name here, which we ignore.\n unused_name?: ?string,\n ): ?TOut {\n try {\n _inGuard++;\n // $FlowFixMe: TODO T48204745 (1) apply(context, null) is fine. (2) array -> rest array should work\n return fun.apply(context, args);\n } catch (e) {\n ErrorUtils.reportError(e);\n } finally {\n _inGuard--;\n }\n return null;\n },\n applyWithGuardIfNeeded, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n ): ?TOut {\n if (ErrorUtils.inGuard()) {\n // $FlowFixMe: TODO T48204745 (1) apply(context, null) is fine. (2) array -> rest array should work\n return fun.apply(context, args);\n } else {\n ErrorUtils.applyWithGuard(fun, context, args);\n }\n return null;\n },\n inGuard(): boolean {\n return !!_inGuard;\n },\n guard, TOut>(\n fun: Fn,\n name?: ?string,\n context?: ?mixed,\n ): ?(...TArgs) => ?TOut {\n // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types\n // should be sufficient.\n if (typeof fun !== 'function') {\n console.warn('A function must be passed to ErrorUtils.guard, got ', fun);\n return null;\n }\n const guardName = name ?? fun.name ?? '';\n function guarded(...args: TArgs): ?TOut {\n return ErrorUtils.applyWithGuard(\n fun,\n context ?? this,\n args,\n null,\n guardName,\n );\n }\n\n return guarded;\n },\n};\n\nglobal.ErrorUtils = ErrorUtils;\n\nexport type ErrorUtilsT = typeof ErrorUtils;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @polyfill\n * @nolint\n */\n\n(function() {\n 'use strict';\n\n const hasOwnProperty = Object.prototype.hasOwnProperty;\n\n /**\n * Returns an array of the given object's own enumerable entries.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries\n */\n if (typeof Object.entries !== 'function') {\n Object.entries = function(object) {\n // `null` and `undefined` values are not allowed.\n if (object == null) {\n throw new TypeError('Object.entries called on non-object');\n }\n\n const entries = [];\n for (const key in object) {\n if (hasOwnProperty.call(object, key)) {\n entries.push([key, object[key]]);\n }\n }\n return entries;\n };\n }\n\n /**\n * Returns an array of the given object's own enumerable entries.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\n */\n if (typeof Object.values !== 'function') {\n Object.values = function(object) {\n // `null` and `undefined` values are not allowed.\n if (object == null) {\n throw new TypeError('Object.values called on non-object');\n }\n\n const values = [];\n for (const key in object) {\n if (hasOwnProperty.call(object, key)) {\n values.push(object[key]);\n }\n }\n return values;\n };\n }\n})();\n","import { foo } from \"./module.js\"\n\nfoo();\n","export function foo() {\n throw new Error(\"lets throw!\");\n}\n"],"x_facebook_sources":[null,[{"names":["","global.$RefreshReg$","global.$RefreshSig$","","clear","define","metroRequire","initializingModuleIds.slice.map$argument_0","metroImportDefault","metroImportAll","guardedLoadModule","unpackModuleId","packModuleId","registerSegment","loadModuleImplementation","unknownModuleError","moduleThrewError","metroRequire.Systrace.beginEvent","metroRequire.Systrace.endEvent","metroRequire.getModules","createHotReloadingObject","hot.accept","hot.dispose","metroHotUpdateModule","parentIDs.forEach$argument_0","setTimeout$argument_0","runUpdatedModule","performFullRefresh","isReactRefreshBoundary","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","registerExportsForReactRefresh"],"mappings":"AAA;wBCyB,QD;wBEE,MC,YH;AIG;CJM;AKO;CL2C;AME;aCyB,2DD;CNe;AQE;CRoB;ASI;CTmC;AUK;CViB;AWK;CXO;AYI;CZE;AaK;CbE;AcE;8BbqE;SaE;CduD;AeE;CfU;AgBE;ChBK;gBiBI,QjB;ckBC,QlB;4BmBG;GnBE;iCoBE;cCK;ODG;eEC;OFE;GpBG;+BuBI;wBCgG,2CD;yCEgG;SFI;GvBG;2B0BE;G1BuE;6B2BE;G3BkB;+B4BE;G5BmC;6C6BE;G7BmB;oC8BE;G9B2B;uC+BE;G/BqB"}],[{"names":["","","inspect","stylizeNoColor","arrayToHash","array.forEach$argument_0","formatValue","keys.map$argument_0","formatPrimitive","formatError","formatArray","keys.forEach$argument_0","formatProperty","str.split.map$argument_0","reduceToSingleString","output.reduce$argument_0","isArray","isBoolean","isNull","isNullOrUndefined","isNumber","isString","isSymbol","isUndefined","isRegExp","isObject","isDate","isError","isFunction","objectToString","hasOwnProperty","getNativeLogFunction","Array.prototype.map.call$argument_1","repeat","Array.apply.map$argument_0","consoleTablePolyfill","columns.forEach$argument_0","joinRow","row.map$argument_0","columnWidths.map$argument_0","groupFormat","consoleGroupPolyfill","consoleGroupCollapsedPolyfill","consoleGroupEndPolyfill","consoleAssertPolyfill","Object.keys.forEach$argument_0","methodName","forEach$argument_0","consoleLoggingStub"],"mappings":"AAA;iBCiB;ECwB;GDO;EEE;GFE;EGE;kBCG;KDE;GHG;EKE;wBC6F;ODS;GLM;EOE;GPgB;EQE;GRE;ESE;iBCkB;KDM;GTE;EWE;mBC4B;eDE;qBCQ;iBDE;GX0B;EaE;+BCE;KDI;Gbc;EeI;GfE;EgBE;GhBE;EiBE;GjBE;EkBE;GlBE;EmBE;GnBE;EoBE;GpBE;EqBE;GrBE;EsBE;GtBE;EuBE;GvBE;EwBE;GxBE;EyBE;GzBE;E0BE;G1BK;E2BE;G3BE;E4BE;G5BE;E6BE;G7BE;CDG;A+BmB;S9BC;yB+BM;S/BE;G8BuB;C/BC;AiCE;yCCC;GDE;CjCC;AmCE;kBCwB;GDQ;EEI;wBCC;KDG;GFG;oCIE;GJE;CnCc;AwCQ;CxCG;AyCE;CzCG;A0CE;C1CG;A2CE;C3CG;A4CE;C5CI;iC6CmC;8BCG;SDW;K7CE;c+CY;8BDE;SCE;K/CE;8BgDG,gChD"}],[{"names":["","onError","ErrorUtils.setGlobalHandler","ErrorUtils.getGlobalHandler","ErrorUtils.reportError","ErrorUtils.reportFatalError","ErrorUtils.applyWithGuard","ErrorUtils.applyWithGuardIfNeeded","ErrorUtils.inGuard","ErrorUtils.guard","guarded"],"mappings":"AAA;mCCqB;CDK;EEW;GFE;EGC;GHE;EIC;GJE;EKC;GLG;EMC;GNmB;EOC;GPY;EQC;GRE;ESC;ICY;KDQ;GTG"}],[{"names":["","","entries","values"],"mappings":"AAA;CCW;qBCU;KDa;oBEQ;KFa;CDE"}],[{"names":[""],"mappings":"AAA"}],[{"names":["","foo"],"mappings":"AAA,OC;CDE"}]],"names":["global","__r","metroRequire","__d","factory","moduleId","dependencyMap","modules","mod","hasError","importedAll","EMPTY","importedDefault","isInitialized","publicModule","exports","__c","clear","__registerSegment","segmentID","moduleDefiner","moduleDefinersBySegmentID","hasOwnProperty","Object","create","moduleIdReallyIsNumber","module","guardedLoadModule","metroImportDefault","__esModule","default","metroImportAll","key","call","importDefault","importAll","inGuard","ErrorUtils","returnValue","loadModuleImplementation","e","reportFatalError","ID_MASK_SHIFT","LOCAL_ID_MASK","unpackModuleId","segmentId","localId","packModuleId","value","length","_unpackModuleId","definer","nativeRequire","_unpackModuleId2","Error","moduleThrewError","error","_module","moduleObject","id","undefined","inspect","stylizeNoColor","str","styleType","arrayToHash","array","hash","forEach","val","idx","formatValue","ctx","recurseTimes","formatValueCalls","primitive","formatPrimitive","keys","visibleKeys","isError","indexOf","formatError","isFunction","name","stylize","isRegExp","RegExp","prototype","toString","isDate","Date","ar","output","base","braces","Array","isArray","toUTCString","seen","push","formatArray","map","formatProperty","pop","reduceToSingleString","isUndefined","simple","JSON","stringify","replace","isNumber","isBoolean","isNull","i","l","String","match","desc","getOwnPropertyDescriptor","get","set","split","line","join","substr","reduce","prev","cur","numLinesEst","arg","re","isObject","objectToString","d","o","obj","prop","opts","depth","OBJECT_COLUMN_NAME","LOG_LEVELS","trace","info","warn","INSPECTOR_LEVELS","INSPECTOR_FRAMES_TO_SKIP","getNativeLogFunction","level","arguments","logLevel","slice","__inspectorLog","groupStack","groupFormat","nativeLoggingHook","repeat","element","n","apply","GROUP_PAD","GROUP_OPEN","GROUP_CLOSE","prefix","msg","console","log","debug","table","rows","data","row","columns","sort","stringRows","columnWidths","k","j","cellStr","Math","max","separatorRow","joinRow","columnWidth","space","cells","cell","group","label","groupEnd","groupCollapsed","assert","expression","defineProperty","enumerable","print","_inGuard","_globalHandler","isFatal","setGlobalHandler","fun","getGlobalHandler","reportError","applyWithGuard","context","args","unused_onError","unused_name","applyWithGuardIfNeeded","guard","_ref","guardName","_len","_key","this","entries","object","TypeError","values","r","foo"],"mappings":"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"} \ No newline at end of file From a181bddfa1f1933cde63710078a8d89063490dda Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 19 Feb 2020 22:40:48 +0100 Subject: [PATCH 029/107] feat(minidump): Implement serde traits for ProcessResult (#188) --- minidump/src/processor.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/minidump/src/processor.rs b/minidump/src/processor.rs index d456e8f1e..f6b4ec1ed 100644 --- a/minidump/src/processor.rs +++ b/minidump/src/processor.rs @@ -700,6 +700,7 @@ impl fmt::Debug for SystemInfo { /// Usually included in `ProcessError` when the file cannot be processed. #[repr(u32)] #[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum ProcessResult { /// The dump was processed successfully. Ok, @@ -758,6 +759,7 @@ impl fmt::Display for ProcessResult { /// An error generated when trying to process a minidump. #[derive(Debug, Fail, Copy, Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[fail(display = "minidump processing failed: {}", _0)] pub struct ProcessMinidumpError(ProcessResult); From 8ac2d052bdd4bf4909e3eaa0314ec6aee179a509 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 19 Feb 2020 22:51:48 +0000 Subject: [PATCH 030/107] test(python): test against python3.6 (#190) --- .travis.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d881db675..ca35591e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,15 +30,24 @@ jobs: env: TEST=mac-rust # Python test suite - - language: python + - name: "Python 3.7 Style/Linting" + language: python python: "3.7" script: - make style-python - make lint-python env: TEST=style-python - - script: make test-python + - name: "Python 3.6 Tests (linux)" + before_install: + # multi-language jobs not currently possible, pyenv is used here. + # if we want later 3.6.x's it isn't possible AFAIK to update travis pyenv, + # so would need to install rustup + friends. + - pyenv install 3.6.3 + - pyenv global 3.6.3 + script: make test-python env: TEST=linux-python CXX=clang - - os: osx + - name: "Python 3.7 Tests (osx)" + os: osx script: make test-python env: TEST=mac-python From f9f71d39fa3ac382fa33aa0870596222af2e019a Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 25 Feb 2020 09:58:25 +0100 Subject: [PATCH 031/107] feat(common): Support name serialization and deserialization (#191) --- common/Cargo.toml | 2 +- common/src/types.rs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/Cargo.toml b/common/Cargo.toml index 9f99fd677..e581abdb2 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -21,7 +21,7 @@ debugid = "0.5.3" failure = "0.1.5" memmap = "0.7.0" stable_deref_trait = "1.1.1" -serde_ = { package = "serde", version = "1.0.88", optional = true } +serde_ = { package = "serde", version = "1.0.88", optional = true, features = ["derive"] } uuid = "0.7.4" [features] diff --git a/common/src/types.rs b/common/src/types.rs index f5d893503..7f48415e6 100644 --- a/common/src/types.rs +++ b/common/src/types.rs @@ -7,6 +7,9 @@ use std::str; use failure::Fail; +#[cfg(feature = "serde")] +use serde_::{Deserialize, Serialize}; + /// Names for x86 CPU registers by register number. static I386: &[&str] = &[ "$eax", "$ecx", "$edx", "$ebx", "$esp", "$ebp", "$esi", "$edi", "$eip", "$eflags", "$unused1", @@ -435,6 +438,7 @@ impl str::FromStr for Language { fn from_str(string: &str) -> Result { Ok(match string { + "unknown" => Language::Unknown, "c" => Language::C, "cpp" => Language::Cpp, "d" => Language::D, @@ -450,6 +454,11 @@ impl str::FromStr for Language { /// Represents a potentially mangled symbol. #[derive(Clone, Debug, Eq, Hash, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(Serialize, Deserialize), + serde(crate = "serde_") +)] pub struct Name<'a> { string: Cow<'a, str>, lang: Language, From 8f9a01756e48dcbba2e42917a064f495d74058b7 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Tue, 3 Mar 2020 20:54:30 +0100 Subject: [PATCH 032/107] fix(debuginfo): Decompress GNU compressed debug sections correctly (#192) --- debuginfo/src/elf.rs | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/debuginfo/src/elf.rs b/debuginfo/src/elf.rs index 060fd461e..736198adb 100644 --- a/debuginfo/src/elf.rs +++ b/debuginfo/src/elf.rs @@ -254,17 +254,32 @@ impl<'d> ElfObject<'d> { /// Decompresses the given compressed section data, if supported. fn decompress_section(&self, section_data: &[u8]) -> Option> { - let container = self.elf.header.container().ok()?; - let endianness = self.elf.header.endianness().ok()?; - let context = Ctx::new(container, endianness); + let (size, compressed) = if section_data.starts_with(b"ZLIB") { + // The GNU compression header is a 4 byte magic "ZLIB", followed by an 8-byte big-endian + // size prefix of the decompressed data. This adds up to 12 bytes of GNU header. + if section_data.len() < 12 { + return None; + } - let compression = CompressionHeader::parse(§ion_data, 0, context).ok()?; - if compression.ch_type != ELFCOMPRESS_ZLIB { - return None; - } + let mut size_bytes = [0; 8]; + size_bytes.copy_from_slice(§ion_data[4..12]); + + (u64::from_be_bytes(size_bytes), §ion_data[12..]) + } else { + let container = self.elf.header.container().ok()?; + let endianness = self.elf.header.endianness().ok()?; + let context = Ctx::new(container, endianness); + + let compression = CompressionHeader::parse(§ion_data, 0, context).ok()?; + if compression.ch_type != ELFCOMPRESS_ZLIB { + return None; + } + + let compressed = §ion_data[CompressionHeader::size(context)..]; + (compression.ch_size, compressed) + }; - let compressed = §ion_data[CompressionHeader::size(context)..]; - let mut decompressed = Vec::with_capacity(compression.ch_size as usize); + let mut decompressed = Vec::with_capacity(size as usize); Decompress::new(true) .decompress_vec(compressed, &mut decompressed, FlushDecompress::Finish) .ok()?; From 0f31615622361d9aab5f4c37ec65475cb6333287 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Tue, 17 Mar 2020 09:24:31 +0100 Subject: [PATCH 033/107] fix(examples): Properly quote arguments passed to ./run --- run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run b/run index c8addbecd..937ebcb6b 100755 --- a/run +++ b/run @@ -12,8 +12,8 @@ if [ $# -lt 1 ]; then exit fi -EXAMPLE=$1; +EXAMPLE="$1"; shift set -x -cargo run --quiet --all-features --example $EXAMPLE $FLAGS -- $@ +cargo run --quiet --all-features --example $EXAMPLE $FLAGS -- "$@" From e4b39390e78adfb9bb5660a22c5bb3c6c2d71df8 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 17 Mar 2020 19:56:42 +1100 Subject: [PATCH 034/107] fix(debuginfo): Improve `.o` handling on MachO (#173) * Change how `MachObject::raw_section` finds segments. Currently `raw_section` finds the given section by assuming that it's within a segment named `__TEXT` or `__DWARF`, finding such a segment, and then searching within that segment. However, this fails for `.o` files, because they have a single nameless segment. As https://github.com/aidansteele/osx-abi-macho-file-format-reference says: > For compactness, an intermediate object file contains only one > segment. This segment has no name; it contains all the sections > destined ultimately for different segments in the final object file. This commit changes `raw_section` so it ignores segment names, and simply searches through all segments. As well as working with `.o` files, the resulting code is a little shorter and simpler. * Allow zero addresses in DWARF units. Because they occur in `.o` files. Without the first change in this commit, debuginfo for entire `.o` files can be missed. Without the second change, debuginfo for the first function (which can start at 0x0) can be missed. --- debuginfo/src/dwarf.rs | 12 +--------- debuginfo/src/macho.rs | 54 +++++++++++++++--------------------------- 2 files changed, 20 insertions(+), 46 deletions(-) diff --git a/debuginfo/src/dwarf.rs b/debuginfo/src/dwarf.rs index 8bd17e1a3..a614ba617 100644 --- a/debuginfo/src/dwarf.rs +++ b/debuginfo/src/dwarf.rs @@ -399,13 +399,6 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { None => return Err(gimli::read::Error::MissingUnitDie.into()), }; - // Clang's LLD might eliminate an entire compilation unit and simply set the low_pc to zero - // and remove all range entries to indicate that it is missing. Skip such a unit, as it does - // not contain any code that can be executed. - if unit.low_pc == 0 && entry.attr(constants::DW_AT_ranges)?.is_none() { - return Ok(None); - } - let language = match entry.attr_value(constants::DW_AT_language)? { Some(AttributeValue::Language(lang)) => language_from_dwarf(lang), _ => Language::Unknown, @@ -483,11 +476,8 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { return Ok(tuple); } - // to go by the logic in dwarf2read a low_pc of 0 can indicate an - // eliminated duplicate when the GNU linker is used. - // TODO: *technically* there could be a relocatable section placed at VA 0 let low_pc = match low_pc { - Some(low_pc) if low_pc != 0 => low_pc, + Some(low_pc) => low_pc, _ => return Ok(tuple), }; diff --git a/debuginfo/src/macho.rs b/debuginfo/src/macho.rs index 1c40593b4..e77990b37 100644 --- a/debuginfo/src/macho.rs +++ b/debuginfo/src/macho.rs @@ -238,17 +238,6 @@ impl<'d> MachObject<'d> { self.symbols() .any(|s| s.name().map_or(false, |n| n.starts_with("__?hidden#"))) } - - /// Locates a segment by its name. - fn find_segment(&self, name: &str) -> Option<&mach::segment::Segment<'d>> { - for segment in &self.macho.segments { - if segment.name().map(|seg| seg == name).unwrap_or(false) { - return Some(segment); - } - } - - None - } } impl fmt::Debug for MachObject<'_> { @@ -353,31 +342,26 @@ impl<'d> Dwarf<'d> for MachObject<'d> { } fn raw_section(&self, section_name: &str) -> Option> { - let segment_name = match section_name { - "eh_frame" => "__TEXT", - _ => "__DWARF", - }; - - let segment = self.find_segment(segment_name)?; - - for section in segment { - if let Ok((header, data)) = section { - if let Ok(sec) = header.name() { - if sec.len() >= 2 && &sec[2..] == section_name { - // In some cases, dsymutil leaves sections headers but removes their data - // from the file. While the addr and size parameters are still set, - // `header.offset` is 0 in that case. We skip them just like the section was - // missing to avoid loading invalid data. - if header.offset == 0 { - return None; + for segment in &self.macho.segments { + for section in segment { + if let Ok((header, data)) = section { + if let Ok(sec) = header.name() { + if sec.len() >= 2 && &sec[2..] == section_name { + // In some cases, dsymutil leaves sections headers but removes their + // data from the file. While the addr and size parameters are still + // set, `header.offset` is 0 in that case. We skip them just like the + // section was missing to avoid loading invalid data. + if header.offset == 0 { + return None; + } + + return Some(DwarfSection { + data: Cow::Borrowed(data), + address: header.addr, + offset: u64::from(header.offset), + align: u64::from(header.align), + }); } - - return Some(DwarfSection { - data: Cow::Borrowed(data), - address: header.addr, - offset: u64::from(header.offset), - align: u64::from(header.align), - }); } } } From a947d5a70bb789358344abc569ea3791ada38a5a Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 18 Mar 2020 15:44:56 +0100 Subject: [PATCH 035/107] build: Bump dependencies (#196) --- .craft.yml | 2 +- Cargo.toml | 4 +- cabi/Cargo.lock | 715 ++++++------------ cabi/include/symbolic.h | 2 +- debuginfo/Cargo.toml | 14 +- debuginfo/src/pdb.rs | 37 +- .../test_objects__pdb_functions.snap | 56 +- demangle/Cargo.toml | 4 +- minidump/Cargo.toml | 6 +- unreal/Cargo.toml | 6 +- unreal/src/container.rs | 6 +- 11 files changed, 292 insertions(+), 560 deletions(-) diff --git a/.craft.yml b/.craft.yml index 54b531f98..5dba8c4cb 100644 --- a/.craft.yml +++ b/.craft.yml @@ -5,7 +5,7 @@ github: repo: symbolic preReleaseCommand: bash scripts/bump-version targets: - # - name: crates + - name: crates - name: pypi - name: github changelogPolicy: simple diff --git a/Cargo.toml b/Cargo.toml index 498466a14..1a219d1d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,8 +56,8 @@ symbolic-unreal = { version = "7.1.0", path = "unreal", optional = true } [dev-dependencies] clap = "2.33.0" -failure = "0.1.5" -walkdir = "2.2.8" +failure = "0.1.7" +walkdir = "2.3.1" [[example]] name = "dump_cfi" diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index feb3fcc4b..17c9f196d 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -2,15 +2,15 @@ # It is not intended for manual editing. [[package]] name = "adler32" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "aho-corasick" -version = "0.7.6" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -18,9 +18,9 @@ name = "anylog" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -28,24 +28,16 @@ name = "apple-crash-report-parser" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "arrayvec" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "autocfg" -version = "0.1.6" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -55,22 +47,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.37" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.31" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -78,12 +70,12 @@ name = "base64" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -91,15 +83,15 @@ name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "block-padding" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -112,7 +104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.3.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -120,8 +112,8 @@ name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -129,41 +121,40 @@ name = "bzip2" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bzip2-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "bzip2-sys 0.1.8+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bzip2-sys" -version = "0.1.7" +version = "0.1.8+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.45" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cfg-if" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -172,7 +163,7 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -180,7 +171,7 @@ name = "cpp_demangle" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -189,7 +180,7 @@ name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -198,8 +189,8 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -221,28 +212,28 @@ name = "elementtree" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure_derive" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -250,11 +241,6 @@ name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "fallible-iterator" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -265,10 +251,10 @@ name = "flate2" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -276,11 +262,6 @@ name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "generic-array" version = "0.12.3" @@ -289,24 +270,15 @@ dependencies = [ "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "getrandom" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "gimli" -version = "0.19.0" -source = "git+https://github.com/jan-auer/gimli?rev=bf8ea0f0079505681c360d3a55d0ac1e9b498df3#bf8ea0f0079505681c360d3a55d0ac1e9b498df3" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -317,8 +289,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "goblin" -version = "0.1.1" -source = "git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e#ee8b997792d37cfb35f8656c028543797425137e" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -332,7 +304,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -342,26 +314,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "iovec" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jobserver" -version = "0.1.17" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -376,15 +345,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.66" +version = "0.2.67" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lock_api" -version = "0.2.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -392,7 +361,7 @@ name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -407,7 +376,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.2.1" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -415,16 +384,16 @@ name = "memmap" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "miniz_oxide" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -432,17 +401,12 @@ name = "msvc-demangler" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "new_debug_unreachable" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "nodrop" -version = "0.1.13" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -515,14 +479,6 @@ dependencies = [ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num_cpus" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "opaque-debug" version = "0.2.3" @@ -530,37 +486,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "parking_lot" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot_core" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pdb" -version = "0.5.0" -source = "git+https://github.com/jan-auer/pdb?rev=6518a17aff69ed26375cf3358632abbd32073931#6518a17aff69ed26375cf3358632abbd32073931" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fallible-iterator 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -570,10 +523,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pest" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -581,47 +534,38 @@ name = "pest_derive" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pest_generator 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_generator 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pest_generator" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pest_meta 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_meta 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pest_meta" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "phf_generator" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "phf_shared" -version = "0.7.24" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "siphasher 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -641,15 +585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro2" -version = "1.0.3" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -662,128 +598,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rdrand" -version = "0.4.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -793,18 +617,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.3.3" +version = "1.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -822,22 +646,13 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "scopeguard" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "scroll" -version = "0.9.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "scroll" @@ -847,24 +662,14 @@ dependencies = [ "scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "scroll_derive" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "scroll_derive" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -882,35 +687,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.100" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.100" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.40" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sha-1" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -926,12 +731,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "siphasher" -version = "0.2.3" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.6.10" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -942,10 +747,10 @@ dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -956,35 +761,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "string_cache" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "string_cache_codegen" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string_cache_shared" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "symbolic" version = "7.1.0" @@ -1004,8 +790,8 @@ name = "symbolic-cabi" version = "7.1.0" dependencies = [ "apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic 7.1.0", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1015,9 +801,9 @@ name = "symbolic-common" version = "7.1.0" dependencies = [ "debugid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1027,30 +813,30 @@ name = "symbolic-debuginfo" version = "7.1.0" dependencies = [ "dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "gimli 0.19.0 (git+https://github.com/jan-auer/gimli?rev=bf8ea0f0079505681c360d3a55d0ac1e9b498df3)", - "goblin 0.1.1 (git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e)", + "gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "goblin 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pdb 0.5.0 (git+https://github.com/jan-auer/pdb?rev=6518a17aff69ed26375cf3358632abbd32073931)", - "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pdb 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic-common 7.1.0", - "zip 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "symbolic-demangle" version = "7.1.0" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1061,10 +847,10 @@ dependencies = [ name = "symbolic-minidump" version = "7.1.0" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic-common 7.1.0", "symbolic-debuginfo 7.1.0", ] @@ -1081,7 +867,7 @@ dependencies = [ name = "symbolic-sourcemap" version = "7.1.0" dependencies = [ - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "sourcemap 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1089,7 +875,7 @@ dependencies = [ name = "symbolic-symcache" version = "7.1.0" dependencies = [ - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic-common 7.1.0", @@ -1102,45 +888,35 @@ version = "7.1.0" dependencies = [ "anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "elementtree 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "syn" -version = "1.0.5" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "synstructure" -version = "0.10.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1156,7 +932,7 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1168,7 +944,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ucd-trie" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1181,17 +957,12 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.8" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "unicode-xid" version = "0.2.0" @@ -1212,18 +983,13 @@ name = "uuid" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "wasi" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" +name = "uuid" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1252,7 +1018,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "zip" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1263,27 +1029,26 @@ dependencies = [ ] [metadata] -"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" +"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" +"checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" "checksum anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b3677680d7f74e87066850ba07976ad03296b6ec4e17bddef05564438ffb86e" "checksum apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6985ceef9ba26133142d9e11448a797b885a4414886da48c98a1e2e44f4cf55" -"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" -"checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" +"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" -"checksum backtrace 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)" = "5180c5a20655b14a819b652fd2378fa5f1697b6c9ddad3e695c2f9cedf6df4e2" -"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" +"checksum backtrace 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "ad235dabf00f36301792cfe82499880ba54c6486be094d1047b02bacb67c14e8" +"checksum backtrace-sys 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "ca797db0057bae1a7aa2eef3283a874695455cecf08a43bfb8507ee0ebc1ed69" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -"checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" +"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" -"checksum bzip2-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6584aa36f5ad4c9247f5323b0a42f37802b37a836f0ad87084d7a33961abe25f" -"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" -"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" -"checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" +"checksum bzip2-sys 0.1.8+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "05305b41c5034ff0e93937ac64133d109b5a2660114ec45e9760bc6816d83038" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4115af6f575a7bc82c613e9e0ed7cc36a5e4fc3a8b54920dc0c820823a31a0d6" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" @@ -1291,37 +1056,33 @@ dependencies = [ "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc94b97c995cfd2f02fc3972ae0f385cd441b50bb7610b59c7c779d5aec7444" "checksum elementtree 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "19c5d32d0ab83734d2d7452047ef901c105991044b7b07da30fe82371a149a25" -"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" -"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b" +"checksum failure_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum fallible-iterator 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eb7217124812dc5672b7476d0c2d20cfe9f7c0f1ba0904b674a9762a0212f72e" "checksum fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" -"checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" -"checksum gimli 0.19.0 (git+https://github.com/jan-auer/gimli?rev=bf8ea0f0079505681c360d3a55d0ac1e9b498df3)" = "" +"checksum gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -"checksum goblin 0.1.1 (git+https://github.com/jan-auer/goblin?rev=ee8b997792d37cfb35f8656c028543797425137e)" = "" +"checksum goblin 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ddd5e3132801a1ac34ac53b97acde50c4685414dd2f291b9ea52afa6f07468c8" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" -"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b1d42ef453b30b7387e113da1c83ab1605d90c5b4e0eb8e96d016ed3b8c160" +"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" -"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" +"checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" +"checksum lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" +"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -"checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" +"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" "checksum msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6584cf122f02fc0396420a116cd395a9a776ec4347dffe1c5119c3fcc917c060" -"checksum new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40f005c60db6e03bae699e414c58bf9aa7ea02a2d0b9bfbcf19286cc4c82b30" -"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" +"checksum new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" "checksum num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" "checksum num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" "checksum num-complex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" @@ -1329,79 +1090,57 @@ dependencies = [ "checksum num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" "checksum num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" -"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" -"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" -"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" -"checksum pdb 0.5.0 (git+https://github.com/jan-auer/pdb?rev=6518a17aff69ed26375cf3358632abbd32073931)" = "" +"checksum parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" +"checksum parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" +"checksum pdb 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b66be5fcea88b52962d3d6fcc5194f1d77666f5aca256926688743a8de1152e4" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e4fb201c5c22a55d8b24fef95f78be52738e5e1361129be1b5e862ecdb6894a" +"checksum pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" -"checksum pest_generator 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9fcf299b5712d06ee128a556c94709aaa04512c4dffb8ead07c5c998447fc0" -"checksum pest_meta 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df43fd99896fd72c485fe47542c7b500e4ac1e8700bf995544d1317a60ded547" -"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" -"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" +"checksum pest_generator 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +"checksum pest_meta 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +"checksum phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" "checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e98a83a9f9b331f54b924e68a66acb1bb35cb01fb0a23645139967abefb697e8" +"checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" "checksum proguard 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bff7e1d393e193d61310f6f2d2192afb008371238065bcf630d6fe9ec2ab52e" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +"checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87" -"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" +"checksum regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8900ebc1363efa7ea1c399ccc32daed870b4002651e0bed86e72d501ebbe0048" +"checksum regex-syntax 0.6.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" -"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +"checksum ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" +"checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" "checksum scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" -"checksum scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f84d114ef17fd144153d608fba7c446b0145d038985e7a8cc5d08bb0ce20383" "checksum scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28" -"checksum scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1aa96c45e7f5a91cb7fabe7b279f02fea7126239fc40b732316e8b6a2d0fcb" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)" = "f4473e8506b213730ff2061073b48fa51dcc66349219e2e7c5608f0296a1d95a" -"checksum serde_derive 1.0.100 (registry+https://github.com/rust-lang/crates.io-index)" = "11e410fde43e157d789fc290d26bc940778ad0fdd47836426fbac36573710dbb" -"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" -"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" +"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" +"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" -"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" -"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" +"checksum siphasher 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "83da420ee8d1a89e640d0948c646c1c088758d3a3c538f943bfa97bdac17929d" +"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" "checksum sourcemap 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8fd57aa9e5cea41b4a3c26a61039fad5585e2154ffe057a2656540a21b03a2d2" "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423" -"checksum string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eea1eee654ef80933142157fdad9dd8bc43cf7c74e999e369263496f04ff4da" -"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" -"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" -"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" +"checksum string_cache 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2940c75beb4e3bf3a494cef919a747a2cb81e52571e212bfbd185074add7208a" +"checksum syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859" +"checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" -"checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" +"checksum ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5" -"checksum zip 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c21bb410afa2bd823a047f5bda3adb62f51074ac7e06263b2c97ecdd47e9fc6" +"checksum zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6df134e83b8f0f8153a094c7b0fd79dfebe437f1d76e7715afa18ed95ebe2fd7" diff --git a/cabi/include/symbolic.h b/cabi/include/symbolic.h index 347018ab5..bab0d10a2 100644 --- a/cabi/include/symbolic.h +++ b/cabi/include/symbolic.h @@ -3,7 +3,7 @@ #ifndef SYMBOLIC_H_INCLUDED #define SYMBOLIC_H_INCLUDED -/* Generated with cbindgen:0.12.2 */ +/* Generated with cbindgen:0.13.1 */ /* Warning, this file is autogenerated. Do not modify this manually. */ diff --git a/debuginfo/Cargo.toml b/debuginfo/Cargo.toml index c7ce88c18..70b55cfcc 100644 --- a/debuginfo/Cargo.toml +++ b/debuginfo/Cargo.toml @@ -24,18 +24,18 @@ dmsort = "1.0.0" failure = "0.1.5" fallible-iterator = "0.2.0" flate2 = { version = "1.0.13", features = ["rust_backend"], default-features = false } -gimli = { git = "https://github.com/jan-auer/gimli", rev = "bf8ea0f0079505681c360d3a55d0ac1e9b498df3", features = ["read", "std"], default-features = false } -goblin = { git = "https://github.com/jan-auer/goblin", rev = "ee8b997792d37cfb35f8656c028543797425137e" } +gimli = { version = "0.20.0", features = ["read", "std"], default-features = false } +goblin = "0.2.1" lazycell = "1.2.1" -lazy_static = "1.3.0" -pdb = { git = "https://github.com/jan-auer/pdb", rev = "6518a17aff69ed26375cf3358632abbd32073931" } -parking_lot = "0.8.0" +lazy_static = "1.4.0" +pdb = "0.6.0" +parking_lot = "0.10.0" pest = "2.1.1" pest_derive = "2.1.0" -regex = "1.1.9" +regex = "1.3.5" serde = { version = "1.0.94", features = ["derive"] } serde_json = "1.0.40" -smallvec = "0.6.10" +smallvec = "1.2.0" symbolic-common = { version = "7.1.0", path = "../common" } zip = "0.5.2" diff --git a/debuginfo/src/pdb.rs b/debuginfo/src/pdb.rs index 998b8a685..fbb726d4b 100644 --- a/debuginfo/src/pdb.rs +++ b/debuginfo/src/pdb.rs @@ -39,10 +39,6 @@ pub enum PdbErrorKind { #[fail(display = "invalid pdb file")] BadObject, - /// An inline record cannot be resolved due to a missing id stream. - #[fail(display = "missing id stream to resolve inline function")] - MissingIdStream, - /// An inline record was encountered without an inlining parent. #[fail(display = "unexpected inline function without parent")] UnexpectedInline, @@ -410,7 +406,7 @@ type IdMap<'d> = ItemMap<'d, pdb::IdIndex>; struct PdbStreams<'d> { debug_info: Arc>, type_info: pdb::TypeInformation<'d>, - id_info: Option>, + id_info: pdb::IdInformation<'d>, } impl<'d> PdbStreams<'d> { @@ -431,12 +427,11 @@ impl<'d> PdbStreams<'d> { } } - fn id_map(&self) -> Option> { - let id_info = self.id_info.as_ref()?; - Some(ItemMap { - iter: id_info.iter(), - finder: id_info.finder(), - }) + fn id_map(&self) -> IdMap<'_> { + ItemMap { + iter: self.id_info.iter(), + finder: self.id_info.finder(), + } } } @@ -456,7 +451,7 @@ struct PdbDebugInfo<'d> { /// Lazy loaded map of the TPI stream. type_map: RefCell>, /// Lazy loaded map of the IPI stream. - id_map: Option>>, + id_map: RefCell>, } impl<'d> PdbDebugInfo<'d> { @@ -465,7 +460,7 @@ impl<'d> PdbDebugInfo<'d> { let module_infos = modules.iter().map(|_| LazyCell::new()).collect(); let module_exports = RefCell::new(BTreeMap::new()); let type_map = RefCell::new(streams.type_map()); - let id_map = streams.id_map().map(RefCell::new); + let id_map = RefCell::new(streams.id_map()); // Avoid deadlocks by only covering the two access to the address map and string table. For // instance, `pdb.symbol_map()` requires a mutable borrow of the PDB as well. @@ -644,7 +639,7 @@ impl DebugSession for PdbDebugSession<'_> { struct TypeFormatter<'u, 'd> { unit: &'u Unit<'d>, type_map: RefMut<'u, TypeMap<'d>>, - id_map: Option>>, + id_map: RefMut<'u, IdMap<'d>>, } impl<'u, 'd> TypeFormatter<'u, 'd> { @@ -653,7 +648,7 @@ impl<'u, 'd> TypeFormatter<'u, 'd> { Self { unit, type_map: unit.debug_info.type_map.borrow_mut(), - id_map: unit.debug_info.id_map.as_ref().map(|r| r.borrow_mut()), + id_map: unit.debug_info.id_map.borrow_mut(), } } @@ -668,11 +663,7 @@ impl<'u, 'd> TypeFormatter<'u, 'd> { None => return Ok(write!(target, "")?), }; - let id = match self.id_map { - Some(ref mut id_map) => id_map.try_get(index)?, - None => return Err(PdbErrorKind::MissingIdStream.into()), - }; - + let id = self.id_map.try_get(index)?; match id.parse() { Ok(pdb::IdData::Function(data)) => { if let Some(scope) = data.scope { @@ -1006,7 +997,11 @@ impl<'s> Unit<'s> { // Depending on the compiler version, the inlinee table might not be sorted. Since constant // search through inlinees is too slow (due to repeated parsing), but Inlinees are rather // small structures, it is relatively cheap to collect them into an in-memory index. - let inlinees: BTreeMap<_, _> = self.module.inlinees()?.map(|i| (i.index(), i)).collect()?; + let inlinees: BTreeMap<_, _> = self + .module + .inlinees()? + .map(|i| Ok((i.index(), i))) + .collect()?; let mut depth = 0; let mut inc_next = false; diff --git a/debuginfo/tests/snapshots/test_objects__pdb_functions.snap b/debuginfo/tests/snapshots/test_objects__pdb_functions.snap index 95033669a..4977524c5 100644 --- a/debuginfo/tests/snapshots/test_objects__pdb_functions.snap +++ b/debuginfo/tests/snapshots/test_objects__pdb_functions.snap @@ -1,5 +1,5 @@ --- -created: "2019-09-12T13:41:17.828024Z" +created: "2020-03-18T09:55:50.170812Z" creator: insta@0.8.2 source: debuginfo/tests/test_objects.rs expression: "FunctionsDebug(&functions[..10], 0)" @@ -24,7 +24,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x1011: google_breakpad::CrashGenerationClient::IsRegistered (0x4) 0x1011: crash_generation_client.cc:319 (c:\projects\breakpad-tools\deps\breakpad\src\client\windows\crash_generation) - > 0x1064: google_breakpad::CrashGenerationClient::SignalCrashEventAndWait (0x15c) + > 0x1064: google_breakpad::CrashGenerationClient::SignalCrashEventAndWait (0xa3) 0x1064: crash_generation_client.cc:349 (c:\projects\breakpad-tools\deps\breakpad\src\client\windows\crash_generation) 0x1084: crash_generation_client.cc:350 (c:\projects\breakpad-tools\deps\breakpad\src\client\windows\crash_generation) 0x109e: crash_generation_client.cc:351 (c:\projects\breakpad-tools\deps\breakpad\src\client\windows\crash_generation) @@ -41,7 +41,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x116c: xstring:2426 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x116d: xstring:2425 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1123: std::basic_string,std::allocator >::_Tidy_deallocate (0x1a6) + > 0x1123: std::basic_string,std::allocator >::_Tidy_deallocate (0x50) 0x1123: xstring:3902 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x112b: xstring:3907 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1158: xstring:3910 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -61,13 +61,13 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x112b: xmemory0:1030 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x116d: xmemory0:1030 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1134: std::_Deallocate (0x156) + > 0x1134: std::_Deallocate (0x3f) 0x1134: xmemory0:211 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x113c: xmemory0:213 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x114e: xmemory0:217 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x116d: xmemory0:213 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x113c: std::_Adjust_manually_vector_aligned (0x154) + > 0x113c: std::_Adjust_manually_vector_aligned (0x37) 0x113c: xmemory0:119 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1142: xmemory0:137 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1144: xmemory0:138 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -88,7 +88,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x12c1: xstring:2627 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x12ca: xstring:2623 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x11d1: std::basic_string,std::allocator >::_Reallocate_for (0x344) + > 0x11d1: std::basic_string,std::allocator >::_Reallocate_for (0xfe) 0x11d1: xstring:3804 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x11dd: xstring:3811 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x120f: xstring:3813 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -100,7 +100,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x128f: xstring:3820 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x12ca: xstring:3806 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1268: std::basic_string,std::allocator >::assign::__l2::::operator() (0x299) + > 0x1268: std::basic_string,std::allocator >::assign::__l2::::operator() (0x1e) 0x1268: xstring:2624 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1277: xstring:2624 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x127d: xstring:2625 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -124,14 +124,14 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x1212: std::allocator::allocate (0x53) 0x1212: xmemory0:1035 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x121f: std::_Allocate (0x29a) + > 0x121f: std::_Allocate (0x46) 0x121f: xmemory0:192 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1229: xmemory0:194 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1252: xmemory0:198 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1256: xmemory0:200 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1263: xmemory0:203 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1229: std::_Allocate_manually_vector_aligned (0x26b) + > 0x1229: std::_Allocate_manually_vector_aligned (0x27) 0x1229: xmemory0:94 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x122c: xmemory0:95 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1234: xmemory0:101 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -145,12 +145,12 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x1256: std::_Default_allocate_traits::_Allocate (0x9) 0x1256: xmemory0:51 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1212: std::_Get_size_of_n (0x21f) + > 0x1212: std::_Get_size_of_n (0xd) 0x1212: xmemory0:24 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1215: xmemory0:25 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x121c: xmemory0:28 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x11dd: std::basic_string,std::allocator >::_Calculate_growth (0x22a) + > 0x11dd: std::basic_string,std::allocator >::_Calculate_growth (0x32) 0x11dd: xstring:3784 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x11e8: xstring:3785 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x11ea: xstring:3787 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -164,12 +164,12 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x128f: std::allocator::deallocate (0x2d) 0x128f: xmemory0:1030 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1298: std::_Deallocate (0x2ba) + > 0x1298: std::_Deallocate (0x24) 0x1298: xmemory0:211 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x12a0: xmemory0:213 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x12b2: xmemory0:217 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x12a0: std::_Adjust_manually_vector_aligned (0x2b8) + > 0x12a0: std::_Adjust_manually_vector_aligned (0x12) 0x12a0: xmemory0:119 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x12a6: xmemory0:137 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x12a8: xmemory0:138 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -186,7 +186,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x11a9: wchar.h:245 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) 0x11b3: wchar.h:245 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) - > 0x11a0: std::_String_val >::_Myptr (0x1a9) + > 0x11a0: std::_String_val >::_Myptr (0x9) 0x11a0: xstring:1780 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x11a2: xstring:1781 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x11a7: xstring:1783 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -213,11 +213,11 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x1334: std::basic_string,std::allocator >::_Assign_rv_contents (0x1d) 0x1334: xstring:2291 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1334: std::basic_string,std::allocator >::_Assign_rv_contents_with_alloc_always_equal (0x344) + > 0x1334: std::basic_string,std::allocator >::_Assign_rv_contents_with_alloc_always_equal (0x1d) 0x1334: xstring:2331 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1344: xstring:2332 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1344: std::basic_string,std::allocator >::_Tidy_init (0x351) + > 0x1344: std::basic_string,std::allocator >::_Tidy_init (0xd) 0x1344: xstring:3891 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1347: xstring:3892 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x134e: xstring:3895 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -225,7 +225,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x134e: std::_WChar_traits::assign (0x3) 0x134e: iosfwd:341 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x12ec: std::basic_string,std::allocator >::_Tidy_deallocate (0x36f) + > 0x12ec: std::basic_string,std::allocator >::_Tidy_deallocate (0x72) 0x12ec: xstring:3902 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x12f4: xstring:3907 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1321: xstring:3910 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -245,13 +245,13 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x12f4: xmemory0:1030 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1358: xmemory0:1030 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x12fd: std::_Deallocate (0x31f) + > 0x12fd: std::_Deallocate (0x61) 0x12fd: xmemory0:211 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1305: xmemory0:213 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1317: xmemory0:217 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1358: xmemory0:213 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1305: std::_Adjust_manually_vector_aligned (0x31d) + > 0x1305: std::_Adjust_manually_vector_aligned (0x59) 0x1305: xmemory0:119 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x130b: xmemory0:137 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x130d: xmemory0:138 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -268,7 +268,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x1379: corecrt_wstdio.h:1542 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) 0x13a1: corecrt_wstdio.h:1545 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) - > 0x1379: _vswprintf_s_l (0x396) + > 0x1379: _vswprintf_s_l (0x28) 0x1379: corecrt_wstdio.h:1265 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) 0x1396: corecrt_wstdio.h:1269 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) @@ -277,7 +277,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x13b4: corecrt_wstdio.h:1727 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) 0x13e3: corecrt_wstdio.h:1730 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) - > 0x13b4: _vsnwprintf_s_l (0x3d8) + > 0x13b4: _vsnwprintf_s_l (0x2f) 0x13b4: corecrt_wstdio.h:1084 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) 0x13d8: corecrt_wstdio.h:1088 (c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt) @@ -361,7 +361,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x1675: list:1228 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x16a3: list:1228 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x165c: std::list >::_Insert (0x6f9) + > 0x165c: std::list >::_Insert (0x52) 0x165c: list:1001 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1662: list:1003 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1675: list:1002 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -371,13 +371,13 @@ expression: "FunctionsDebug(&functions[..10], 0)" 0x16a9: list:1005 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x16ac: list:1006 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1681: std::list >::_Incsize (0x6b0) + > 0x1681: std::list >::_Incsize (0x28) 0x1681: list:1859 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1693: list:1860 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x169e: list:1861 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x16a3: list:1861 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x162e: google_breakpad::ExceptionHandler::set_dump_path (0x66e) + > 0x162e: google_breakpad::ExceptionHandler::set_dump_path (0x2e) 0x162e: exception_handler.h:222 (c:\projects\breakpad-tools\deps\breakpad\src\client\windows\handler) 0x164a: exception_handler.h:223 (c:\projects\breakpad-tools\deps\breakpad\src\client\windows\handler) 0x1652: exception_handler.h:224 (c:\projects\breakpad-tools\deps\breakpad\src\client\windows\handler) @@ -385,7 +385,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x164a: std::basic_string,std::allocator >::c_str (0x8) 0x164a: xstring:3219 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x164a: std::_String_val >::_Myptr (0x650) + > 0x164a: std::_String_val >::_Myptr (0x8) 0x164a: xstring:1792 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1650: xstring:1794 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -395,11 +395,11 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x1650: std::_Unfancy (0x2) 0x1650: xstddef:265 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1631: std::basic_string,std::allocator >::operator= (0x635) + > 0x1631: std::basic_string,std::allocator >::operator= (0x19) 0x1631: xstring:2432 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1635: xstring:2446 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x1635: std::_String_val >::_Myptr (0x643) + > 0x1635: std::_String_val >::_Myptr (0xa) 0x1635: xstring:1792 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x1639: xstring:1791 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x163b: xstring:1792 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) @@ -424,7 +424,7 @@ expression: "FunctionsDebug(&functions[..10], 0)" > 0x16ec: std::_Compressed_pair,std::_Vector_val >,1>::{ctor} (0x14) 0x16ec: xutility:311 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) - > 0x16ec: std::_Vector_val >::{ctor} (0x6ff) + > 0x16ec: std::_Vector_val >::{ctor} (0x14) 0x16ec: vector:437 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x16f2: vector:438 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) 0x16f9: vector:439 (c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.13.26128\include) diff --git a/demangle/Cargo.toml b/demangle/Cargo.toml index 196fde6d9..46278dba8 100644 --- a/demangle/Cargo.toml +++ b/demangle/Cargo.toml @@ -22,8 +22,8 @@ exclude = [ [dependencies] cpp_demangle = "0.2.14" msvc-demangler = "0.8.0" -rustc-demangle = "0.1.15" +rustc-demangle = "0.1.16" symbolic-common = { version = "7.1.0", path = "../common" } [build-dependencies] -cc = "1.0.37" +cc = "1.0.50" diff --git a/minidump/Cargo.toml b/minidump/Cargo.toml index c8aec4b35..82a17ca8d 100644 --- a/minidump/Cargo.toml +++ b/minidump/Cargo.toml @@ -28,14 +28,14 @@ include = [ [dependencies] failure = "0.1.5" -lazy_static = "1.3.0" -regex = "1.1.9" +lazy_static = "1.4.0" +regex = "1.3.5" serde = { version = "1.0.94", optional = true } symbolic-common = { version = "7.1.0", path = "../common" } symbolic-debuginfo = { version = "7.1.0", path = "../debuginfo" } [build-dependencies] -cc = { version = "1.0.37", features = ["parallel"] } +cc = { version = "1.0.50", features = ["parallel"] } [dev-dependencies] insta = "0.8.1" diff --git a/unreal/Cargo.toml b/unreal/Cargo.toml index 4df17bb05..83dc8e48a 100644 --- a/unreal/Cargo.toml +++ b/unreal/Cargo.toml @@ -28,10 +28,10 @@ bytes = "0.4.12" chrono = "0.4.7" elementtree = "0.5.0" failure = "0.1.5" -lazy_static = "1.3.0" +lazy_static = "1.4.0" flate2 = { version = "1.0.13", features = ["rust_backend"], default-features = false } -regex = "1.1.9" -scroll = { version = "0.9.2", features = ["derive"] } +regex = "1.3.5" +scroll = { version = "0.10.1", features = ["derive"] } serde = { version = "1.0.94", optional = true, features = ["derive"] } [dev-dependencies] diff --git a/unreal/src/container.rs b/unreal/src/container.rs index 571e28cde..c5da0fb89 100644 --- a/unreal/src/container.rs +++ b/unreal/src/container.rs @@ -44,9 +44,8 @@ impl fmt::Display for AnsiString { impl TryFromCtx<'_, Endian> for AnsiString { type Error = scroll::Error; - type Size = usize; - fn try_from_ctx(data: &[u8], context: Endian) -> Result<(Self, Self::Size), Self::Error> { + fn try_from_ctx(data: &[u8], context: Endian) -> Result<(Self, usize), Self::Error> { let mut offset = 0; // Read the length and data of this string @@ -85,9 +84,8 @@ struct Unreal4FileMeta { impl TryFromCtx<'_, usize> for Unreal4FileMeta { type Error = scroll::Error; - type Size = usize; - fn try_from_ctx(data: &[u8], file_offset: usize) -> Result<(Self, Self::Size), Self::Error> { + fn try_from_ctx(data: &[u8], file_offset: usize) -> Result<(Self, usize), Self::Error> { let mut offset = 0; let index = data.gread_with::(&mut offset, scroll::LE)? as usize; let file_name = data.gread_with(&mut offset, scroll::LE)?; From 64f04f026fe8e8f890e0b5f6e0ca02e3562ef458 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 18 Mar 2020 15:58:40 +0100 Subject: [PATCH 036/107] meta: Changelog for 7.1.1 --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fbd428d7..97463fdda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 7.1.1 + +**Features**: + +- Implement `serde::{Deserialize, Serialize}` for `ProcessResult` (#188) +- Implement `serde::{Deserialize, Serialize}` for `Name` (#191) +- Update the `gimli`, `goblin` and `pdb` libraries (#196) + +**Bug Fixes**: + +- Do not skip DWARF units with a `DW_AT_low_pc` of `0` (#173) +- Search for MachO sections in all segments (#173) +- Fix processing Hermes source maps with non-hermes stack frames (#189) +- Fix decompression of GNU compressed debug sections (`.zdebug_info`) (#192) + ## 7.1.0 _This release is not available on crates.io_ From 4659e881b39534aaf6f0ed76174a2118a5d2413a Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 18 Mar 2020 15:59:05 +0100 Subject: [PATCH 037/107] release: 7.1.1 --- Cargo.toml | 18 +++++++-------- cabi/Cargo.lock | 52 ++++++++++++++++++++++---------------------- cabi/Cargo.toml | 4 ++-- common/Cargo.toml | 2 +- debuginfo/Cargo.toml | 4 ++-- demangle/Cargo.toml | 4 ++-- minidump/Cargo.toml | 6 ++--- proguard/Cargo.toml | 4 ++-- sourcemap/Cargo.toml | 2 +- symcache/Cargo.toml | 6 ++--- unreal/Cargo.toml | 2 +- 11 files changed, 52 insertions(+), 52 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1a219d1d5..75cc862e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", @@ -45,14 +45,14 @@ unreal = ["symbolic-unreal"] unreal-serde = ["unreal", "common-serde", "symbolic-unreal/with-serde"] [dependencies] -symbolic-common = { version = "7.1.0", path = "common" } -symbolic-debuginfo = { version = "7.1.0", path = "debuginfo", optional = true } -symbolic-demangle = { version = "7.1.0", path = "demangle", optional = true } -symbolic-minidump = { version = "7.1.0", path = "minidump", optional = true } -symbolic-proguard = { version = "7.1.0", path = "proguard", optional = true } -symbolic-sourcemap = { version = "7.1.0", path = "sourcemap", optional = true } -symbolic-symcache = { version = "7.1.0", path = "symcache", optional = true } -symbolic-unreal = { version = "7.1.0", path = "unreal", optional = true } +symbolic-common = { version = "7.1.1", path = "common" } +symbolic-debuginfo = { version = "7.1.1", path = "debuginfo", optional = true } +symbolic-demangle = { version = "7.1.1", path = "demangle", optional = true } +symbolic-minidump = { version = "7.1.1", path = "minidump", optional = true } +symbolic-proguard = { version = "7.1.1", path = "proguard", optional = true } +symbolic-sourcemap = { version = "7.1.1", path = "sourcemap", optional = true } +symbolic-symcache = { version = "7.1.1", path = "symcache", optional = true } +symbolic-unreal = { version = "7.1.1", path = "unreal", optional = true } [dev-dependencies] clap = "2.33.0" diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index 17c9f196d..bd29b1c74 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -773,32 +773,32 @@ dependencies = [ [[package]] name = "symbolic" -version = "7.1.0" +version = "7.1.1" dependencies = [ - "symbolic-common 7.1.0", - "symbolic-debuginfo 7.1.0", - "symbolic-demangle 7.1.0", - "symbolic-minidump 7.1.0", - "symbolic-proguard 7.1.0", - "symbolic-sourcemap 7.1.0", - "symbolic-symcache 7.1.0", - "symbolic-unreal 7.1.0", + "symbolic-common 7.1.1", + "symbolic-debuginfo 7.1.1", + "symbolic-demangle 7.1.1", + "symbolic-minidump 7.1.1", + "symbolic-proguard 7.1.1", + "symbolic-sourcemap 7.1.1", + "symbolic-symcache 7.1.1", + "symbolic-unreal 7.1.1", ] [[package]] name = "symbolic-cabi" -version = "7.1.0" +version = "7.1.1" dependencies = [ "apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic 7.1.0", + "symbolic 7.1.1", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "symbolic-common" -version = "7.1.0" +version = "7.1.1" dependencies = [ "debugid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -810,7 +810,7 @@ dependencies = [ [[package]] name = "symbolic-debuginfo" -version = "7.1.0" +version = "7.1.1" dependencies = [ "dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -828,44 +828,44 @@ dependencies = [ "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.0", + "symbolic-common 7.1.1", "zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "symbolic-demangle" -version = "7.1.0" +version = "7.1.1" dependencies = [ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.0", + "symbolic-common 7.1.1", ] [[package]] name = "symbolic-minidump" -version = "7.1.0" +version = "7.1.1" dependencies = [ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.0", - "symbolic-debuginfo 7.1.0", + "symbolic-common 7.1.1", + "symbolic-debuginfo 7.1.1", ] [[package]] name = "symbolic-proguard" -version = "7.1.0" +version = "7.1.1" dependencies = [ "proguard 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.0", + "symbolic-common 7.1.1", ] [[package]] name = "symbolic-sourcemap" -version = "7.1.0" +version = "7.1.1" dependencies = [ "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "sourcemap 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -873,18 +873,18 @@ dependencies = [ [[package]] name = "symbolic-symcache" -version = "7.1.0" +version = "7.1.1" dependencies = [ "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.0", - "symbolic-debuginfo 7.1.0", + "symbolic-common 7.1.1", + "symbolic-debuginfo 7.1.1", ] [[package]] name = "symbolic-unreal" -version = "7.1.0" +version = "7.1.1" dependencies = [ "anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/cabi/Cargo.toml b/cabi/Cargo.toml index b70044783..9db018158 100644 --- a/cabi/Cargo.toml +++ b/cabi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-cabi" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", @@ -30,4 +30,4 @@ serde_json = "1.0.40" uuid = "0.7.4" failure = "0.1.5" apple-crash-report-parser = { version = "0.3.1", features = ["with_serde"] } -symbolic = { version = "7.1.0", path = "..", features = ["debuginfo", "demangle", "minidump", "proguard", "sourcemap", "symcache", "unreal-serde"] } +symbolic = { version = "7.1.1", path = "..", features = ["debuginfo", "demangle", "minidump", "proguard", "sourcemap", "symcache", "unreal-serde"] } diff --git a/common/Cargo.toml b/common/Cargo.toml index e581abdb2..e7f1def01 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-common" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", diff --git a/debuginfo/Cargo.toml b/debuginfo/Cargo.toml index 70b55cfcc..e8c0b8c58 100644 --- a/debuginfo/Cargo.toml +++ b/debuginfo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-debuginfo" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", @@ -36,7 +36,7 @@ regex = "1.3.5" serde = { version = "1.0.94", features = ["derive"] } serde_json = "1.0.40" smallvec = "1.2.0" -symbolic-common = { version = "7.1.0", path = "../common" } +symbolic-common = { version = "7.1.1", path = "../common" } zip = "0.5.2" [dev-dependencies] diff --git a/demangle/Cargo.toml b/demangle/Cargo.toml index 46278dba8..ed136f996 100644 --- a/demangle/Cargo.toml +++ b/demangle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-demangle" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", @@ -23,7 +23,7 @@ exclude = [ cpp_demangle = "0.2.14" msvc-demangler = "0.8.0" rustc-demangle = "0.1.16" -symbolic-common = { version = "7.1.0", path = "../common" } +symbolic-common = { version = "7.1.1", path = "../common" } [build-dependencies] cc = "1.0.50" diff --git a/minidump/Cargo.toml b/minidump/Cargo.toml index 82a17ca8d..f52fa41ed 100644 --- a/minidump/Cargo.toml +++ b/minidump/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-minidump" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", @@ -31,8 +31,8 @@ failure = "0.1.5" lazy_static = "1.4.0" regex = "1.3.5" serde = { version = "1.0.94", optional = true } -symbolic-common = { version = "7.1.0", path = "../common" } -symbolic-debuginfo = { version = "7.1.0", path = "../debuginfo" } +symbolic-common = { version = "7.1.1", path = "../common" } +symbolic-debuginfo = { version = "7.1.1", path = "../debuginfo" } [build-dependencies] cc = { version = "1.0.50", features = ["parallel"] } diff --git a/proguard/Cargo.toml b/proguard/Cargo.toml index 6d9ce1193..31c3e2e39 100644 --- a/proguard/Cargo.toml +++ b/proguard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-proguard" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", @@ -18,4 +18,4 @@ edition = "2018" [dependencies] proguard = "2.0.0" -symbolic-common = { version = "7.1.0", path = "../common" } +symbolic-common = { version = "7.1.1", path = "../common" } diff --git a/sourcemap/Cargo.toml b/sourcemap/Cargo.toml index 376f441bc..3dc198dc9 100644 --- a/sourcemap/Cargo.toml +++ b/sourcemap/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-sourcemap" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", diff --git a/symcache/Cargo.toml b/symcache/Cargo.toml index bf34ab2dc..8c255ce54 100644 --- a/symcache/Cargo.toml +++ b/symcache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-symcache" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", @@ -23,8 +23,8 @@ exclude = [ failure = "0.1.5" fnv = "1.0.6" num = "0.2.1" -symbolic-common = { version = "7.1.0", path = "../common" } -symbolic-debuginfo = { version = "7.1.0", path = "../debuginfo" } +symbolic-common = { version = "7.1.1", path = "../common" } +symbolic-debuginfo = { version = "7.1.1", path = "../debuginfo" } [dev-dependencies] insta = "0.8.1" diff --git a/unreal/Cargo.toml b/unreal/Cargo.toml index 83dc8e48a..9339a4ba5 100644 --- a/unreal/Cargo.toml +++ b/unreal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-unreal" -version = "7.1.0" +version = "7.1.1" license = "MIT" authors = [ "Armin Ronacher ", From fda3f2055e5405e4867f32eba859243476382cd1 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Thu, 19 Mar 2020 09:26:04 +0100 Subject: [PATCH 038/107] meta(vscode): Update recommended extensions --- .vscode/extensions.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d7ba62a23..51981c2ff 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,11 +2,17 @@ // See http://go.microsoft.com/fwlink/?LinkId=827846 // for the documentation about the extensions.json format "recommendations": [ - "EditorConfig.editorconfig", + // C++ language support "ms-vscode.cpptools", - "rust-lang.rust", + // TOML language support "bungcip.better-toml", - "xoronic.pestfile", - "serayuzgur.crates" + // Rust language server + "matklad.rust-analyzer", + // Crates.io dependency versions + "serayuzgur.crates", + // Debugger support for Rust and native + "vadimcn.vscode-lldb", + // PEST syntax support + "xoronic.pestfile" ] } From f1711b2f6a03e76c0d5f318b681977697c756c09 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Tue, 24 Mar 2020 12:49:43 +0100 Subject: [PATCH 039/107] build: Upgrade UUID-related dependencies (#199) --- cabi/Cargo.lock | 35 ++++++++++++++--------------------- cabi/Cargo.toml | 3 +-- cabi/src/core.rs | 2 +- common/Cargo.toml | 4 ++-- proguard/Cargo.toml | 2 +- 5 files changed, 19 insertions(+), 27 deletions(-) diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index bd29b1c74..b0d87ceaa 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -25,14 +25,14 @@ dependencies = [ [[package]] name = "apple-crash-report-parser" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -185,13 +185,13 @@ dependencies = [ [[package]] name = "debugid" -version = "0.5.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -593,13 +593,13 @@ dependencies = [ [[package]] name = "proguard" -version = "2.0.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -789,23 +789,22 @@ dependencies = [ name = "symbolic-cabi" version = "7.1.1" dependencies = [ - "apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "apple-crash-report-parser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic 7.1.1", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "symbolic-common" version = "7.1.1" dependencies = [ - "debugid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "debugid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -859,7 +858,7 @@ dependencies = [ name = "symbolic-proguard" version = "7.1.1" dependencies = [ - "proguard 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proguard 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "symbolic-common 7.1.1", ] @@ -980,18 +979,13 @@ dependencies = [ [[package]] name = "uuid" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "uuid" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "winapi" version = "0.3.8" @@ -1032,7 +1026,7 @@ dependencies = [ "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" "checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" "checksum anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b3677680d7f74e87066850ba07976ad03296b6ec4e17bddef05564438ffb86e" -"checksum apple-crash-report-parser 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6985ceef9ba26133142d9e11448a797b885a4414886da48c98a1e2e44f4cf55" +"checksum apple-crash-report-parser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3a4a2dcbf6f97f12fb3b01b2b46e7d110b0e5bb3da741a36182bc939be365b8e" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "ad235dabf00f36301792cfe82499880ba54c6486be094d1047b02bacb67c14e8" @@ -1052,7 +1046,7 @@ dependencies = [ "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4115af6f575a7bc82c613e9e0ed7cc36a5e4fc3a8b54920dc0c820823a31a0d6" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum debugid 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "751dad1347b163aa77262232129c7ac46e2810485c9b095ac9f7caf200e97df4" +"checksum debugid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "36294832663d7747e17832f32492daedb65ae665d5ae1b369edabf52a2a92afc" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc94b97c995cfd2f02fc3972ae0f385cd441b50bb7610b59c7c779d5aec7444" "checksum elementtree 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "19c5d32d0ab83734d2d7452047ef901c105991044b7b07da30fe82371a149a25" @@ -1104,7 +1098,7 @@ dependencies = [ "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435" -"checksum proguard 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bff7e1d393e193d61310f6f2d2192afb008371238065bcf630d6fe9ec2ab52e" +"checksum proguard 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d451cea38a9b7b2ffe89ff7c443c0a4c55f3eab20114a73c4d8c1b362cf3fb1b" "checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8900ebc1363efa7ea1c399ccc32daed870b4002651e0bed86e72d501ebbe0048" @@ -1137,7 +1131,6 @@ dependencies = [ "checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" "checksum uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" diff --git a/cabi/Cargo.toml b/cabi/Cargo.toml index 9db018158..18feebbe0 100644 --- a/cabi/Cargo.toml +++ b/cabi/Cargo.toml @@ -27,7 +27,6 @@ lto = true [dependencies] serde_json = "1.0.40" -uuid = "0.7.4" failure = "0.1.5" -apple-crash-report-parser = { version = "0.3.1", features = ["with_serde"] } +apple-crash-report-parser = { version = "0.4.0", features = ["with_serde"] } symbolic = { version = "7.1.1", path = "..", features = ["debuginfo", "demangle", "minidump", "proguard", "sourcemap", "symcache", "unreal-serde"] } diff --git a/cabi/src/core.rs b/cabi/src/core.rs index bc6e659ed..2c721162f 100644 --- a/cabi/src/core.rs +++ b/cabi/src/core.rs @@ -7,7 +7,7 @@ use std::slice; use std::str; use failure::Error; -use uuid::Uuid; +use symbolic::common::Uuid; use crate::utils::{set_panic_hook, Panic, LAST_ERROR}; diff --git a/common/Cargo.toml b/common/Cargo.toml index e7f1def01..d5f36c12d 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -17,12 +17,12 @@ ProGuard optimized Android apps. edition = "2018" [dependencies] -debugid = "0.5.3" +debugid = "0.7.1" failure = "0.1.5" memmap = "0.7.0" stable_deref_trait = "1.1.1" serde_ = { package = "serde", version = "1.0.88", optional = true, features = ["derive"] } -uuid = "0.7.4" +uuid = "0.8.1" [features] default = [] diff --git a/proguard/Cargo.toml b/proguard/Cargo.toml index 31c3e2e39..313ae3cf3 100644 --- a/proguard/Cargo.toml +++ b/proguard/Cargo.toml @@ -17,5 +17,5 @@ optimized applications. edition = "2018" [dependencies] -proguard = "2.0.0" +proguard = "3.0.0" symbolic-common = { version = "7.1.1", path = "../common" } From 16251b966367d41d8c1fbedd8005275bd28757c6 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Tue, 24 Mar 2020 12:52:42 +0100 Subject: [PATCH 040/107] meta: Changelog for 7.2.0 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97463fdda..2d4c97577 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 7.2.0 + +**Features**: + +- Upgrade UUID-related dependencies (#199) + ## 7.1.1 **Features**: From 6a2c6043b9ad94d2b7a48c089c90d4fd011e33f0 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Tue, 24 Mar 2020 15:37:48 +0100 Subject: [PATCH 041/107] release: 7.2.0 --- Cargo.toml | 18 +++++++-------- cabi/Cargo.lock | 52 ++++++++++++++++++++++---------------------- cabi/Cargo.toml | 4 ++-- common/Cargo.toml | 2 +- debuginfo/Cargo.toml | 4 ++-- demangle/Cargo.toml | 4 ++-- minidump/Cargo.toml | 6 ++--- proguard/Cargo.toml | 4 ++-- sourcemap/Cargo.toml | 2 +- symcache/Cargo.toml | 6 ++--- unreal/Cargo.toml | 2 +- 11 files changed, 52 insertions(+), 52 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 75cc862e4..d98e50aaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -45,14 +45,14 @@ unreal = ["symbolic-unreal"] unreal-serde = ["unreal", "common-serde", "symbolic-unreal/with-serde"] [dependencies] -symbolic-common = { version = "7.1.1", path = "common" } -symbolic-debuginfo = { version = "7.1.1", path = "debuginfo", optional = true } -symbolic-demangle = { version = "7.1.1", path = "demangle", optional = true } -symbolic-minidump = { version = "7.1.1", path = "minidump", optional = true } -symbolic-proguard = { version = "7.1.1", path = "proguard", optional = true } -symbolic-sourcemap = { version = "7.1.1", path = "sourcemap", optional = true } -symbolic-symcache = { version = "7.1.1", path = "symcache", optional = true } -symbolic-unreal = { version = "7.1.1", path = "unreal", optional = true } +symbolic-common = { version = "7.2.0", path = "common" } +symbolic-debuginfo = { version = "7.2.0", path = "debuginfo", optional = true } +symbolic-demangle = { version = "7.2.0", path = "demangle", optional = true } +symbolic-minidump = { version = "7.2.0", path = "minidump", optional = true } +symbolic-proguard = { version = "7.2.0", path = "proguard", optional = true } +symbolic-sourcemap = { version = "7.2.0", path = "sourcemap", optional = true } +symbolic-symcache = { version = "7.2.0", path = "symcache", optional = true } +symbolic-unreal = { version = "7.2.0", path = "unreal", optional = true } [dev-dependencies] clap = "2.33.0" diff --git a/cabi/Cargo.lock b/cabi/Cargo.lock index b0d87ceaa..22d1e7dc3 100644 --- a/cabi/Cargo.lock +++ b/cabi/Cargo.lock @@ -773,31 +773,31 @@ dependencies = [ [[package]] name = "symbolic" -version = "7.1.1" +version = "7.2.0" dependencies = [ - "symbolic-common 7.1.1", - "symbolic-debuginfo 7.1.1", - "symbolic-demangle 7.1.1", - "symbolic-minidump 7.1.1", - "symbolic-proguard 7.1.1", - "symbolic-sourcemap 7.1.1", - "symbolic-symcache 7.1.1", - "symbolic-unreal 7.1.1", + "symbolic-common 7.2.0", + "symbolic-debuginfo 7.2.0", + "symbolic-demangle 7.2.0", + "symbolic-minidump 7.2.0", + "symbolic-proguard 7.2.0", + "symbolic-sourcemap 7.2.0", + "symbolic-symcache 7.2.0", + "symbolic-unreal 7.2.0", ] [[package]] name = "symbolic-cabi" -version = "7.1.1" +version = "7.2.0" dependencies = [ "apple-crash-report-parser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic 7.1.1", + "symbolic 7.2.0", ] [[package]] name = "symbolic-common" -version = "7.1.1" +version = "7.2.0" dependencies = [ "debugid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -809,7 +809,7 @@ dependencies = [ [[package]] name = "symbolic-debuginfo" -version = "7.1.1" +version = "7.2.0" dependencies = [ "dmsort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -827,44 +827,44 @@ dependencies = [ "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.1", + "symbolic-common 7.2.0", "zip 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "symbolic-demangle" -version = "7.1.1" +version = "7.2.0" dependencies = [ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_demangle 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "msvc-demangler 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.1", + "symbolic-common 7.2.0", ] [[package]] name = "symbolic-minidump" -version = "7.1.1" +version = "7.2.0" dependencies = [ "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.1", - "symbolic-debuginfo 7.1.1", + "symbolic-common 7.2.0", + "symbolic-debuginfo 7.2.0", ] [[package]] name = "symbolic-proguard" -version = "7.1.1" +version = "7.2.0" dependencies = [ "proguard 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.1", + "symbolic-common 7.2.0", ] [[package]] name = "symbolic-sourcemap" -version = "7.1.1" +version = "7.2.0" dependencies = [ "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "sourcemap 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -872,18 +872,18 @@ dependencies = [ [[package]] name = "symbolic-symcache" -version = "7.1.1" +version = "7.2.0" dependencies = [ "failure 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "symbolic-common 7.1.1", - "symbolic-debuginfo 7.1.1", + "symbolic-common 7.2.0", + "symbolic-debuginfo 7.2.0", ] [[package]] name = "symbolic-unreal" -version = "7.1.1" +version = "7.2.0" dependencies = [ "anylog 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/cabi/Cargo.toml b/cabi/Cargo.toml index 18feebbe0..9a6fe9828 100644 --- a/cabi/Cargo.toml +++ b/cabi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-cabi" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -29,4 +29,4 @@ lto = true serde_json = "1.0.40" failure = "0.1.5" apple-crash-report-parser = { version = "0.4.0", features = ["with_serde"] } -symbolic = { version = "7.1.1", path = "..", features = ["debuginfo", "demangle", "minidump", "proguard", "sourcemap", "symcache", "unreal-serde"] } +symbolic = { version = "7.2.0", path = "..", features = ["debuginfo", "demangle", "minidump", "proguard", "sourcemap", "symcache", "unreal-serde"] } diff --git a/common/Cargo.toml b/common/Cargo.toml index d5f36c12d..4b8f323e3 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-common" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", diff --git a/debuginfo/Cargo.toml b/debuginfo/Cargo.toml index e8c0b8c58..7367d9b65 100644 --- a/debuginfo/Cargo.toml +++ b/debuginfo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-debuginfo" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -36,7 +36,7 @@ regex = "1.3.5" serde = { version = "1.0.94", features = ["derive"] } serde_json = "1.0.40" smallvec = "1.2.0" -symbolic-common = { version = "7.1.1", path = "../common" } +symbolic-common = { version = "7.2.0", path = "../common" } zip = "0.5.2" [dev-dependencies] diff --git a/demangle/Cargo.toml b/demangle/Cargo.toml index ed136f996..7ba851968 100644 --- a/demangle/Cargo.toml +++ b/demangle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-demangle" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -23,7 +23,7 @@ exclude = [ cpp_demangle = "0.2.14" msvc-demangler = "0.8.0" rustc-demangle = "0.1.16" -symbolic-common = { version = "7.1.1", path = "../common" } +symbolic-common = { version = "7.2.0", path = "../common" } [build-dependencies] cc = "1.0.50" diff --git a/minidump/Cargo.toml b/minidump/Cargo.toml index f52fa41ed..04c6b925a 100644 --- a/minidump/Cargo.toml +++ b/minidump/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-minidump" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -31,8 +31,8 @@ failure = "0.1.5" lazy_static = "1.4.0" regex = "1.3.5" serde = { version = "1.0.94", optional = true } -symbolic-common = { version = "7.1.1", path = "../common" } -symbolic-debuginfo = { version = "7.1.1", path = "../debuginfo" } +symbolic-common = { version = "7.2.0", path = "../common" } +symbolic-debuginfo = { version = "7.2.0", path = "../debuginfo" } [build-dependencies] cc = { version = "1.0.50", features = ["parallel"] } diff --git a/proguard/Cargo.toml b/proguard/Cargo.toml index 313ae3cf3..22abf6781 100644 --- a/proguard/Cargo.toml +++ b/proguard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-proguard" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -18,4 +18,4 @@ edition = "2018" [dependencies] proguard = "3.0.0" -symbolic-common = { version = "7.1.1", path = "../common" } +symbolic-common = { version = "7.2.0", path = "../common" } diff --git a/sourcemap/Cargo.toml b/sourcemap/Cargo.toml index 3dc198dc9..b3a83cadf 100644 --- a/sourcemap/Cargo.toml +++ b/sourcemap/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-sourcemap" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", diff --git a/symcache/Cargo.toml b/symcache/Cargo.toml index 8c255ce54..09936d03f 100644 --- a/symcache/Cargo.toml +++ b/symcache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-symcache" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", @@ -23,8 +23,8 @@ exclude = [ failure = "0.1.5" fnv = "1.0.6" num = "0.2.1" -symbolic-common = { version = "7.1.1", path = "../common" } -symbolic-debuginfo = { version = "7.1.1", path = "../debuginfo" } +symbolic-common = { version = "7.2.0", path = "../common" } +symbolic-debuginfo = { version = "7.2.0", path = "../debuginfo" } [dev-dependencies] insta = "0.8.1" diff --git a/unreal/Cargo.toml b/unreal/Cargo.toml index 9339a4ba5..a7c5e5f24 100644 --- a/unreal/Cargo.toml +++ b/unreal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "symbolic-unreal" -version = "7.1.1" +version = "7.2.0" license = "MIT" authors = [ "Armin Ronacher ", From dac1b78cce234e3ae2ebcce4daa22e8618b69d70 Mon Sep 17 00:00:00 2001 From: calixteman Date: Wed, 1 Apr 2020 09:59:08 +0200 Subject: [PATCH 042/107] ref(debuginfo): No error in functions iterator on name errors (#201) --- debuginfo/src/base.rs | 2 +- debuginfo/src/dwarf.rs | 81 ++++++++++++++++++++---------------------- 2 files changed, 40 insertions(+), 43 deletions(-) diff --git a/debuginfo/src/base.rs b/debuginfo/src/base.rs index 1682a2274..b6cd0b975 100644 --- a/debuginfo/src/base.rs +++ b/debuginfo/src/base.rs @@ -404,7 +404,7 @@ impl<'d> FromIterator> for SymbolMap<'d> { /// /// The file path is usually relative to a compilation directory. It might contain parent directory /// segments (`../`). -#[derive(Clone, Eq, PartialEq)] +#[derive(Clone, Default, Eq, PartialEq)] pub struct FileInfo<'data> { /// The file's basename. pub name: &'data [u8], diff --git a/debuginfo/src/dwarf.rs b/debuginfo/src/dwarf.rs index a614ba617..89b13010c 100644 --- a/debuginfo/src/dwarf.rs +++ b/debuginfo/src/dwarf.rs @@ -507,11 +507,11 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { } /// Resolves line records of a DIE's range list and puts them into the given buffer. - fn resolve_lines(&self, ranges: &[Range]) -> Result>, DwarfError> { + fn resolve_lines(&self, ranges: &[Range]) -> Vec> { // Early exit in case this unit did not declare a line program. let line_program = match self.line_program { Some(ref program) => program, - None => return Ok(Vec::new()), + None => return Vec::new(), }; let mut last = None; @@ -524,7 +524,7 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { lines.reserve(rows.len()); for row in rows { - let file = self.resolve_file(row.file_index)?.unwrap(); + let file = self.resolve_file(row.file_index).unwrap_or_default(); let line = row.line.unwrap_or(0); if let Some((last_file, last_line)) = last { @@ -543,7 +543,7 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { } } - Ok(lines) + lines } /// Resolves file information from a line program. @@ -562,17 +562,15 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { } /// Resolves a file entry by its index. - fn resolve_file(&self, file_id: u64) -> Result>, DwarfError> { + fn resolve_file(&self, file_id: u64) -> Option> { let line_program = match self.line_program { Some(ref program) => &program.header, - None => return Ok(None), + None => return None, }; - let file = line_program + line_program .file(file_id) - .ok_or_else(|| DwarfErrorKind::InvalidFileRef(file_id))?; - - Ok(Some(self.file_info(line_program, file))) + .map(|file| self.file_info(line_program, file)) } /// Collects all functions within this compilation unit. @@ -643,13 +641,13 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { let name = match symbol_name { Some(name) => Some(name), - None => self.inner.resolve_function_name(entry)?, + None => self.inner.resolve_function_name(entry).ok().flatten(), }; // Avoid constant allocations by collecting repeatedly into the same buffer and // draining the results out of it. This keeps the original buffer allocated and // allows for a single allocation per call to `resolve_lines`. - let lines = self.resolve_lines(&range_buf)?; + let lines = self.resolve_lines(&range_buf); let function = Function { address: function_address, @@ -674,36 +672,35 @@ impl<'d, 'a> DwarfUnit<'d, 'a> { // file for inlined subprograms. If this info is missing, the lookup might // return invalid line numbers. if let (Some(line), Some(file_id)) = (call_line, call_file) { - if let Some(file) = self.resolve_file(file_id)? { - match parent - .lines - .binary_search_by_key(&function_address, |line| line.address) - { - Ok(idx) => { - // We found a line record that points to this function. This happens - // especially, if the function range overlaps exactly. Patch the - // call info with the correct location. - parent.lines[idx].file = file; - parent.lines[idx].line = line; - } - Err(idx) => { - let size = parent - .lines - .get(idx) - .map(|next| next.address - function_address); - - // There is no line record pointing to this function, so add one to - // the correct call location. Note that "base_dir" can be inherited - // safely here. - let line_info = LineInfo { - address: function_address, - size, - file, - line, - }; - - parent.lines.insert(idx, line_info); - } + let file = self.resolve_file(file_id).unwrap_or_default(); + match parent + .lines + .binary_search_by_key(&function_address, |line| line.address) + { + Ok(idx) => { + // We found a line record that points to this function. This happens + // especially, if the function range overlaps exactly. Patch the + // call info with the correct location. + parent.lines[idx].file = file; + parent.lines[idx].line = line; + } + Err(idx) => { + let size = parent + .lines + .get(idx) + .map(|next| next.address - function_address); + + // There is no line record pointing to this function, so add one to + // the correct call location. Note that "base_dir" can be inherited + // safely here. + let line_info = LineInfo { + address: function_address, + size, + file, + line, + }; + + parent.lines.insert(idx, line_info); } } } From fd22b1a8f970d94832feae5c9971302c12778696 Mon Sep 17 00:00:00 2001 From: calixteman Date: Wed, 1 Apr 2020 12:38:04 +0200 Subject: [PATCH 043/107] fix(debuginfo): Avoid infinite recursion because of self references (#202) --- debuginfo/src/dwarf.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debuginfo/src/dwarf.rs b/debuginfo/src/dwarf.rs index 89b13010c..19f3d2dd3 100644 --- a/debuginfo/src/dwarf.rs +++ b/debuginfo/src/dwarf.rs @@ -370,7 +370,12 @@ impl<'d, 'a> UnitRef<'d, 'a> { if let Some(attr) = reference_target { let resolved = self.resolve_reference(attr, |ref_unit, ref_entry| { - ref_unit.resolve_function_name(ref_entry) + if self.unit.offset != ref_unit.unit.offset || entry.offset() != ref_entry.offset() + { + ref_unit.resolve_function_name(ref_entry) + } else { + Ok(None) + } })?; if let Some(name) = resolved { From fa197cd9cea5a6b14259c159bfeea6fcf7aadceb Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Mon, 6 Apr 2020 09:00:00 +0200 Subject: [PATCH 044/107] feat(demangle): Support Swift 5.2 mangling (#208) Updates to Swift 5.2.1. Along with this, there are a few changes: - Added a script that auto-imports files and headers. Still requires to build the entirety of Swift, though :( - Requiring a C++14 compiler now. It's no longer sustainable to keep backwards compatibility. - Switched to Manylinux2010 since the Manylinux1 images cannot run a C++14 compiler. --- .craft.yml | 4 +- .travis.yml | 4 +- README.md | 2 +- demangle/build.rs | 3 +- demangle/tests/swift.rs | 6 + demangle/vendor/swift/1-arguments.patch | 34 + demangle/vendor/swift/README.md | 61 + .../vendor/swift/include/llvm-c/DataTypes.h | 8 +- demangle/vendor/swift/include/llvm/ADT/None.h | 7 +- .../vendor/swift/include/llvm/ADT/Optional.h | 287 ++- .../vendor/swift/include/llvm/ADT/STLExtras.h | 335 ++-- .../swift/include/llvm/ADT/SmallVector.h | 59 +- .../vendor/swift/include/llvm/ADT/StringRef.h | 67 +- .../swift/include/llvm/ADT/StringSwitch.h | 29 +- .../vendor/swift/include/llvm/ADT/iterator.h | 12 +- .../swift/include/llvm/ADT/iterator_range.h | 13 +- .../swift/include/llvm/Config/abi-breaking.h | 24 +- .../swift/include/llvm/Config/llvm-config.h | 19 +- .../swift/include/llvm/Support/AlignOf.h | 141 +- .../swift/include/llvm/Support/Casting.h | 17 +- .../swift/include/llvm/Support/Compiler.h | 97 +- .../swift/include/llvm/Support/DataTypes.h | 7 +- .../include/llvm/Support/ErrorHandling.h | 7 +- .../swift/include/llvm/Support/MathExtras.h | 229 ++- .../swift/include/llvm/Support/MemAlloc.h | 31 +- .../include/llvm/Support/SwapByteOrder.h | 53 +- .../swift/include/llvm/Support/raw_ostream.h | 63 +- .../swift/include/llvm/Support/type_traits.h | 128 +- .../swift/include/swift/ABI/MetadataKind.def | 93 - .../swift/include/swift/ABI/MetadataValues.h | 1755 ----------------- .../include/swift/AST/ReferenceStorage.def | 11 +- .../swift/include/swift/Basic/FlagSet.h | 123 -- .../vendor/swift/include/swift/Basic/LLVM.h | 6 +- .../swift/include/swift/Basic/STLExtras.h | 220 +-- .../swift/include/swift/Demangling/Demangle.h | 142 +- .../swift/Demangling/DemangleNodes.def | 27 +- .../include/swift/Demangling/Demangler.h | 158 +- .../include/swift/Demangling/ManglingUtils.h | 6 +- .../Demangling/StandardTypesMangling.def | 13 +- .../include/swift/Demangling/TypeDecoder.h | 707 ------- .../include/swift/Runtime/BackDeployment.h | 45 + .../swift/include/swift/Runtime/Config.h | 22 +- .../swift/include/swift/Runtime/Unreachable.h | 33 - demangle/vendor/swift/include/swift/Strings.h | 109 +- .../swift/lib/Demangling/CMakeLists.txt | 26 +- .../vendor/swift/lib/Demangling/Context.cpp | 57 + .../vendor/swift/lib/Demangling/Demangler.cpp | 786 +++++--- .../swift/lib/Demangling/NodePrinter.cpp | 473 +++-- .../swift/lib/Demangling/OldDemangler.cpp | 47 +- .../swift/lib/Demangling/OldRemangler.cpp | 910 ++++----- .../vendor/swift/lib/Demangling/Remangler.cpp | 555 ++++-- .../swift/lib/Demangling/RemanglerBase.h | 169 ++ .../swift/lib/Demangling/TypeDecoder.cpp | 82 - .../stdlib/public/SwiftShims/Visibility.h | 47 +- demangle/vendor/swift/update.py | 129 ++ 55 files changed, 3484 insertions(+), 5014 deletions(-) create mode 100644 demangle/vendor/swift/1-arguments.patch create mode 100644 demangle/vendor/swift/README.md delete mode 100644 demangle/vendor/swift/include/swift/ABI/MetadataKind.def delete mode 100644 demangle/vendor/swift/include/swift/ABI/MetadataValues.h delete mode 100644 demangle/vendor/swift/include/swift/Basic/FlagSet.h delete mode 100644 demangle/vendor/swift/include/swift/Demangling/TypeDecoder.h create mode 100644 demangle/vendor/swift/include/swift/Runtime/BackDeployment.h delete mode 100644 demangle/vendor/swift/include/swift/Runtime/Unreachable.h create mode 100644 demangle/vendor/swift/lib/Demangling/RemanglerBase.h delete mode 100644 demangle/vendor/swift/lib/Demangling/TypeDecoder.cpp create mode 100755 demangle/vendor/swift/update.py diff --git a/.craft.yml b/.craft.yml index 5dba8c4cb..d7cdb0312 100644 --- a/.craft.yml +++ b/.craft.yml @@ -11,6 +11,6 @@ targets: changelogPolicy: simple requireNames: - /^symbolic-.*-py2.py3-none-macosx_10_13_x86_64.whl$/ - - /^symbolic-.*-py2.py3-none-manylinux1_i686.whl$/ - - /^symbolic-.*-py2.py3-none-manylinux1_x86_64.whl$/ + - /^symbolic-.*-py2.py3-none-manylinux2010_i686.whl$/ + - /^symbolic-.*-py2.py3-none-manylinux2010_x86_64.whl$/ - /^symbolic-.*.zip$/ diff --git a/.travis.yml b/.travis.yml index ca35591e6..1ba50755a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,12 +59,12 @@ jobs: env: DEPLOY=mac-wheel osx_image: xcode9.4 - if: branch ~= /^release\/.+$/ - script: make wheel-manylinux IMAGE=quay.io/pypa/manylinux1_x86_64 + script: make wheel-manylinux IMAGE=quay.io/pypa/manylinux2010_x86_64 env: DEPLOY=linux-x86_64-wheel services: - docker - if: branch ~= /^release\/.+$/ - script: make wheel-manylinux IMAGE=quay.io/pypa/manylinux1_i686 + script: make wheel-manylinux IMAGE=quay.io/pypa/manylinux2010_i686 env: DEPLOY=linux-x86-wheel services: - docker diff --git a/README.md b/README.md index 5dd257d57..82b48e430 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ the features: information. Currently, this comprises MachO and ELF (with DWARF debugging), PE and PDB, as well as Breakpad symbols. - **`demangle`**: Demangling for Rust, C++, Swift and Objective C symbols. This feature requires a - C++11 compiler on the PATH. + C++14 compiler on the PATH. - **`minidump`**: Rust bindings for the Breakpad Minidump processor. Additionally, this includes facilities to extract stack unwinding information (sometimes called CFI) from object files. This feature requires a C++11 compiler on the PATH. diff --git a/demangle/build.rs b/demangle/build.rs index af0d18ce1..1dbe38d87 100644 --- a/demangle/build.rs +++ b/demangle/build.rs @@ -12,9 +12,8 @@ fn main() { // "vendor/swift/lib/Demangling/OldRemangler.cpp", "vendor/swift/lib/Demangling/Punycode.cpp", // "vendor/swift/lib/Demangling/Remangler.cpp", - // "vendor/swift/lib/Demangling/TypeDecoder.cpp", ]) - .flag_if_supported("-std=c++11") + .flag_if_supported("-std=c++14") .flag("-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1") .warnings(false) .include("vendor/swift/include") diff --git a/demangle/tests/swift.rs b/demangle/tests/swift.rs index 9429aa8c2..6166cf937 100644 --- a/demangle/tests/swift.rs +++ b/demangle/tests/swift.rs @@ -143,6 +143,9 @@ fn test_demangle_swift_short() { "$s8mangling14varargsVsArray3arr1nySid_SStF" => "varargsVsArray(arr:n:)", "$s8mangling14varargsVsArray3arr1nySaySiG_SStF" => "varargsVsArray(arr:n:)", "$s8mangling14varargsVsArray3arr1nySaySiGd_SStF" => "varargsVsArray(arr:n:)", + + // Swift 5.2 + "$s7ranking22propertyVersusFunctionyyAA1P_p_xtAaCRzlFyAaC_pcAaC_pcfu_" => "implicit closure #1 in propertyVersusFunction(_:_:)", }); } @@ -281,5 +284,8 @@ fn test_demangle_swift_no_args() { "$s8mangling14varargsVsArray3arr1nySid_SStF" => "varargsVsArray", "$s8mangling14varargsVsArray3arr1nySaySiG_SStF" => "varargsVsArray", "$s8mangling14varargsVsArray3arr1nySaySiGd_SStF" => "varargsVsArray", + + // Swift 5.2 + "$s7ranking22propertyVersusFunctionyyAA1P_p_xtAaCRzlFyAaC_pcAaC_pcfu_" => "implicit closure #1 in propertyVersusFunction", }); } diff --git a/demangle/vendor/swift/1-arguments.patch b/demangle/vendor/swift/1-arguments.patch new file mode 100644 index 000000000..9faaee417 --- /dev/null +++ b/demangle/vendor/swift/1-arguments.patch @@ -0,0 +1,34 @@ +commit 575a6035e76e73eacc99d43a412d0afa2068dd25 +Author: Jan Michael Auer +Date: Sun Apr 5 16:39:15 2020 +0200 + + feat(demangle): Add option to skip Swift function parameters + +diff --git a/demangle/vendor/swift/include/swift/Demangling/Demangle.h b/demangle/vendor/swift/include/swift/Demangling/Demangle.h +index 2a8fd6c..c377a00 100644 +--- a/demangle/vendor/swift/include/swift/Demangling/Demangle.h ++++ b/demangle/vendor/swift/include/swift/Demangling/Demangle.h +@@ -57,6 +57,7 @@ struct DemangleOptions { + bool ShortenArchetype = false; + bool ShowPrivateDiscriminators = true; + bool ShowFunctionArgumentTypes = true; ++ bool ShowFunctionArguments = true; + std::function GenericParameterName = + genericParameterName; + +diff --git a/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp b/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp +index 097be7f..266506e 100644 +--- a/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp ++++ b/demangle/vendor/swift/lib/Demangling/NodePrinter.cpp +@@ -728,6 +728,11 @@ private: + setInvalid(); + return; + } ++ ++ if (!Options.ShowFunctionArguments) { ++ return; ++ } ++ + unsigned startIndex = 0; + if (node->getChild(0)->getKind() == Node::Kind::ThrowsAnnotation) + startIndex = 1; diff --git a/demangle/vendor/swift/README.md b/demangle/vendor/swift/README.md new file mode 100644 index 000000000..277949059 --- /dev/null +++ b/demangle/vendor/swift/README.md @@ -0,0 +1,61 @@ +# Vendored Swift Demangler + +This folder contains a vendored subset of the [Swift Programming Language]. The Swift library is +reduced to the demangler only to reduce the size of this package. + +The current version is **Swift 5.2.1**. + +## Sentry Modifications + +The library has been modified to add an option to hide function arguments during demangling. This +patch is maintained in `1-arguments.patch`. + +## How to Update + +1. **Check out the [latest release] of Swift:** + 1. Create a directory that will house swift and its dependencies: + ``` + $ mkdir swift-source && cd swift-source + ``` + 2. Clone the swift repository into a subdirectory: + ``` + $ git clone https://github.com/apple/swift.git + ``` + 3. Check out dependencies: + ``` + $ ./swift/utils/update-checkout --clone-with-ssh + ``` + 4. Check out the release banch of the latest release: + ``` + $ git checkout swift-5.2.1-RELEASE + ``` + 5. Build the complete swift project (be very patient, this may take long): + ``` + $ cd swift + $ ./utils/build-script + ``` +2. **Copy updated sources and headers from the checkout to this library:** + 1. Run the update script in this directory (requires Python 3): + ``` + $ ./update.py + ``` + 2. Check for modifications. + 3. Commit _"feat(demangle): Import libswift demangle x.x.x"_ before proceeding. +3. **Apply the patch:** + 1. Apply `1-arguments.patch`. + 2. Build the library and ensure tests work. + 3. Commit the changes. +4. **Add tests for new mangling schemes:** + 1. Identify new mangling schemes. Skip if there are no known changes. + 2. Add test cases to `tests/swift.rs` +5. **Update Repository metadata**: + 1. Bump the Swift version number in this README. + 2. Check for changes in the license and update the files. + 3. Update the patch file with the commit generated in step 3: + ``` + $ git show > 1-arguments.patch + ``` +6. **Create a pull request.** + +[swift programming language]: https://github.com/apple/swift +[latest release]: https://github.com/apple/swift/releases/latest/ diff --git a/demangle/vendor/swift/include/llvm-c/DataTypes.h b/demangle/vendor/swift/include/llvm-c/DataTypes.h index 7081c83ff..893b22b49 100644 --- a/demangle/vendor/swift/include/llvm-c/DataTypes.h +++ b/demangle/vendor/swift/include/llvm-c/DataTypes.h @@ -1,9 +1,9 @@ /*===-- include/llvm-c/DataTypes.h - Define fixed size types ------*- C -*-===*\ |* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| +|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| +|* Exceptions. *| +|* See https://llvm.org/LICENSE.txt for license information. *| +|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| |* *| |*===----------------------------------------------------------------------===*| |* *| diff --git a/demangle/vendor/swift/include/llvm/ADT/None.h b/demangle/vendor/swift/include/llvm/ADT/None.h index 4b6bc1e00..004ca0ac5 100644 --- a/demangle/vendor/swift/include/llvm/ADT/None.h +++ b/demangle/vendor/swift/include/llvm/ADT/None.h @@ -1,9 +1,8 @@ //===-- None.h - Simple null value for implicit construction ------*- C++ -*-=// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // diff --git a/demangle/vendor/swift/include/llvm/ADT/Optional.h b/demangle/vendor/swift/include/llvm/ADT/Optional.h index d109da418..c84f9aa8b 100644 --- a/demangle/vendor/swift/include/llvm/ADT/Optional.h +++ b/demangle/vendor/swift/include/llvm/ADT/Optional.h @@ -1,9 +1,8 @@ //===- Optional.h - Simple variant for passing optional values --*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -17,119 +16,200 @@ #define LLVM_ADT_OPTIONAL_H #include "llvm/ADT/None.h" -#include "llvm/Support/AlignOf.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/type_traits.h" -#include #include +#include #include #include namespace llvm { +class raw_ostream; + namespace optional_detail { + +struct in_place_t {}; + /// Storage for any type. -template ::value> struct OptionalStorage { - AlignedCharArrayUnion storage; - bool hasVal = false; +template ::value> +class OptionalStorage { + union { + char empty; + T value; + }; + bool hasVal; - OptionalStorage() = default; +public: + ~OptionalStorage() { reset(); } + + OptionalStorage() noexcept : empty(), hasVal(false) {} - OptionalStorage(const T &y) : hasVal(true) { new (storage.buffer) T(y); } - OptionalStorage(const OptionalStorage &O) : hasVal(O.hasVal) { - if (hasVal) - new (storage.buffer) T(*O.getPointer()); + OptionalStorage(OptionalStorage const &other) : OptionalStorage() { + if (other.hasValue()) { + emplace(other.value); + } } - OptionalStorage(T &&y) : hasVal(true) { - new (storage.buffer) T(std::forward(y)); + OptionalStorage(OptionalStorage &&other) : OptionalStorage() { + if (other.hasValue()) { + emplace(std::move(other.value)); + } } - OptionalStorage(OptionalStorage &&O) : hasVal(O.hasVal) { - if (O.hasVal) { - new (storage.buffer) T(std::move(*O.getPointer())); + + template + explicit OptionalStorage(in_place_t, Args &&... args) + : value(std::forward(args)...), hasVal(true) {} + + void reset() noexcept { + if (hasVal) { + value.~T(); + hasVal = false; } } - OptionalStorage &operator=(T &&y) { - if (hasVal) - *getPointer() = std::move(y); - else { - new (storage.buffer) T(std::move(y)); + bool hasValue() const noexcept { return hasVal; } + + T &getValue() LLVM_LVALUE_FUNCTION noexcept { + assert(hasVal); + return value; + } + T const &getValue() const LLVM_LVALUE_FUNCTION noexcept { + assert(hasVal); + return value; + } +#if LLVM_HAS_RVALUE_REFERENCE_THIS + T &&getValue() && noexcept { + assert(hasVal); + return std::move(value); + } +#endif + + template void emplace(Args &&... args) { + reset(); + ::new ((void *)std::addressof(value)) T(std::forward(args)...); + hasVal = true; + } + + OptionalStorage &operator=(T const &y) { + if (hasValue()) { + value = y; + } else { + ::new ((void *)std::addressof(value)) T(y); hasVal = true; } return *this; } - OptionalStorage &operator=(OptionalStorage &&O) { - if (!O.hasVal) - reset(); - else { - *this = std::move(*O.getPointer()); + OptionalStorage &operator=(T &&y) { + if (hasValue()) { + value = std::move(y); + } else { + ::new ((void *)std::addressof(value)) T(std::move(y)); + hasVal = true; } return *this; } - // FIXME: these assignments (& the equivalent const T&/const Optional& ctors) - // could be made more efficient by passing by value, possibly unifying them - // with the rvalue versions above - but this could place a different set of - // requirements (notably: the existence of a default ctor) when implemented - // in that way. Careful SFINAE to avoid such pitfalls would be required. - OptionalStorage &operator=(const T &y) { - if (hasVal) - *getPointer() = y; - else { - new (storage.buffer) T(y); - hasVal = true; + OptionalStorage &operator=(OptionalStorage const &other) { + if (other.hasValue()) { + if (hasValue()) { + value = other.value; + } else { + ::new ((void *)std::addressof(value)) T(other.value); + hasVal = true; + } + } else { + reset(); } return *this; } - OptionalStorage &operator=(const OptionalStorage &O) { - if (!O.hasVal) + + OptionalStorage &operator=(OptionalStorage &&other) { + if (other.hasValue()) { + if (hasValue()) { + value = std::move(other.value); + } else { + ::new ((void *)std::addressof(value)) T(std::move(other.value)); + hasVal = true; + } + } else { reset(); - else - *this = *O.getPointer(); + } return *this; } +}; - ~OptionalStorage() { reset(); } +template class OptionalStorage { + union { + char empty; + T value; + }; + bool hasVal = false; + +public: + ~OptionalStorage() = default; + + OptionalStorage() noexcept : empty{} {} + + OptionalStorage(OptionalStorage const &other) = default; + OptionalStorage(OptionalStorage &&other) = default; + + OptionalStorage &operator=(OptionalStorage const &other) = default; + OptionalStorage &operator=(OptionalStorage &&other) = default; + + template + explicit OptionalStorage(in_place_t, Args &&... args) + : value(std::forward(args)...), hasVal(true) {} - void reset() { + void reset() noexcept { if (hasVal) { - (*getPointer()).~T(); + value.~T(); hasVal = false; } } - T *getPointer() { + bool hasValue() const noexcept { return hasVal; } + + T &getValue() LLVM_LVALUE_FUNCTION noexcept { assert(hasVal); - return reinterpret_cast(storage.buffer); + return value; } - const T *getPointer() const { + T const &getValue() const LLVM_LVALUE_FUNCTION noexcept { assert(hasVal); - return reinterpret_cast(storage.buffer); + return value; } -}; - -// Swift-only: The following partial template specialization was removed -// from LLVM because of a bug in GCC, but Swift is relying on it. -// (https://bugs.swift.org/browse/SR-9483) - -#if !defined(__GNUC__) || defined(__clang__) // GCC up to GCC7 miscompiles this. -/// Storage for trivially copyable types only. -template struct OptionalStorage { - AlignedCharArrayUnion storage; - bool hasVal = false; - - OptionalStorage() = default; +#if LLVM_HAS_RVALUE_REFERENCE_THIS + T &&getValue() && noexcept { + assert(hasVal); + return std::move(value); + } +#endif - OptionalStorage(const T &y) : hasVal(true) { new (storage.buffer) T(y); } - OptionalStorage &operator=(const T &y) { - *reinterpret_cast(storage.buffer) = y; + template void emplace(Args &&... args) { + reset(); + ::new ((void *)std::addressof(value)) T(std::forward(args)...); hasVal = true; - return *this; } - void reset() { hasVal = false; } + OptionalStorage &operator=(T const &y) { + if (hasValue()) { + value = y; + } else { + ::new ((void *)std::addressof(value)) T(y); + hasVal = true; + } + return *this; + } + OptionalStorage &operator=(T &&y) { + if (hasValue()) { + value = std::move(y); + } else { + ::new ((void *)std::addressof(value)) T(std::move(y)); + hasVal = true; + } + return *this; + } }; -#endif + } // namespace optional_detail template class Optional { @@ -141,10 +221,10 @@ template class Optional { constexpr Optional() {} constexpr Optional(NoneType) {} - Optional(const T &y) : Storage(y) {} + Optional(const T &y) : Storage(optional_detail::in_place_t{}, y) {} Optional(const Optional &O) = default; - Optional(T &&y) : Storage(std::forward(y)) {} + Optional(T &&y) : Storage(optional_detail::in_place_t{}, std::move(y)) {} Optional(Optional &&O) = default; Optional &operator=(T &&y) { @@ -155,9 +235,7 @@ template class Optional { /// Create a new object by constructing it in place with the given arguments. template void emplace(ArgTypes &&... Args) { - reset(); - Storage.hasVal = true; - new (getPointer()) T(std::forward(Args)...); + Storage.emplace(std::forward(Args)...); } static inline Optional create(const T *y) { @@ -172,43 +250,48 @@ template class Optional { void reset() { Storage.reset(); } - const T *getPointer() const { - assert(Storage.hasVal); - return reinterpret_cast(Storage.storage.buffer); - } - T *getPointer() { - assert(Storage.hasVal); - return reinterpret_cast(Storage.storage.buffer); - } - const T &getValue() const LLVM_LVALUE_FUNCTION { return *getPointer(); } - T &getValue() LLVM_LVALUE_FUNCTION { return *getPointer(); } + const T *getPointer() const { return &Storage.getValue(); } + T *getPointer() { return &Storage.getValue(); } + const T &getValue() const LLVM_LVALUE_FUNCTION { return Storage.getValue(); } + T &getValue() LLVM_LVALUE_FUNCTION { return Storage.getValue(); } - explicit operator bool() const { return Storage.hasVal; } - bool hasValue() const { return Storage.hasVal; } + explicit operator bool() const { return hasValue(); } + bool hasValue() const { return Storage.hasValue(); } const T *operator->() const { return getPointer(); } T *operator->() { return getPointer(); } - const T &operator*() const LLVM_LVALUE_FUNCTION { return *getPointer(); } - T &operator*() LLVM_LVALUE_FUNCTION { return *getPointer(); } + const T &operator*() const LLVM_LVALUE_FUNCTION { return getValue(); } + T &operator*() LLVM_LVALUE_FUNCTION { return getValue(); } template constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION { return hasValue() ? getValue() : std::forward(value); } + /// Apply a function to the value if present; otherwise return None. + template + auto map(const Function &F) const + -> Optional { + if (*this) return F(getValue()); + return None; + } + #if LLVM_HAS_RVALUE_REFERENCE_THIS - T &&getValue() && { return std::move(*getPointer()); } - T &&operator*() && { return std::move(*getPointer()); } + T &&getValue() && { return std::move(Storage.getValue()); } + T &&operator*() && { return std::move(Storage.getValue()); } template T getValueOr(U &&value) && { return hasValue() ? std::move(getValue()) : std::forward(value); } -#endif -}; -template struct isPodLike> { - // An Optional is pod-like if T is. - static const bool value = isPodLike::value; + /// Apply a function to the value if present; otherwise return None. + template + auto map(const Function &F) && + -> Optional { + if (*this) return F(std::move(*this).getValue()); + return None; + } +#endif }; template @@ -345,6 +428,18 @@ template bool operator>=(const T &X, const Optional &Y) { return !(X < Y); } +raw_ostream &operator<<(raw_ostream &OS, NoneType); + +template () + << std::declval())> +raw_ostream &operator<<(raw_ostream &OS, const Optional &O) { + if (O) + OS << *O; + else + OS << None; + return OS; +} + } // end namespace llvm #endif // LLVM_ADT_OPTIONAL_H diff --git a/demangle/vendor/swift/include/llvm/ADT/STLExtras.h b/demangle/vendor/swift/include/llvm/ADT/STLExtras.h index 8685f0e4a..b61dab245 100644 --- a/demangle/vendor/swift/include/llvm/ADT/STLExtras.h +++ b/demangle/vendor/swift/include/llvm/ADT/STLExtras.h @@ -1,9 +1,8 @@ //===- llvm/ADT/STLExtras.h - Useful STL related functions ------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -18,7 +17,6 @@ #define LLVM_ADT_STLEXTRAS_H #include "llvm/ADT/Optional.h" -#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Config/abi-breaking.h" @@ -52,10 +50,6 @@ namespace detail { template using IterOfRange = decltype(std::begin(std::declval())); -template -using ValueOfRange = typename std::remove_reference()))>::type; - } // end namespace detail //===----------------------------------------------------------------------===// @@ -75,6 +69,12 @@ template struct make_const_ptr { using type = typename std::add_pointer::type>::type; }; + +template struct make_const_ref { + using type = typename std::add_lvalue_reference< + typename std::add_const::type>::type; +}; + //===----------------------------------------------------------------------===// // Extra additions to //===----------------------------------------------------------------------===// @@ -90,18 +90,6 @@ template struct identity { } }; -template struct less_ptr { - bool operator()(const Ty* left, const Ty* right) const { - return *left < *right; - } -}; - -template struct greater_ptr { - bool operator()(const Ty* left, const Ty* right) const { - return *right < *left; - } -}; - /// An efficient, type-erasing, non-owning reference to a callable. This is /// intended for use as the type of a function parameter that is not used /// after the function in question returns. @@ -205,6 +193,15 @@ constexpr bool empty(const T &RangeOrContainer) { return adl_begin(RangeOrContainer) == adl_end(RangeOrContainer); } +/// Return a range covering \p RangeOrContainer with the first N elements +/// excluded. +template +auto drop_begin(T &&RangeOrContainer, size_t N) -> + iterator_range { + return make_range(std::next(adl_begin(RangeOrContainer), N), + adl_end(RangeOrContainer)); +} + // mapped_iterator - This is a simple iterator adapter that causes a function to // be applied whenever operator* is invoked on the iterator. @@ -235,6 +232,13 @@ inline mapped_iterator map_iterator(ItTy I, FuncTy F) { return mapped_iterator(std::move(I), std::move(F)); } +template +auto map_range(ContainerTy &&C, FuncTy F) + -> decltype(make_range(map_iterator(C.begin(), F), + map_iterator(C.end(), F))) { + return make_range(map_iterator(C.begin(), F), map_iterator(C.end(), F)); +} + /// Helper to determine if type T has a member called rbegin(). template class has_rbegin_impl { using yes = char[1]; @@ -518,10 +522,6 @@ bool all_of(R &&range, UnaryPredicate P); template bool any_of(R &&range, UnaryPredicate P); -template struct index_sequence; - -template struct index_sequence_for; - namespace detail { using std::declval; @@ -556,38 +556,38 @@ struct zip_common : public zip_traits { std::tuple iterators; protected: - template value_type deref(index_sequence) const { + template value_type deref(std::index_sequence) const { return value_type(*std::get(iterators)...); } template - decltype(iterators) tup_inc(index_sequence) const { + decltype(iterators) tup_inc(std::index_sequence) const { return std::tuple(std::next(std::get(iterators))...); } template - decltype(iterators) tup_dec(index_sequence) const { + decltype(iterators) tup_dec(std::index_sequence) const { return std::tuple(std::prev(std::get(iterators))...); } public: zip_common(Iters &&... ts) : iterators(std::forward(ts)...) {} - value_type operator*() { return deref(index_sequence_for{}); } + value_type operator*() { return deref(std::index_sequence_for{}); } const value_type operator*() const { - return deref(index_sequence_for{}); + return deref(std::index_sequence_for{}); } ZipType &operator++() { - iterators = tup_inc(index_sequence_for{}); + iterators = tup_inc(std::index_sequence_for{}); return *reinterpret_cast(this); } ZipType &operator--() { static_assert(Base::IsBidirectional, "All inner iterators must be at least bidirectional."); - iterators = tup_dec(index_sequence_for{}); + iterators = tup_dec(std::index_sequence_for{}); return *reinterpret_cast(this); } }; @@ -606,7 +606,8 @@ struct zip_first : public zip_common, Iters...> { template class zip_shortest : public zip_common, Iters...> { template - bool test(const zip_shortest &other, index_sequence) const { + bool test(const zip_shortest &other, + std::index_sequence) const { return all_of(std::initializer_list{std::get(this->iterators) != std::get(other.iterators)...}, identity{}); @@ -618,7 +619,7 @@ class zip_shortest : public zip_common, Iters...> { zip_shortest(Iters &&... ts) : Base(std::forward(ts)...) {} bool operator==(const zip_shortest &other) const { - return !test(other, index_sequence_for{}); + return !test(other, std::index_sequence_for{}); } }; @@ -634,18 +635,21 @@ template