Skip to content
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

Add example for wrap.sh based HWASan #951

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Add example for wrap.sh based HWASan #951

merged 1 commit into from
Jan 10, 2024

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Jul 19, 2023

No description provided.

@fmayer fmayer marked this pull request as draft July 20, 2023 00:20
@fmayer
Copy link
Contributor Author

fmayer commented Dec 12, 2023

@emrekultursay FYI. The problem here is that I didn't know how to change the API level for the HWASan build only.

@emrekultursay
Copy link
Contributor

Try adding this to your build.gradle in the android {...} block:

    androidComponents {
        beforeVariants(selector().withName("hwasan")) {
            minSdk = 34
        }
    }

@fmayer fmayer marked this pull request as ready for review January 4, 2024 00:47
@fmayer
Copy link
Contributor Author

fmayer commented Jan 4, 2024

Try adding this to your build.gradle in the android {...} block:

    androidComponents {
        beforeVariants(selector().withName("hwasan")) {
            minSdk = 34
        }
    }

That works. PTAL.

@fmayer
Copy link
Contributor Author

fmayer commented Jan 4, 2024

Tested by checking __ANDROID_API__ in the cpp file.

Copy link
Contributor

@emrekultursay emrekultursay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@fmayer
Copy link
Contributor Author

fmayer commented Jan 4, 2024

@emrekultursay for some reason it says "At least 1 approving review is required by reviewers with write access", also the presubmit build is failing with unrelated lint errors. Do you know how to fix these?

My theory is that clang-format got somehow updated so now the code mismatches.

@emrekultursay
Copy link
Contributor

I am not an owner of this repo. I believe @DanAlbert or @enh-google can help.

@fmayer
Copy link
Contributor Author

fmayer commented Jan 10, 2024

Rebased and presubmit checks are now passing, PTAL. @DanAlbert

Copy link
Member

@DanAlbert DanAlbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expanded the comment attached to minSdk to explain that it's not always true. The other comment I had is one I'll have to leave to you though. Otherwise LGTM.

sanitizers/app/build.gradle Show resolved Hide resolved
@DanAlbert DanAlbert merged commit b7d35c1 into android:main Jan 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants