Issue metadata
Sign in to add a comment
|
Clang crashes when compiles with use_clang_coverage=true for Android |
||||||||||||||||||||||||
Issue descriptionPer docs in [1], CrOS is a supported code coverage platform, but when I try to build I get a clang compiler crash in android_image_reader_compat.o[2]. Looking at https://chromium-coverage.appspot.com/ I don't see any chromeos specific components (chrome/browser/chromeos), so I'm guessing this config is not automatically tested. android_image_reader_compat.cc is only compiled after I set "use_clang_coverage=true". This issue is tangentially related to issue 843356, but since this file should not even be compiled for cros I don't think they are duplicates, since that is a clang compilation failure and this is a build config failure. My args.gn is use_clang_coverage = true is_component_build = false dcheck_always_on = true target_os = "chromeos" 1: https://chromium.googlesource.com/chromium/src/+blame/HEAD/docs/code_coverage.md 2: https://paste.googleplex.com/4817305393430528?raw liaoyuke@ for further triage if needed.
,
Nov 21
I think we need to come up with a small reproducer and report the issue to LLVM bugtracker. It's a compiler crash and 'LLVM IR generation" is not something we've worked with :)
,
Nov 21
Do we know why `use_clang_coverage=true` sets is_android to true? Otherwise android_image_reader_compat.cc will not be compiled and the LLVM issue (tracked in issue 843356) should ideally just go away.
,
Nov 21
As far as I understand, parts of the codebase are built for android in all chromeos builds (for arc something something, or mojo, or similar -- I don't remember details and fail to find the thread on it. Maybe vapier knows?). And we don't support coverage on x86 android I think (issue 865376) (?)
,
Nov 21
When I removed `use_clang_coverage = true`, android_image_reader_compat.cc did not get built. So I believe is_android is getting set incorrectly, but I have been unable to figure out where/how that variable is set.
,
Nov 21
Can you reproduce this issue reliably? e.g. create two empty directories, like: out/no_coverage and out/with_coverage and try to build the target in question with and without use_clang_coverage=true? So far the behavior you're describing is hard to believe in, and my best guess is that something might be accidentally messed up in your build directory (or any other local changes impact that). I'd appreciate if you could verify that, as the case is really confusing at the moment :)
,
Nov 21
Ah, looks like it was a weird repro state, android_image_reader_compat.cc is now getting built even if I don't have use_clang_coverage=true set.
,
Nov 21
i'm not familiar with the browser code base. maybe Steven or Achuith would know.
,
Nov 22
,
Nov 27
,
Nov 27
,
Nov 27
jdufault@, does clang compile android_image_reader_compat.cc successfully without use_clang_coverage=true? But it does crash when use_clang_coverage=true, right? How many dependencies does this file have? Would it be possible to get rid of any external headers / types and use it as a standalone crash reproducer?
,
Nov 27
mmoroz@, if you do not maintain chrome coverage builds, can you reassign to the person who does? I'm not the right owner for this. Yes, android_image_reader_compat.cc builds successfully with use_clang_coverage=false. I'm not sure about dependencies - maybe llvm has tools for this?
,
Nov 27
I can't maintain something that is not supposed to work. It's a known issue that clang is crashing when compiling for Android with code coverage instrumentation turned on (issue 843356). Help from the people developing for Android would be greatly appreciated here, because they can reduce a crashing input faster than anyone else and therefore file an actionable bug report. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by thakis@chromium.org
, Nov 21