Summary: Removes usage of the `associated_type_defaults` unstable feature, but does not actually disable the feature yet. This brings us one step closer to removing all usage of unstable nightly features, which will allow publishing a crate on https://crates.io.
Reviewed By: rrnewton
Differential Revision: D41388745
fbshipit-source-id: f347a577857a713fe3088a556cbf37ffe92e5553
Summary: We want to allow precise timers with an instruction offset. While single stepping we have target and current value of the counter and once we match branches we only increment instructions
Reviewed By: jasonwhite
Differential Revision: D41269879
fbshipit-source-id: 46b3307249663de10607513dc59d8436ca907f78
Summary: `libunwind` isn't able to resolve symbols from the symbol table. There seems to be a regression preventing this from working. This partially fixes symbol lookup for stack frames by using the `object` crate for looking up symbols in the symbol table. This is a partial fix because symbol lookup does not seem to work yet for executables (only shared libraries).
Reviewed By: VladimirMakaev
Differential Revision: D41290099
fbshipit-source-id: 5d4ad1173f6ab1ca6c2995369c2dedb4a9f30e86
Summary: Now that `Tool` doesn't require `Serialize` and `Deserialize`, we can remove these unnecessary derives. Hopefully this will have a slight improvement to compile-times.
Reviewed By: wkhughes
Differential Revision: D40958697
fbshipit-source-id: 88aa1f4ee2b953ba287d749c88d200c2887ccd46
Summary:
This was from the *before times* when `core::arch::asm` wasn't yet stable. `llvm_asm!()` has been removed from recent versions of rustc, so this stuff won't even compile anymore.
Note that this also removes a rather large block of `llvm_asm` (`check_for_xen_pmi_bug`) that hasn't yet been migrated over to the new asm syntax. This seems like a lot of work for little benefit, so I'm just deleting it for now.
Differential Revision: D40957341
fbshipit-source-id: 2b9bf97e93eaa9462295b9060907530dd797e288
Summary: This checks that intercepted syscalls are actually skipped (by setting the syscall to -1). This was found to not be working on aarch64 and is fixed in the next diff.
Reviewed By: VladimirMakaev
Differential Revision: D40867424
fbshipit-source-id: 7ac514c060a2611aac8cc4a8bb7540aa3d7302fb
Summary:
Followed guide here https://www.internalfb.com/intern/wiki/Linting/License_Lint/ to add fbcode/hermetic_infra/** code to license linter. As we have parts of our code shipped as Open Source it's important to get this automated
This diff is updating existing file's licenses to not get conflict after lint rule enablement
Reviewed By: jasonwhite
Differential Revision: D40674080
fbshipit-source-id: da6ecac036f8964619cf7912058f3a911558e7b1
Summary:
When I was trying to use `nix::unistd::gethostname` in D39783468, the version `0.23.0` will require users to pass in a `buf` as a parameter, however, in `0.25.0`, there is no need to pass in a `buf` as a parameter. Hence, I would love to update `nix` crate from `0.23` to `0.25` in order to not pass a redundant `buf` while calling `nix::unistd::gethostname`.
I fixed conflicts reflected from the signals manually so this diff is more than a few lines of code in `Cargo.toml`.
Here are the [changes](https://github.com/nix-rust/nix/compare/v0.23.0..v0.25.0) between `0.23` and `0.25`. See `CHANGELOG.md` for the most significant changes in this version.
Reviewed By: bgw
Differential Revision: D39919100
fbshipit-source-id: 7f62585ff72230bd2608aeb5a4780dc0128795f7
Summary:
See rationale in the linked task
I was planning to build a new CLI and decided to follow CLI Foundation recommentation. Since hermit is effectively not released it's a good time to migrate now which hasn't been hard mostly followed the fastmods on the task and and some manual fixes of the remaining code
Reviewed By: jasonwhite
Differential Revision: D39953166
fbshipit-source-id: 6e917c6a8ea2ee8258e7e6068e9c9e787ebf0989
Summary:
X-link: https://github.com/facebookresearch/Private-ID/pull/71
Previous codemod left some crust. This commit cleans up useless uses to use less uses.
Reviewed By: stepancheg
Differential Revision: D38211793
fbshipit-source-id: c852dd1ec617fe81a1d9bd0d8a9e5d2357b9b502
Summary: If an RPC fails to send, there isn't much that can be done to handle it. In all call sites so far, they all just unwrap the error because it can't be handled properly. If an RPC fails, it is a programmer error (because the request/response failed to serialize/deserialize) and indicates a bug in our code.
Differential Revision: D37563857
fbshipit-source-id: 267072709f4230732a13989aaf74b50fd0908337
Summary: This makes merge conflicts much easier to handle.
Reviewed By: johnhurt
Differential Revision: D37564000
fbshipit-source-id: a7f1a2711ffbdbb23c93e2f479f47d0368a2dad9
Summary: The OSS license linter doesn't like the word "its".
Reviewed By: johnhurt
Differential Revision: D36856385
fbshipit-source-id: 909037d96de8976f08004497d28b77838f8c6870
Summary:
See https://github.com/jasonwhite/syscalls/blob/master/CHANGELOG.md
The biggest change here is that the type of syscall registers and return values was changed from `u64` to `usize` (to support 32-bit architectures).
Reviewed By: zertosh
Differential Revision: D36157822
fbshipit-source-id: d8776b6809dd00df93b147ee34deb37df61a2675
Summary: `libunwind` seems to be failing to look up the symbols. Need to debug this further.
Reviewed By: andronat
Differential Revision: D35569071
fbshipit-source-id: 38dc3925a277bb655ca476f97791754a736fb6aa
Summary: `clock_getres` is a vdso function in recent versions of glibc.
Reviewed By: andronat
Differential Revision: D35570102
fbshipit-source-id: d09850b4d1bec002af749452f80228e1542fafaa
Summary:
Context: I am upgrading rustfmt in D35234535.
---
This diff contains all the formatting changes which are idempotent between the old and the new version of rustfmt. It's generated by formatting with the new rustfmt, then formatting immediately again with the old rustfmt. If there are any big changes in here, that's code that old rustfmt used to crash on but new rustfmt handles correctly.
Separating out this part of the changes prior to flipping the rustfmt version switch globally allows the amount of code that needs to be landed atomically to be smaller, since this diff is independent and can land at any point before the rest of the stack.
---
Reviewed By: zertosh
Differential Revision: D35234529
fbshipit-source-id: 77e102f5d6f4b7f05df8d5d6bd9294cc9f3b15e6
Summary:
The `llvm_asm` nightly feature was removed in Rust 1.59 and `asm!()` was simultaneously stabilized, so we need to make the switch so things continue compiling.
This retains the `llvm_asm` code so that it can continue compiling on old llvm versions. This will be removed when that is updated.
Reviewed By: johnhurt
Differential Revision: D34561246
fbshipit-source-id: 42cd2c7e83cea9a5c21bd5871463bb1a42be139d
Summary:
Adds file and line number resolution to backtraces. This also adds a 1GB limit on the amount of in-memory symbols at any given time. If the internal symbol cache exceeds this, the oldest entries will be discarded until we're under that limit again. We may need to tweak this and make it more configurable in the future.
Follow-up: Auxiliary debug files, such as `.debug` files, are not supported. This should be easy to support by reading the `gnu_debuglink` section and finding the `.debug` file.
Reviewed By: johnhurt
Differential Revision: D33086623
fbshipit-source-id: 43112e3bdd135a1a43ca75c10756cc8ec101c9b8