New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843356 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 866225

Blocking:
issue 843306



Sign in to add a comment

Coverage Script: support Android

Project Member Reported by mmoroz@chromium.org, May 15 2018

Issue description

https://cs.chromium.org/chromium/src/tools/code_coverage/coverage.py works with iOS, but will likely need some testing and maybe some changes to work with Android.
 
Owner: aluo@chromium.org
Status: Assigned (was: Untriaged)
Tentatively assigning to aluo@ who expressed an interest on the mailing list. Also quoting my reply over email:

There would be 3 steps:

1) Try to build some test target with use_clang_coverage = true GN flag. The build should fail during LINK step, because of 2)

2) We need to add compiler-rt profile library for android to the clang bundle: https://bugs.chromium.org/p/chromium/issues/detail?id=865376#c6

I can help with that, but it would need your support on my CL, because in the past there were some pushbacks on adding more libraries to the bundle, showing more interest should help with that.

3) Once build is successful, try running tools/code_coverage/coverage.py and fix things that do not work for Android.
Owner: mmoroz@chromium.org
Thanks Max.  I compiled with the use_clang_coverage = true GN flag, got the expected error:

/usr/local/google/code/clankium1/src/out-gn/Debug/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: cannot open /usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/lib/clang/7.0.0/lib/linux/libclang_rt.profile-arm-android.a: No such file or directory

will be happy to test our your fixes.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d89549b20cedcf250e16cf5d98a89ed0b691e6e0

commit d89549b20cedcf250e16cf5d98a89ed0b691e6e0
Author: Max Moroz <mmoroz@chromium.org>
Date: Tue Jul 31 16:19:55 2018

Build and bundle compiler-rt profile library for Android.

This is needed for supporting profiling and code coverage reporting on
ChromeOS and Android.

Bug: 843356,865376
Change-Id: I36836a7876c5e9230b33594362ac029bc1670c86
Reviewed-on: https://chromium-review.googlesource.com/1153653
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Abhishek Arya <inferno@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579426}
[modify] https://crrev.com/d89549b20cedcf250e16cf5d98a89ed0b691e6e0/tools/clang/scripts/update.py

