Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/backtrace-rs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.3.71
Choose a base ref
...
head repository: rust-lang/backtrace-rs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.3.72
Choose a head ref

Commits on Mar 23, 2024

  1. Revert "Use rustc from stage0 instead of stage0-sysroot" (rust-lang/b…

    …acktrace#603)
    
    This reverts commit c31ea5b (rust-lang/backtrace#602).
    
    Don't do that, we need to use stage0-sysroot, bootstrap is just buggy.
    Noratrieb authored Mar 23, 2024
    Copy the full SHA
    d96efb8 View commit details

Commits on Mar 28, 2024

  1. Copy the full SHA
    b76177c View commit details
  2. Remove dead code

    ChrisDenton committed Mar 28, 2024
    Copy the full SHA
    8ff9b68 View commit details
  3. Copy the full SHA
    6bc4fca View commit details
  4. Copy the full SHA
    d80990b View commit details
  5. Merge #596 from ChrisDenton/windows-nightly

    Fix CI and remove rustc-serialize
    workingjubilee authored Mar 28, 2024
    Copy the full SHA
    eabeb5e View commit details
  6. Correct base address and update dbghelp64 comment (#604)

    I've been staring at the code a lot lately but somehow missed that
    we're returning the wrong thing for the module base. It *probably*
    works out ok because
    a) most things only care that the pointer points to something
      within the right module and
    b) backtrace doesn't use it.
    
    I added a comment because apparently I need the obvious pointed out
    to me.
    
    Also while I'm at it I updated a 64-bit comment to remove the stuff
    commenting on 32-bit code (which is now in another file).
    ChrisDenton authored Mar 28, 2024
    Copy the full SHA
    adc9f5c View commit details

Commits on Apr 10, 2024

  1. Copy the full SHA
    3b96ddb View commit details

Commits on Apr 12, 2024

  1. Merge pull request #610 from dpaoliello/fixtrace

    Windows AArch64: Break out of tracing when no longer making progress
    ChrisDenton authored Apr 12, 2024
    Copy the full SHA
    e151306 View commit details

Commits on May 6, 2024

  1. Copy the full SHA
    8664630 View commit details
  2. Copy the full SHA
    4c7c1de View commit details
  3. Copy the full SHA
    9ca9f5d View commit details
  4. Add dl_iterate_phdr to deprecated features

    It may not be actually deprecated yet but it soon will be
    workingjubilee committed May 6, 2024
    Copy the full SHA
    3a8d3a6 View commit details
  5. Copy the full SHA
    a042ce7 View commit details
  6. Be quiet!

    workingjubilee committed May 6, 2024
    Copy the full SHA
    fc5a3a6 View commit details
  7. Copy the full SHA
    74d8f94 View commit details
  8. Fix tests for rust 1.79 (#621)

    - Fix the accuracy test for `collapse_debuginfo`
    - Fix a couple of `unexpected_cfgs` warnings about Cargo features
    - Silence the rest, ain't nobody got time for all that shit
    - Use `rustup update --no-self-update` consistently to avoid spurious CI errors
    workingjubilee authored May 6, 2024
    Copy the full SHA
    eb68d01 View commit details
  9. Copy the full SHA
    0968bea View commit details
  10. Copy the full SHA
    58d4b13 View commit details
  11. Copy the full SHA
    f996e66 View commit details
  12. Copy the full SHA
    4cbe6b6 View commit details
  13. Copy the full SHA
    f63b581 View commit details

Commits on May 7, 2024

  1. Reduce panics in dbghelp (#608)

    According to the docs for `resolve`:
    
    > The closure may not be called if resolution could not be performed
    > This function strives to never panic.
    
    So we should ideally not panic and instead simply return without calling
    the closure. Therefore, I've changed the panicky FFI calls to instead
    simply return.
    
    I also replaced our custom UTF-16 to UTF-8 converter with a call to
    `WideCharToMultiByte`. This function already has the semantics we want
    and doesn't include panicking code.
    
    These changes should have a small but notable effect on binary size.
    ChrisDenton authored May 7, 2024
    Copy the full SHA
    7d26334 View commit details

Commits on May 27, 2024

  1. Copy the full SHA
    89eb215 View commit details
  2. Copy the full SHA
    ee06680 View commit details
  3. Copy the full SHA
    6156427 View commit details
  4. Test with lld-compatible args (#627)

    Rust on Linux has switched to using rust-lld by default, and
    it does not support the zlib-gnu or zlib-gabi arguments for
    --compress-debug-sections! Not surprising. It's... not GNU.
    Compensate for this by using zlib, which everyone supports.
    workingjubilee authored May 27, 2024
    Copy the full SHA
    13963ae View commit details
  5. Copy the full SHA
    9f2b1e1 View commit details
  6. Copy the full SHA
    0147d56 View commit details
  7. Cut 0.3.72

    workingjubilee committed May 27, 2024
    Copy the full SHA
    2e8b2ba View commit details

Commits on May 28, 2024

  1. Merge pull request #628 from workingjubilee/cut-0.3.72

    Cut backtrace 0.3.72
    ChrisDenton authored May 28, 2024
    Copy the full SHA
    5e05efa View commit details
2 changes: 1 addition & 1 deletion .github/actions/build-with-patched-std/action.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ runs:
python3 x.py build library --stage 0
TEMP_BUILD_OUTPUT=$(mktemp test-binary-XXXXXXXX)
"$RUSTC_BUILD_DIR/stage0/bin/rustc" $RUSTC_FLAGS "${{ inputs.main-rs }}" -o "$TEMP_BUILD_OUTPUT"
"$RUSTC_BUILD_DIR/stage0-sysroot/bin/rustc" $RUSTC_FLAGS "${{ inputs.main-rs }}" -o "$TEMP_BUILD_OUTPUT"
BINARY_SIZE=$(stat -c '%s' "$TEMP_BUILD_OUTPUT")
rm "$TEMP_BUILD_OUTPUT"
5 changes: 3 additions & 2 deletions .github/workflows/check-binary-size.yml
Original file line number Diff line number Diff line change
@@ -6,8 +6,9 @@ name: Check binary size

on:
pull_request_target:
branches:
- master
# HACK(jubilee): something broke the distributed LLVM libso and I don't know what.
branches: []
# - master

# Both the "measure" and "report" jobs need to know this.
env:
37 changes: 21 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -26,13 +26,18 @@ jobs:
rust: stable
- os: macos-latest
rust: nightly
# HACK(jubilee): 1.77 broke backtraces on Windows lol
- os: windows-latest
rust: 1.76.0-x86_64-msvc
rust: stable-x86_64-msvc
- os: windows-latest
rust: 1.76.0-i686-msvc
rust: stable-i686-msvc
- os: windows-latest
rust: 1.76.0-x86_64-gnu
rust: stable-x86_64-gnu
- os: windows-latest
rust: nightly-x86_64-msvc
- os: windows-latest
rust: nightly-i686-msvc
- os: windows-latest
rust: nightly-x86_64-gnu
steps:
- uses: actions/checkout@v3
with:
@@ -50,9 +55,13 @@ jobs:
shell: bash
if: contains(matrix.rust, 'i686')

- name: Enable collapse_debuginfo based on version
run: echo RUSTFLAGS="--cfg dbginfo=\"collapsible\" $RUSTFLAGS" >> $GITHUB_ENV
shell: bash
if: contains(matrix.rust, 'nightly') || contains(matrix.rust, 'beta')

- run: cargo build
- run: cargo test
- run: cargo test --features "serialize-rustc"
- run: cargo test --features "serialize-serde"
- run: cargo test --features "verify-winapi"
- run: cargo test --features "cpp_demangle"
@@ -64,18 +73,14 @@ jobs:
env:
CARGO_PROFILE_DEV_SPLIT_DEBUGINFO: packed
CARGO_PROFILE_TEST_SPLIT_DEBUGINFO: packed
- run: cargo test --features gimli-symbolize --manifest-path crates/without_debuginfo/Cargo.toml
- run: cargo test --manifest-path crates/line-tables-only/Cargo.toml --features gimli-symbolize
- run: cargo test --manifest-path crates/without_debuginfo/Cargo.toml
- run: cargo test --manifest-path crates/line-tables-only/Cargo.toml

# Test debuginfo compression still works
- run: cargo test
if: contains(matrix.os, 'ubuntu')
env:
RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gabi"
- run: cargo test
if: contains(matrix.os, 'ubuntu')
env:
RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib-gnu"
RUSTFLAGS: "-C link-arg=-Wl,--compress-debug-sections=zlib"

# Test that, on macOS, packed/unpacked debuginfo both work
- run: cargo clean && cargo test
@@ -190,7 +195,7 @@ jobs:
with:
submodules: true
- name: Install Rust
run: rustup update stable && rustup default stable
run: rustup update stable --no-self-update && rustup default stable
- run: rustup target add ${{ matrix.target }}
- run: cargo generate-lockfile
- run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV
@@ -205,7 +210,7 @@ jobs:
with:
submodules: true
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
run: rustup update stable --no-self-update && rustup default stable && rustup component add rustfmt
- run: cargo fmt --all -- --check

build:
@@ -224,7 +229,7 @@ jobs:
with:
submodules: true
- name: Install Rust
run: rustup update nightly && rustup default nightly
run: rustup update nightly --no-self-update && rustup default nightly
- run: rustup target add ${{ matrix.target }}
- run: echo RUSTFLAGS=-Dwarnings >> $GITHUB_ENV
shell: bash
@@ -245,7 +250,7 @@ jobs:
with:
submodules: true
- name: Install Rust
run: rustup update 1.65.0 && rustup default 1.65.0
run: rustup update 1.65.0 --no-self-update && rustup default 1.65.0
- run: cargo build

miri:
29 changes: 11 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 20 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "backtrace"
version = "0.3.71"
version = "0.3.72"
authors = ["The Rust Project Developers"]
build = "build.rs"
license = "MIT OR Apache-2.0"
@@ -20,31 +20,32 @@ rust-version = "1.65.0"
[workspace]
members = ['crates/cpp_smoke_test', 'crates/as-if-std']
exclude = [
'crates/without_debuginfo',
'crates/macos_frames_test',
'crates/line-tables-only',
'crates/debuglink',
'crates/without_debuginfo',
'crates/macos_frames_test',
'crates/line-tables-only',
'crates/debuglink',
]

[dependencies]
cfg-if = "1.0"
rustc-demangle = "0.1.4"
rustc-demangle = "0.1.24"

# Optionally enable the ability to serialize a `Backtrace`, controlled through
# the `serialize-*` features below.
# the `serialize-serde` feature below.
serde = { version = "1.0", optional = true, features = ['derive'] }
rustc-serialize = { version = "0.3", optional = true }

# Optionally demangle C++ frames' symbols in backtraces.
cpp_demangle = { default-features = false, version = "0.4.0", optional = true, features = ["alloc"] }
cpp_demangle = { default-features = false, version = "0.4.0", optional = true, features = [
"alloc",
] }

[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
miniz_oxide = { version = "0.7.0", default-features = false }
addr2line = { version = "0.21.0", default-features = false }
addr2line = { version = "0.22.0", default-features = false }
libc = { version = "0.2.146", default-features = false }

[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies.object]
version = "0.32.0"
version = "0.35.0"
default-features = false
features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']

@@ -54,7 +55,7 @@ winapi = { version = "0.3.9", optional = true }
[build-dependencies]
# Only needed for Android, but cannot be target dependent
# https://github.com/rust-lang/cargo/issues/4932
cc = "1.0.90"
cc = "1.0.97"

[dev-dependencies]
dylib-dep = { path = "crates/dylib-dep" }
@@ -67,11 +68,6 @@ default = ["std"]
# Include std support. This enables types like `Backtrace`.
std = []

#=======================================
# Methods of serialization
#
# Various features used for enabling rustc-serialize or syntex codegen.
serialize-rustc = ["rustc-serialize"]
serialize-serde = ["serde"]

#=======================================
@@ -81,10 +77,9 @@ serialize-serde = ["serde"]
# purposes. New code should use none of these features.
coresymbolication = []
dbghelp = []
dl_iterate_phdr = []
dladdr = []
gimli-symbolize = []
kernel32 = []
libbacktrace = []
libunwind = []
unix-backtrace = []
verify-winapi = [
@@ -98,6 +93,8 @@ verify-winapi = [
'winapi/tlhelp32',
'winapi/winbase',
'winapi/winnt',
'winapi/winnls',
'winapi/stringapiset',
]

[[example]]
@@ -135,3 +132,7 @@ harness = false
name = "current-exe-mismatch"
required-features = ["std"]
harness = false

[lints.rust]
# This crate uses them pervasively
unexpected_cfgs = "allow"
10 changes: 7 additions & 3 deletions crates/as-if-std/Cargo.toml
Original file line number Diff line number Diff line change
@@ -18,18 +18,22 @@ libc = { version = "0.2.146", default-features = false }

[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
miniz_oxide = { version = "0.7.0", optional = true, default-features = false }
addr2line = { version = "0.21.0", optional = true, default-features = false }
addr2line = { version = "0.22.0", optional = true, default-features = false }

[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies.object]
version = "0.32.0"
version = "0.35.0"
default-features = false
optional = true
features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']

[build-dependencies]
# Dependency of the `backtrace` crate
cc = "1.0.90"
cc = "1.0.97"

[features]
default = ['backtrace']
backtrace = ['addr2line', 'miniz_oxide', 'object']
std = []

[lints.rust]
unexpected_cfgs = "allow"
4 changes: 0 additions & 4 deletions crates/line-tables-only/Cargo.toml
Original file line number Diff line number Diff line change
@@ -15,7 +15,3 @@ features = [
'libunwind',
'std',
]

[features]
libbacktrace = ['backtrace/libbacktrace']
gimli-symbolize = ['backtrace/gimli-symbolize']
2 changes: 1 addition & 1 deletion crates/macos_frames_test/tests/main.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
// so that it gets its own 'target' directory. We manually invoke this test
// in .github/workflows/main.yml by passing `--manifest-path` to Cargo
#[test]
#[cfg(target_os = "macos")]
#[cfg(target_vendor = "apple")]
fn backtrace_no_dsym() {
use std::{env, fs};

4 changes: 0 additions & 4 deletions crates/without_debuginfo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -14,7 +14,3 @@ debug = false

[profile.test]
debug = false

[features]
libbacktrace = ['backtrace/libbacktrace']
gimli-symbolize = ['backtrace/gimli-symbolize']
Loading