reverie/safeptrace
Pierre Chevalier 2afb6babfa
Some checks failed
ci / Check (push) Has been cancelled
ci / Test Suite (push) Has been cancelled
ci / Clippy (push) Has been cancelled
Update gitoxide to version with lenient tag parsing
Summary:
ignore-conflict-markers

A while ago, I made the parsing of tags in gitoxide tolerate a missing
timestamp.

We have now seen this situation in two repos:
* aosp/platform/external/brctl
* aosp/platform/external/iproute2

Update all gitoxide crates to their latest version (equivalent to upstream main)
to propagate that fix to us.

I had to list all gitoxide crates explicitely to avoid issues with conflicting requirements
for any crates in the dependency chain.

The commit I'm pointing at in my fork of gitoxide is litterally `main` plus a version update
to propagate the fix throughout the gix ecosystem.

NOTE: I had to slightly edit the integration test to make the failure
representative of the incorrect parsing, but see the updated
integration test for proof that the latest version can parse a tag that's
missing a timestamp.

Reviewed By: RajivTS, singhsrb

Differential Revision: D63771328

fbshipit-source-id: fdbc9d762bacf48c7b17615181371cd92a4a921f
2024-10-03 07:20:59 -07:00
..
src Update bitflags to 2.4 2024-01-16 00:38:02 -08:00
Cargo.toml Update gitoxide to version with lenient tag parsing 2024-10-03 07:20:59 -07:00
README.md Prepare safeptrace to be published as a crate 2023-03-25 16:12:24 -07:00

A safe ptrace interface

This crate provides a safe and Rustic alternative to the infamous ptrace API. There are many extremely subtle aspects of the raw ptrace API and this crate helps avoid common pitfalls.

Note that this library is still rather low-level and does not claim to solve all your ptrace problems. You have been warned!

Features

  • Ergonomic interface that provides a state machine for ptrace states. This avoids the infamous ESRCH errors that can happen when you use the ptrace API incorrectly.
  • Provides an interface to read/write guest's memory (see "memory" feature flag).
  • Provides an optional and semi-experimental async interface, which can be used with tokio (see "notifier" feature).

Usage

Add this to your Cargo.toml file:

safeptrace = "0.1"

Feature Flags

"memory" (off by default)

Provides access to the guest's memory. Memory can only be safely accessed when the guest is in a stopped state, thus the MemoryAccess trait is only implemented for the Stopped type.

"notifier" (off by default)

Provides an async interface for ptrace using notifier threads. This is semi-experimental, but testing shows that it has very good performance. It works by spawning a separate thread for each thread being traced, waiting for ptrace events in a loop. Thus, there will be 1 thread per guest thread.

Use with:

safeptrace = { version = "0.1", features = ["async"] }