Blockedon: 866225
Owner: aluo@chromium.org
Andrew, please give it another try after the next clang roll ( issue 866225 ).
Andrew, are you still interested? :)
Yes, I missed c4, will give this a try today.
Owner: mmoroz@chromium.org
Got this error during build:
0.	Program arguments: /usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang++ -cc1 -triple thumbv7-unknown-linux-android -emit-obj -disable-free -main-file-name android_image_reader_compat.cc -mrelocation-model pic -pic-level 2 -mthread-model posix -fmerge-all-constants -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu generic -target-feature +soft-float-abi -target-feature -fp-only-sp -target-feature -d16 -target-feature +vfp3 -target-feature -fp16 -target-feature -vfp4 -target-feature -fp-armv8 -target-feature +neon -target-feature -crypto -target-abi aapcs-linux -mfloat-abi soft -fallow-half-arguments-and-returns -fdebug-info-for-profiling -dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=3 -debugger-tuning=gdb -ffunction-sections -fdata-sections -fprofile-instrument=clang -fcoverage-mapping -coverage-notes-file /usr/local/google/code/clankium1/src/out-gn/Debug/obj/base/base/android_image_reader_compat.gcno -resource-dir /usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/lib/clang/8.0.0 -dependency-file obj/base/base/android_image_reader_compat.o.d -MT obj/base/base/android_image_reader_compat.o -isystem ../../third_party/android_ndk/sysroot/usr/include/arm-linux-androideabi -isystem ../../third_party/android_ndk/sources/cxx-stl/llvm-libc++/include -isystem ../../third_party/android_ndk/sources/cxx-stl/llvm-libc++abi/include -isystem ../../third_party/android_ndk/sources/android/support/include -D V8_DEPRECATION_WARNINGS -D NO_TCMALLOC -D CLANG_COVERAGE -D SAFE_BROWSING_DB_REMOTE -D CHROMIUM_BUILD -D FIELDTRIAL_TESTING_ENABLED -D _GNU_SOURCE -D ANDROID -D HAVE_SYS_UIO_H -D ANDROID_NDK_VERSION_ROLL=r16_1 -D CR_CLANG_REVISION="340925-1" -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D _FORTIFY_SOURCE=2 -D __GNU_SOURCE=1 -D CHROMIUM_CXX_TWEAK_INLINES -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D BASE_IMPLEMENTATION -I ../.. -I gen -I gen/base/base_jni_headers -I gen/base/base_jni_headers/base -I gen/base/android_runtime_jni_headers/base -I ../../third_party/android_ndk/sources/android/cpufeatures -D __DATE__= -D __TIME__= -D __TIMESTAMP__= -D __ANDROID_API__=16 -D HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC=1 -isysroot ../../third_party/android_ndk/sysroot -internal-isystem ../../third_party/android_ndk/sysroot/usr/local/include -internal-isystem /usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/lib/clang/8.0.0/include -internal-externc-isystem ../../third_party/android_ndk/sysroot/usr/include/arm-linux-androideabi -internal-externc-isystem ../../third_party/android_ndk/sysroot/include -internal-externc-isystem ../../third_party/android_ndk/sysroot/usr/include -O2 -Wno-builtin-macro-redefined -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wglobal-constructors -Wexit-time-destructors -Wexit-time-destructors -Wshadow -Wexit-time-destructors -std=c++14 -fdeprecated-macro -fdebug-compilation-dir /usr/local/google/code/clankium1/src/out-gn/Debug -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 1 -stack-protector-buffer-size 4 -fno-rtti -fno-signed-char -fno-use-cxa-atexit -fobjc-runtime=gcc -Qn -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -load ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -add-plugin find-bad-constructs -plugin-arg-find-bad-constructs enforce-in-thirdparty-webkit -plugin-arg-find-bad-constructs check-enum-max-value -plugin-arg-find-bad-constructs check-ipc -mllvm -limited-coverage-experimental=true -o obj/base/base/android_image_reader_compat.o -x c++ ../../base/android/android_image_reader_compat.cc -faddrsig 
1.	<eof> parser at end of file
2.	../../base/android/android_image_reader_compat.cc:22:11: LLVM IR generation of declaration 'base'
3.	../../base/android/android_image_reader_compat.cc:46:26: Generating code for declaration 'base::android::AndroidImageReader::LoadFunctions'
#0 0x00000000020d5c84 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x20d5c84)
#1 0x00000000020d3b1e llvm::sys::RunSignalHandlers() (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x20d3b1e)
#2 0x00000000020d5e42 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x20d5e42)
#3 0x00007f65e529f0c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
#4 0x00007f65e405afcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
#5 0x00007f65e405c3fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
#6 0x00007f65e4053e37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
#7 0x00007f65e4053ee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
#8 0x00000000023ca907 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23ca907)
#9 0x00000000023c6bc5 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23c6bc5)
#10 0x00000000023cc4d5 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23cc4d5)
#11 0x00000000023cc4d5 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23cc4d5)
#12 0x00000000023c6ba6 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23c6ba6)
#13 0x00000000023c8c17 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23c8c17)
#14 0x00000000023cc4d5 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23cc4d5)
#15 0x00000000023c6ba6 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23c6ba6)
#16 0x00000000023c8fb4 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23c8fb4)
#17 0x00000000023cc4d5 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23cc4d5)
#18 0x00000000023c6ba6 (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23c6ba6)
#19 0x00000000023c4f5a clang::CodeGen::CoverageMappingGen::emitCounterMapping(clang::Decl const*, llvm::raw_ostream&) (/usr/local/google/code/clankium1/src/third_party/llvm-build/Release+Asserts/bin/clang+++0x23c4f5a)


Logs:
http://go/chrome-androidlogs1/8/843356

That doesn't look good :) Thanks for giving it a try! Which target did you try to build?
I was building the webview_ui_test_app target in android_webview/tools/automated_ui_tests
Cc: yzjr@chromium.org
What's the progress here? What's the main blocking issue?
Clang seems to be crashing when building webview_ui_test_app target with coverage instrumentation. I was able to reproduce the issue, but haven't had time to take a closer look yet. Most likely though, I would end up creating a smaller reproducer and reporting the issue to LLVM upstream. If anyone else can create a smaller reproducer, that would help a lot :)
Cc: bpastene@chromium.org vapier@chromium.org thakis@chromium.org mmoroz@chromium.org michae...@chromium.org achuith@chromium.org steve...@chromium.org r...@chromium.org
 Issue 907597  has been merged into this issue.
