Updating docs for ASAN on iOS

38 views
Skip to first unread message

Václav Brožek

unread,
Jul 13, 2017, 5:43:31 PM7/13/17
to chromi...@chromium.org
Hi all,

https://www.chromium.org/developers/testing/addresssanitizer#TOC-Building-on-iOS gives some instructions to run ASAN on iOS. They are unfortunately outdated (reference GYP and use pre-XCode-8 syntax for the iossim command line).

ASAN on iOS still works today. So far I was able to run it just by creating a GN dir with a config containing "is_asan = true" and then running, e.g.:
out/asan/iossim -d "iPhone 6s" -s 10.0  -c "--gtest_filter=ToolsSanityTest.DISABLED_AddressSanitizerLocalOOBCrashTest --gtest_also_run_disabled_tests" out/asan/base_unittests.app/ 2>&1 | tools/valgrind/asan/asan_symbolize.py

(The main trick against the old documentation was to use the "-c" switch for iossim.)

I would like to update the docs so that next time someone looks for this (me included), that person finds the most recent information. I can edit the above page with my @chromium.org account, but it feels a bit weird, because I'm essentially still not sure what I'm doing, patching things together until the output is expected. So I would like to have someone knowledgeable in ASAN to review my changes. Also, perhaps the ASAN instructions are/should be somewhere in  //docs?

Cheers,
Vaclav

Sylvain Defresne

unread,
Jul 17, 2017, 12:38:31 PM7/17/17
to vabr, chromi...@chromium.org
Using "is_asan = true" is the correct way to enable ASAN with GN on iOS (and on the other platforms). I took care that this option would correctly work when targeting iOS while doing the conversion from gyp to gn but forgot to update the documentation.

Using "-c" is the correct way to pass command-line flags to the application when running it from the command-line with iossim. It should probably be added to the documentation on how to run application from the command-line in docs/ios/build_instructions.md.

AFAICT, there was no other notable change impacting ASAN on iOS and you are using it correctly. Glad to review any CLs to update the documentation.
-- Sylvain

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAN8iHeh%2BjhGe1rd8rORTJccqOn20m%2Bb%2B-wuYcfRyMtBF%2BXKTvg%40mail.gmail.com.

Václav Brožek

unread,
Jul 17, 2017, 2:28:33 PM7/17/17
to Sylvain Defresne, chromi...@chromium.org
Thanks, Sylvain!

I updated https://www.chromium.org/developers/testing/addresssanitizer#TOC-Building-on-iOS in a non-destructive manner (kept the GYP instructions untouched, but added my GN steps in front of them.

I also uploaded https://chromium-review.googlesource.com/c/575047/ for the related iOS docs change.

Cheers,
Vaclav

Mike Pinkerton

unread,
Jul 18, 2017, 6:53:25 AM7/18/17
to va...@chromium.org, Sylvain Defresne, chromi...@chromium.org
I'm pretty sure we can remove the GYP instructions altogether. Are there any places in chromium that still use GYP?

Václav Brožek

unread,
Jul 18, 2017, 7:00:19 AM7/18/17
to Mike Pinkerton, Sylvain Defresne, chromi...@chromium.org
I know that some projects involving V8 use GYP, but that's not relevant for iOS instructions.

Dirk Pranke

unread,
Jul 18, 2017, 11:35:20 AM7/18/17
to pink...@chromium.org, Václav Brožek, Sylvain Defresne, chromi...@chromium.org
We still use GYP in one set of WebUI tests, but we don't use it for building anything. There are subprojects that still support GYP builds, I think.

-- Dirk

Reply all
Reply to author
Forward
0 new messages