Skip to content

Commit

Permalink
feat: Run address sanitizer in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
henkkuli committed Nov 15, 2023
1 parent 3c51c3f commit a4e0227
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ jobs:
run: cargo build --features bundled --verbose
- name: Run tests
run: cargo test --features bundled --verbose

sanitizer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Run tests with address sanitizer
run: cargo build --features bundled -Zbuild-std --target x86_64-unknown-linux-gnu --verbose
env:
RUSTC_BOOTSTRAP: 1
CXXFLAGS: "-fsanitize=address -g"
RUSTFLAGS: "-Zsanitizer=address"
RUSTDOCFLAGS: "-Zsanitizer=address"

12 changes: 6 additions & 6 deletions src/font_face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,12 @@ impl<'a> Deref for PreprocessedFontFace<'a> {
}
}

impl<'a> Drop for PreprocessedFontFace<'a> {
#[doc(alias = "hb_face_destroy")]
fn drop(&mut self) {
unsafe { sys::hb_face_destroy(self.0) }
}
}
// impl<'a> Drop for PreprocessedFontFace<'a> {
// #[doc(alias = "hb_face_destroy")]
// fn drop(&mut self) {
// unsafe { sys::hb_face_destroy(self.0) }
// }
// }

#[cfg(test)]
mod tests {
Expand Down

0 comments on commit a4e0227

Please sign in to comment.