Cc: jdufault@chromium.org
Owner: ----
Status: Available (was: Assigned)
Un-assigning myself here to avoid confusion. The current blocker is to get a small input which will be crashing clang in the same way as c#7 or  issue 907597 .
Owner: manojgupta@chromium.org
Status: Assigned (was: Available)
I find suspicious that for ChromeOS "is_android" would be set. ( issue 907597 ).
We can take a look at the compiler crash (given a reproducer). But, as far as I know , no one has used code coverage on the chrome os side. Not sure how difficult would it be to get it to work.

Assigning to Manoj temporarily to triage the compiler failure. 





@mmmoroz, can you help in finding a a reproducer?
I think is_android is set as part of a cros build to build arc++ bridge bits, see here:

https://cs.chromium.org/chromium/src/mojo/core/BUILD.gn?q=android_clang+file:%5C.gn&sq=package:chromium&dr=C&l=198

    copy("shared_library_arc32") {
      sources = [
        "${root_out_dir}/${android32_toolchain}/libmojo_core.so",
      ]
      outputs = [
        "${root_out_dir}/libmojo_core_arc32.so",
      ]
      deps = [
        ":shared_library(//build/toolchain/android:${android32_toolchain})",
      ]
    }

Cc: aluo@chromium.org
Andrew (aluo@), could you please provide the instructions on how to reproduce the breakage? You said in c#9 that you were building "webview_ui_test_app target in android_webview/tools/automated_ui_tests", but could you also share full GN config and any other important pieces?
I was able to reproduce the compile error using webview_ui_test_app, and it is a pretty small target, so fairly easy to reproduce.

1. Follow [1] to set up a checkout for Android.

2. Use following GN args:
use_goma = true
goma_dir = "/path/to/goma"
is_debug = false
is_component_build = false
use_clang_coverage = true
target_os = "android"

3. Build "webview_ui_test_app" target.


[1] https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md
Can repro and getting the following stack trace after dropping a few arguments that could not be used in chrome os chroot.

The stack trace below is using the clang from chromium/Linux.

$ clang++ -cc1 -triple thumbv7-unknown-linux-android -emit-obj -disable-free -main-file-name android_image_reader_compat.cc -mrelocation-model pic -pic-level 2 -mthread-model posix -fmerge-all-constants -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu generic -target-feature +soft-float-abi -target-feature -fp-only-sp -target-feature -d16 -target-feature +vfp3 -target-feature -fp16 -target-feature -vfp4 -target-feature -fp-armv8 -target-feature +neon -target-feature -crypto -target-abi aapcs-linux -mfloat-abi soft -fallow-half-arguments-and-returns -fdebug-info-for-profiling -dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=3 -debugger-tuning=gdb -ffunction-sections -fdata-sections -fcoverage-mapping -nostdinc++ -D V8_DEPRECATION_WARNINGS -D NO_TCMALLOC -D CLANG_COVERAGE -D SAFE_BROWSING_DB_REMOTE -D CHROMIUM_BUILD -D FIELDTRIAL_TESTING_ENABLED -D _GNU_SOURCE -D ANDROID -D HAVE_SYS_UIO_H -D ANDROID_NDK_VERSION_ROLL=r16_1 -D CR_CLANG_REVISION="346388-5" -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D _FORTIFY_SOURCE=2 -D __GNU_SOURCE=1 -D CHROMIUM_CXX_TWEAK_INLINES -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D BASE_IMPLEMENTATION -D __DATE__= -D __TIME__= -D __TIMESTAMP__= -D __ANDROID_API__=16 -D HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC=1 -O2 -Wno-builtin-macro-redefined -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wglobal-constructors -Wexit-time-destructors -Wshadow -Wexit-time-destructors -std=c++14 -fdeprecated-macro -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 1 -stack-protector-buffer-size 4 -fno-rtti -fno-signed-char -fno-use-cxa-atexit -fobjc-runtime=gcc -Qn -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -instcombine-lower-dbg-declare=0 -mllvm -limited-coverage-experimental=true -x c++ /tmp/android_image_reader_compat-178d5e.cpp -faddrsig 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
#0 0x00000000021cabf4 (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x21cabf4)
#1 0x00000000021c8a8e llvm::sys::RunSignalHandlers() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x21c8a8e)
#2 0x00000000021cadb8 (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x21cadb8)
#3 0x00007fb2459690c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
#4 0x00007fb244724fcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
#5 0x00007fb2447263fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
#6 0x00007fb24471de37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
#7 0x00007fb24471dee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
#8 0x0000000001b8a540 llvm::ConstantExpr::getAddrSpaceCast(llvm::Constant*, llvm::Type*, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x1b8a540)
#9 0x00000000024a0c5f clang::CodeGen::CoverageMappingModuleGen::addFunctionMappingRecord(llvm::GlobalVariable*, llvm::StringRef, unsigned long, std::string const&, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x24a0c5f)
#10 0x0000000002481850 clang::CodeGen::CodeGenPGO::emitEmptyCounterMapping(clang::Decl const*, llvm::StringRef, llvm::GlobalValue::LinkageTypes) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2481850)
#11 0x0000000002436a2f clang::CodeGen::CodeGenModule::EmitDeferredUnusedCoverageMappings() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2436a2f)
#12 0x0000000002434bc0 clang::CodeGen::CodeGenModule::Release() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2434bc0)
#13 0x0000000002c05f04 (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2c05f04)
#14 0x0000000002c030c7 (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2c030c7)
#15 0x000000000341bb53 clang::ParseAST(clang::Sema&, bool, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x341bb53)
#16 0x0000000002866b70 clang::FrontendAction::Execute() (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2866b70)
#17 0x000000000280e051 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x280e051)
#18 0x0000000002906fbd clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x2906fbd)
#19 0x00000000008f6818 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x8f6818)
#20 0x00000000008f3ff5 main (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x8f3ff5)
#21 0x00007fb2447122b1 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#22 0x00000000008f0fed _start (../../third_party/llvm-build/Release+Asserts/bin/clang+++0x8f0fed)
Aborted

