Skip to content

Run AddressSanitizer and fix leak #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Run AddressSanitizer and fix leak #274

merged 1 commit into from
Oct 5, 2022

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Sep 28, 2022

Run with:

ASAN_OPTIONS=detect_leaks=1 RUSTFLAGS="-Zsanitizer=address" cargo +nightly test --target=x86_64-apple-darwin -Zbuild-std --tests -- --skip=foundation::error::tests --skip=test_weak

Notably, I incorrectly assumed that the super class' dealloc method is called in custom dealloc methods, but this is only true in Objective-C with ARC enabled!

Builds upon #273.

@madsmtm madsmtm added bug Something isn't working A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates labels Sep 28, 2022
@madsmtm madsmtm changed the title Run AddressSanitizer and fix leaks Run AddressSanitizer and fix leak Sep 28, 2022
Base automatically changed from small-fixes to master September 29, 2022 10:48
Notably, I incorrectly assumed that the super class' `dealloc` method is called in custom `dealloc` methods, but this is only true in Objective-C with ARC enabled!
@madsmtm madsmtm merged commit 077a964 into master Oct 5, 2022
@madsmtm madsmtm deleted the fix-leaks branch October 5, 2022 18:14
lunixbochs pushed a commit to talonvoice/objc2 that referenced this pull request Mar 8, 2023
Run AddressSanitizer and fix leak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant