include_tracer.py crashes for third_party/blink/renderer/platform/graphics/graphics_types.h |
||
Issue description
Chrome Version: ToT
OS:
What steps will reproduce the problem?
(1) ./tools/include_tracer.py third_party/blink/renderer/platform/graphics/graphics_types.h
What is the expected result?
No crash.
What happens instead?
....
SkRefCnt.h
<atomic>
<functional>
<ostream>
Traceback (most recent call last):
File "./tools/include_tracer.py", line 201, in <module>
sys.exit(main())
File "./tools/include_tracer.py", line 195, in main
bytes = Walk(set(), sys.argv[1], '', 0)
File "./tools/include_tracer.py", line 183, in Walk
seen, line.split('"')[1], resolved_filename, indent + 2)
File "./tools/include_tracer.py", line 183, in Walk
seen, line.split('"')[1], resolved_filename, indent + 2)
File "./tools/include_tracer.py", line 185, in Walk
include = '<' + line.split('<')[1].split('>')[0] + '>'
IndexError: list index out of range
This is caused by third_party/skia/include/core/SkRefCnt.h:
#ifdef SK_REF_CNT_MIXIN_INCLUDE
// It is the responsibility of the following include to define the type SkRefCnt.
// This SkRefCnt should normally derive from SkRefCntBase.
#include SK_REF_CNT_MIXIN_INCLUDE
#else
,
Jun 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/654d87ef220bc93b191370832d4097415fd25a24 commit 654d87ef220bc93b191370832d4097415fd25a24 Author: Kent Tamura <tkent@chromium.org> Date: Tue Jun 05 05:31:54 2018 include_tracer.py: Fix crashes by SkRefCnt.h and gmock_link_test.cc - Do not crash with |#include SK_REF_CNT_MIXIN_INCLUDE|. "SK_REF_CND_MIXIN_INCLUDE" will be handled as a file name, and Walk() will show the " -- not found" message for it. - Do not crash with '#include "..."'. Support multiple spaces between '#include' and '"' or '<'. Bug: 849199 Change-Id: I67ef457778fad47b2a6a7edf050fbe3c86e951df Reviewed-on: https://chromium-review.googlesource.com/1086547 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#564365} [modify] https://crrev.com/654d87ef220bc93b191370832d4097415fd25a24/tools/include_tracer.py
,
Jun 5 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by tkent@chromium.org
, Jun 5 2018I found another crash case: # ./tools/include_tracer.py third_party/googletest/src/googlemock/test/gmock_link_test.cc Traceback (most recent call last): File "./tools/include_tracer.py", line 201, in <module> sys.exit(main()) File "./tools/include_tracer.py", line 195, in main bytes = Walk(set(), sys.argv[1], '', 0) File "./tools/include_tracer.py", line 185, in Walk include = '<' + line.split('<')[1].split('>')[0] + '>' IndexError: list index out of range gmock_link_test.cc has |#include "test/gmock_link_test.h"|, two spaces between '#include' and '"'.