android_image_reader_compat-178d5e.cpp
3.9 MB View Download
Awesome progress! I'd suggest filing a bug in upstream llvm with the repo.
Also need to pass "-fprofile-instrument=clang" after which stack trace is:

clang++: clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:623: void {anonymous}::CounterCoverageMappingBuilder::popRegions(size_t): Assertion `SpellingRegion(SM, Region).isInSourceOrder()' failed.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007fffed0553fa in __GI_abort () at abort.c:89
#2  0x00007fffed04ce37 in __assert_fail_base (fmt=<optimized out>, 
    assertion=assertion@entry=0x555559377de8 "SpellingRegion(SM, Region).isInSourceOrder()", 
    file=file@entry=0x5555593779c0 "clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp", 
    line=line@entry=623, 
    function=function@entry=0x55555937e220 <(anonymous namespace)::CounterCoverageMappingBuilder::popRegions(unsigned long)::__PRETTY_FUNCTION__> "void {anonymous}::CounterCoverageMappingBuilder::popRegions(size_t)") at assert.c:92
#3  0x00007fffed04cee2 in __GI___assert_fail (assertion=0x555559377de8 "SpellingRegion(SM, Region).isInSourceOrder()", 
    file=0x5555593779c0 "clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp", line=623, 
    function=0x55555937e220 <(anonymous namespace)::CounterCoverageMappingBuilder::popRegions(unsigned long)::__PRETTY_FUNCTION__> "void {anonymous}::CounterCoverageMappingBuilder::popRegions(size_t)") at assert.c:101
#4  0x00005555565f5cf8 in (anonymous namespace)::CounterCoverageMappingBuilder::popRegions (this=0x7fffffff3a30, ParentIndex=7)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:623
#5  0x00005555565f6067 in (anonymous namespace)::CounterCoverageMappingBuilder::propagateCounts (this=0x7fffffff3a30, TopCount=..., 
    S=0x55555d5f5f60, VisitChildren=true)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:669
#6  0x00005555565f9120 in (anonymous namespace)::CounterCoverageMappingBuilder::VisitAbstractConditionalOperator (this=0x7fffffff3a30, 
    E=0x55555d5f5fa8) at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:1248
#7  0x00005555565fe795 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::VisitConditionalOperator (this=0x7fffffff3a30, S=0x55555d5f5fa8) at tools/clang/include/clang/AST/StmtNodes.inc:129
#8  0x00005555565fb8d3 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit (
    this=0x7fffffff3a30, S=0x55555d5f5fa8) at tools/clang/include/clang/AST/StmtNodes.inc:129
#9  0x00005555565f6f24 in (anonymous namespace)::CounterCoverageMappingBuilder::VisitStmt (this=0x7fffffff3a30, S=0x55555d5f5fd8)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:867
#10 0x0000555556600e15 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::VisitExpr (this=0x7fffffff3a30, S=0x55555d5f5fd8) at tools/clang/include/clang/AST/StmtNodes.inc:115
#11 0x0000555556600ed3 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::VisitFullExpr (this=0x7fffffff3a30, S=0x55555d5f5fd8) at tools/clang/include/clang/AST/StmtNodes.inc:531
#12 0x00005555565ff057 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::VisitExprWithCleanups (this=0x7fffffff3a30, S=0x55555d5f5fd8) at tools/clang/include/clang/AST/StmtNodes.inc:541
#13 0x00005555565fbe8b in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit (
    this=0x7fffffff3a30, S=0x55555d5f5fd8) at tools/clang/include/clang/AST/StmtNodes.inc:541
#14 0x00005555565f6f24 in (anonymous namespace)::CounterCoverageMappingBuilder::VisitStmt (this=0x7fffffff3a30, S=0x55555d5f6010)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:867
#15 0x00005555565fe6d7 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::VisitCompoundStmt (this=0x7fffffff3a30, S=0x55555d5f6010) at tools/clang/include/clang/AST/StmtNodes.inc:79
#16 0x00005555565fb82b in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit (
    this=0x7fffffff3a30, S=0x55555d5f6010) at tools/clang/include/clang/AST/StmtNodes.inc:79
#17 0x00005555565f6039 in (anonymous namespace)::CounterCoverageMappingBuilder::propagateCounts (this=0x7fffffff3a30, TopCount=..., 
    S=0x55555d5f6010, VisitChildren=true)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:667
#18 0x00005555565f8c24 in (anonymous namespace)::CounterCoverageMappingBuilder::VisitIfStmt (this=0x7fffffff3a30, S=0x55555d5f6030)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:1192
#19 0x00005555565fc36b in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit (
    this=0x7fffffff3a30, S=0x55555d5f6030) at tools/clang/include/clang/AST/StmtNodes.inc:869
#20 0x00005555565f6f24 in (anonymous namespace)::CounterCoverageMappingBuilder::VisitStmt (this=0x7fffffff3a30, S=0x55555d5f6048)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:867
#21 0x00005555565fe6d7 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::VisitCompoundStmt (this=0x7fffffff3a30, S=0x55555d5f6048) at tools/clang/include/clang/AST/StmtNodes.inc:79
#22 0x00005555565fb82b in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit (
    this=0x7fffffff3a30, S=0x55555d5f6048) at tools/clang/include/clang/AST/StmtNodes.inc:79
#23 0x00005555565f6039 in (anonymous namespace)::CounterCoverageMappingBuilder::propagateCounts (this=0x7fffffff3a30, TopCount=..., 
    S=0x55555d5f6048, VisitChildren=true)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:667
#24 0x00005555565f78ef in (anonymous namespace)::CounterCoverageMappingBuilder::VisitDoStmt (this=0x7fffffff3a30, S=0x55555d5f60a0)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:989
#25 0x00005555565fb8a3 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit (
    this=0x7fffffff3a30, S=0x55555d5f60a0) at tools/clang/include/clang/AST/StmtNodes.inc:109
#26 0x00005555565f6f24 in (anonymous namespace)::CounterCoverageMappingBuilder::VisitStmt (this=0x7fffffff3a30, S=0x55555d615f00)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:867
#27 0x00005555565fe6d7 in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::VisitCompoundStmt (this=0x7fffffff3a30, S=0x55555d615f00) at tools/clang/include/clang/AST/StmtNodes.inc:79
#28 0x00005555565fb82b in clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::CounterCoverageMappingBuilder, void>::Visit (
    this=0x7fffffff3a30, S=0x55555d615f00) at tools/clang/include/clang/AST/StmtNodes.inc:79
#29 0x00005555565f6039 in (anonymous namespace)::CounterCoverageMappingBuilder::propagateCounts (this=0x7fffffff3a30, TopCount=..., 
    S=0x55555d615f00, VisitChildren=true)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:667
#30 0x00005555565f707b in (anonymous namespace)::CounterCoverageMappingBuilder::VisitDecl (this=0x7fffffff3a30, D=0x55555d5f3028)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:888
#31 0x00005555565faa43 in clang::CodeGen::CoverageMappingGen::emitCounterMapping (this=0x7fffffff40b0, D=0x55555d5f3028, OS=...)
    at clang_src/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp:1467
#32 0x000055555658c5c2 in clang::CodeGen::CodeGenPGO::emitCounterRegionMapping (this=0x7fffffff5248, D=0x55555d5f3028)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp:833
#33 0x000055555658c1cb in clang::CodeGen::CodeGenPGO::assignRegionCounters (this=0x7fffffff5248, GD=..., Fn=0x55555d64dcb8)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp:783
#34 0x0000555556483f3b in clang::CodeGen::CodeGenFunction::GenerateCode (this=0x7fffffff4390, GD=..., Fn=0x55555d64dcb8, FnInfo=...)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:1353
#35 0x00005555564ac64f in clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition (this=0x55555b7f03e0, GD=..., GV=0x55555d64dcb8)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:3996
#36 0x00005555564a5b13 in clang::CodeGen::CodeGenModule::EmitGlobalDefinition (this=0x55555b7f03e0, GD=..., GV=0x0)
---Type <return> to continue, or q <return> to quit---
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:2457
#37 0x00005555564a4b84 in clang::CodeGen::CodeGenModule::EmitGlobal (this=0x55555b7f03e0, GD=...)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:2226
#38 0x00005555564b0323 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl (this=0x55555b7f03e0, D=0x55555d5f3028)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:4791
#39 0x00005555564b0256 in clang::CodeGen::CodeGenModule::EmitDeclContext (this=0x55555b7f03e0, DC=0x55555d5f0d78)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:4777
#40 0x00005555564b0486 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl (this=0x55555b7f03e0, D=0x55555d5f0d50)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:4818
#41 0x00005555564b0256 in clang::CodeGen::CodeGenModule::EmitDeclContext (this=0x55555b7f03e0, DC=0x55555d5f0d10)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:4777
#42 0x00005555564b0486 in clang::CodeGen::CodeGenModule::EmitTopLevelDecl (this=0x55555b7f03e0, D=0x55555d5f0ce8)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp:4818
#43 0x0000555556c6f5a6 in (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl (this=0x55555b7efae0, DG=...)
    at clang_src/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp:160
#44 0x0000555556c68c03 in clang::BackendConsumer::HandleTopLevelDecl (this=0x55555b7ef850, D=...)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:169
#45 0x0000555557bd762d in clang::ParseAST (S=..., PrintStats=false, SkipFunctionBodies=false)
    at clang_src/llvm/tools/clang/lib/Parse/ParseAST.cpp:161
#46 0x0000555556b02531 in clang::ASTFrontendAction::ExecuteAction (this=0x55555b7d1130)
    at clang_src/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1018
#47 0x0000555556c67152 in clang::CodeGenAction::ExecuteAction (this=0x55555b7d1130)
    at clang_src/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1048
#48 0x0000555556b01f2b in clang::FrontendAction::Execute (this=0x55555b7d1130)
    at clang_src/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:917
#49 0x0000555556a85c39 in clang::CompilerInstance::ExecuteAction (this=0x55555b7c0580, Act=...)
    at clang_src/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:955
#50 0x0000555556c56607 in clang::ExecuteCompilerInvocation (Clang=0x55555b7c0580)

mmoroz@ IIUC, this bug needs to be fixed before we can get Code Coverage working for Chrome on Chrome OS?
rkc@, I think so. There is some guidance in the upstream issue tracker (https://bugs.llvm.org/show_bug.cgi?id=39942#c8), looks like we need some help from folks familiar with the lexer implementation.
Blocking: -759794
Cc: infe...@chromium.org liaoyuke@chromium.org baxley@chromium.org
 Issue 791735  has been merged into this issue.

Sign in to add a comment