Skip to content

Commit

Permalink
Fixing panic handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbor committed Jun 13, 2024
1 parent 5e13c14 commit c00d8e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run clippy
run: cargo --all-targets --all-features

build:
strategy:
matrix:
Expand All @@ -31,13 +22,15 @@ jobs:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose --no-default-features --features "${{ matrix.features }}"
- name: Run clippy
run: cargo clippy --all-targets --no-default-features --features "${{ matrix.features }}"
- name: Run tests
run: cargo test --verbose --no-default-features --features "${{ matrix.features }}"
- name: Build release version
run: cargo build --release --verbose --no-default-features --features "${{ matrix.features }}"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: libzanitisers.a
name: libzanitisers-${{ matrix.features }}.a
path: target/release/libzanitizers.a

4 changes: 2 additions & 2 deletions src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub fn _eprint(args: core::fmt::Arguments) {
}
}

#[cfg_attr(not(feature = "std"), panic_handler)]
#[cfg(not(feature = "std"))]
#[cfg_attr(not(any(feature = "std", test)), panic_handler)]
#[cfg(not(any(feature = "std", test)))]
fn panic(info: &core::panic::PanicInfo) -> ! {
eprintln!("{}", info);
unsafe { zan_abort(); }
Expand Down

0 comments on commit c00d8e4

Please sign in to comment.