[LLVMbugs] [Bug 20784] New: Assertion failed: (Val && "isa<> used on a null pointer"), function doit, file Casting.h, line 95.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 27 21:01:40 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20784

            Bug ID: 20784
           Summary: Assertion failed: (Val && "isa<> used on a null
                    pointer"), function doit, file Casting.h, line 95.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tapted at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12944
  --> http://llvm.org/bugs/attachment.cgi?id=12944&action=edit
preprocessed source

It's obvious what I've done wrong: "static void T function();", but compiler
crashed. This is from Chromium's clang.

In file included from
../../ui/views/controls/native/native_view_host_unittest.cc:9:
../../ui/views/controls/native/native_view_host_test_base.h:17:3: error:
missing return type for function 'NativeViewHostTest'; did you mean the
constructor name 'NativeViewHostTestBase'?
  NativeViewHostTest();
  ^~~~~~~~~~~~~~~~~~
  NativeViewHostTestBase
../../ui/views/controls/native/native_view_host_test_base.h:20:20: error:
non-friend class member 'NativeView' cannot have a qualified name
  static void gfx::NativeView GetNativeParent(gfx::NativeView native_view);
              ~~~~~^
Assertion failed: (Val && "isa<> used on a null pointer"), function doit, file
/work/chromium/src/third_party/llvm/include/llvm/Support/Casting.h, line 95.
0  clang                    0x0000000102208ef8
llvm::sys::PrintStackTrace(__sFILE*) + 40
1  clang                    0x00000001022093e4 abort + 612
2  libsystem_platform.dylib 0x00007fff82f285aa _sigtramp + 26
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2098035312
4  clang                    0x0000000102209196 abort + 22
5  clang                    0x0000000102209171 __assert_rtn + 81
6  clang                    0x00000001005b70e7
clang::Sema::FinalizeDeclaration(clang::Decl*) + 3015
7  clang                    0x000000010044e8f3
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 7283
8  clang                    0x000000010044af5e
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 2318
9  clang                    0x0000000100449b49
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 7321
10 clang                    0x000000010042ec68
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 2552
11 clang                    0x00000001004a87f9
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 73
12 clang                    0x00000001004a849a
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 394
13 clang                    0x00000001004a775c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 3356
14 clang                    0x0000000100443c14
clang::Parser::ParseInnerNamespace(std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&,
std::__1::vector<clang::IdentifierInfo*,
std::__1::allocator<clang::IdentifierInfo*> >&,
std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&, unsigned int,
clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&) + 308
15 clang                    0x00000001004436c5
clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&,
clang::SourceLocation) + 7189
16 clang                    0x000000010042dbf5
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 421
17 clang                    0x00000001004a7172
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1842
18 clang                    0x0000000100443c14
clang::Parser::ParseInnerNamespace(std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&,
std::__1::vector<clang::IdentifierInfo*,
std::__1::allocator<clang::IdentifierInfo*> >&,
std::__1::vector<clang::SourceLocation,
std::__1::allocator<clang::SourceLocation> >&, unsigned int,
clang::SourceLocation&, clang::ParsedAttributes&,
clang::BalancedDelimiterTracker&) + 308
19 clang                    0x00000001004436c5
clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&,
clang::SourceLocation) + 7189
20 clang                    0x000000010042dbf5
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 421
21 clang                    0x00000001004a7172
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1842
22 clang                    0x00000001004a6951
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 513
23 clang                    0x00000001004203a6 clang::ParseAST(clang::Sema&,
bool, bool) + 390
24 clang                    0x0000000100084163 clang::FrontendAction::Execute()
+ 67
25 clang                    0x00000001000528e3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 931
26 clang                    0x000000010000c54c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4236
27 clang                    0x00000001000011c0 cc1_main(char const**, char
const**, char const*, void*) + 896
28 clang                    0x00000001000075af main + 1215
29 clang                    0x0000000100000e34 start + 52

Stack dump:
0.    Program arguments:
/Volumes/bdd/tapted/git/3chromium/src/third_party/llvm-build/Release+Asserts/bin/clang
-cc1 -triple i386-apple-macosx10.6.0 -emit-obj -mrelax-all -disable-free
-main-file-name native_view_host_unittest.cc -mrelocation-model pic -pic-level
2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah
-target-linker-version 224.1 -gdwarf-2 -dwarf-column-info -coverage-file
/Volumes/bdd/tapted/git/3chromium/src/out/Debug/obj/ui/views/controls/native/views_unittests.native_view_host_unittest.o
-resource-dir
/Volumes/bdd/tapted/git/3chromium/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.5.0
-dependency-file
obj/ui/views/controls/native/views_unittests.native_view_host_unittest.o.d -MT
obj/ui/views/controls/native/views_unittests.native_view_host_unittest.o
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
-D V8_DEPRECATION_WARNINGS -D
__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -D CHROMIUM_BUILD -D
CR_CLANG_REVISION=214024 -D COMPONENT_BUILD -D TOOLKIT_VIEWS=1 -D
USE_LIBJPEG_TURBO=1 -D ENABLE_ONE_CLICK_SIGNIN -D ENABLE_PRE_SYNC_BACKUP -D
ENABLE_REMOTING=1 -D ENABLE_WEBRTC=1 -D ENABLE_PEPPER_CDMS -D
ENABLE_CONFIGURATION_POLICY -D ENABLE_NOTIFICATIONS -D ENABLE_HIDPI=1 -D
DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -D
SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -D ENABLE_EGLIMAGE=1 -D
ENABLE_TASK_MANAGER=1 -D ENABLE_EXTENSIONS=1 -D ENABLE_PLUGIN_INSTALLATION=1 -D
ENABLE_PLUGINS=1 -D ENABLE_SESSION_SERVICE=1 -D ENABLE_THEMES=1 -D
ENABLE_AUTOFILL_DIALOG=1 -D ENABLE_BACKGROUND=1 -D ENABLE_GOOGLE_NOW=1 -D
CLD_VERSION=2 -D CLD2_DATA_SOURCE=static -D ENABLE_FULL_PRINTING=1 -D
ENABLE_PRINTING=1 -D ENABLE_SPELLCHECK=1 -D ENABLE_CAPTIVE_PORTAL_DETECTION=1
-D ENABLE_APP_LIST=1 -D ENABLE_SETTINGS_APP=1 -D ENABLE_MANAGED_USERS=1 -D
ENABLE_SERVICE_DISCOVERY=1 -D ENABLE_WIFI_BOOTSTRAPPING=1 -D
GTEST_HAS_POSIX_RE=0 -D GTEST_LANG_CXX11=0 -D SKIA_DLL -D
GR_GL_IGNORE_ES3_MSAA=0 -D SK_ENABLE_INST_COUNT=0 -D SK_SUPPORT_GPU=1 -D
GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h" -D
SK_ENABLE_LEGACY_API_ALIASING=1 -D SK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -D
SK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT -D SK_SUPPORT_LEGACY_PICTURE_CLONE -D
SK_SUPPORT_LEGACY_GETDEVICE -D SK_IGNORE_ETC1_SUPPORT -D SK_IGNORE_GPU_DITHER
-D SK_USE_POSIX_THREADS -D SK_DEFERRED_CANVAS_USES_FACTORIES=1 -D UNIT_TEST -D
GTEST_HAS_RTTI=0 -D U_USING_ICU_NAMESPACE=0 -D U_ENABLE_DYLOAD=0 -D
__STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D DYNAMIC_ANNOTATIONS_ENABLED=1
-D WTF_USE_DYNAMIC_ANNOTATIONS=1 -I gen -I ../../ui -I ../.. -I
../../skia/config -I ../../third_party/khronos -I ../../gpu -I
../../third_party/WebKit/Source -I ../../third_party/skia/src/core -I
../../third_party/skia/include/core -I ../../third_party/skia/include/effects
-I ../../third_party/skia/include/pdf -I ../../third_party/skia/include/gpu -I
../../third_party/skia/include/lazy -I ../../third_party/skia/include/pathops
-I ../../third_party/skia/include/pipe -I ../../third_party/skia/include/ports
-I ../../third_party/skia/include/utils -I ../../skia/ext -I
../../third_party/skia/include/utils/mac -I ../../testing/gtest/include -I
../../third_party/icu/source/i18n -I ../../third_party/icu/source/common -I
gen/ui/resources -I gen/ui/strings -O0 -Werror -Wnewline-eof -Wall
-Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
-Wno-selector-type-mismatch -Wheader-hygiene -Wno-char-subscripts
-Wno-unneeded-internal-declaration -Wno-covered-switch-default
-Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register
-Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11
-fdeprecated-macro -fdebug-compilation-dir
/Volumes/bdd/tapted/git/3chromium/src/out/Debug -ferror-limit 19
-fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden
-stack-protector 3 -mstackrealign -fblocks -fno-rtti -fno-threadsafe-statics
-fobjc-runtime=macosx-fragile-10.6.0 -fobjc-subscripting-legacy-runtime
-fencode-extended-block-signature -fdiagnostics-show-option -fcolor-diagnostics
-load
/Volumes/bdd/tapted/git/3chromium/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
-add-plugin find-bad-constructs -o
obj/ui/views/controls/native/views_unittests.native_view_host_unittest.o -x c++
../../ui/views/controls/native/native_view_host_unittest.cc
1.    ../../ui/views/controls/native/native_view_host_test_base.h:20:31:
current parser token 'GetNativeParent'
2.    ../../ui/views/controls/native/native_view_host_test_base.h:11:1: parsing
namespace 'views'
3.    ../../ui/views/controls/native/native_view_host_test_base.h:12:1: parsing
namespace 'test'
4.    ../../ui/views/controls/native/native_view_host_test_base.h:15:1: parsing
struct/union/class body 'NativeViewHostTestBase'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0 (trunk 214024)
Target: i386-apple-darwin13.3.0
Thread model: posix


$ cat
/var/folders/00/1_wbr000h01000cxqpysvccm005bjg/T/native_view_host_unittest-579c64.sh

"/Volumes/bdd/tapted/git/3chromium/src/third_party/llvm-build/Release+Asserts/bin/clang"
-cc1 -triple i386-apple-macosx10.6.0 -emit-obj -mrelax-all -disable-free
-main-file-name native_view_host_unittest.cc -mrelocation-model pic -pic-level
2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah
-target-linker-version 224.1 -gdwarf-2 -dwarf-column-info -D
"V8_DEPRECATION_WARNINGS" -D
"__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0" -D "CHROMIUM_BUILD" -D
"CR_CLANG_REVISION=214024" -D "COMPONENT_BUILD" -D "TOOLKIT_VIEWS=1" -D
"USE_LIBJPEG_TURBO=1" -D "ENABLE_ONE_CLICK_SIGNIN" -D "ENABLE_PRE_SYNC_BACKUP"
-D "ENABLE_REMOTING=1" -D "ENABLE_WEBRTC=1" -D "ENABLE_PEPPER_CDMS" -D
"ENABLE_CONFIGURATION_POLICY" -D "ENABLE_NOTIFICATIONS" -D "ENABLE_HIDPI=1" -D
"DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY" -D
"SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE" -D "ENABLE_EGLIMAGE=1" -D
"ENABLE_TASK_MANAGER=1" -D "ENABLE_EXTENSIONS=1" -D
"ENABLE_PLUGIN_INSTALLATION=1" -D "ENABLE_PLUGINS=1" -D
"ENABLE_SESSION_SERVICE=1" -D "ENABLE_THEMES=1" -D "ENABLE_AUTOFILL_DIALOG=1"
-D "ENABLE_BACKGROUND=1" -D "ENABLE_GOOGLE_NOW=1" -D "CLD_VERSION=2" -D
"CLD2_DATA_SOURCE=static" -D "ENABLE_FULL_PRINTING=1" -D "ENABLE_PRINTING=1" -D
"ENABLE_SPELLCHECK=1" -D "ENABLE_CAPTIVE_PORTAL_DETECTION=1" -D
"ENABLE_APP_LIST=1" -D "ENABLE_SETTINGS_APP=1" -D "ENABLE_MANAGED_USERS=1" -D
"ENABLE_SERVICE_DISCOVERY=1" -D "ENABLE_WIFI_BOOTSTRAPPING=1" -D
"GTEST_HAS_POSIX_RE=0" -D "GTEST_LANG_CXX11=0" -D "SKIA_DLL" -D
"GR_GL_IGNORE_ES3_MSAA=0" -D "SK_ENABLE_INST_COUNT=0" -D "SK_SUPPORT_GPU=1" -D
"GR_GL_CUSTOM_SETUP_HEADER=\"GrGLConfig_chrome.h\"" -D
"SK_ENABLE_LEGACY_API_ALIASING=1" -D "SK_ATTR_DEPRECATED=SK_NOTHING_ARG1" -D
"SK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT" -D "SK_SUPPORT_LEGACY_PICTURE_CLONE" -D
"SK_SUPPORT_LEGACY_GETDEVICE" -D "SK_IGNORE_ETC1_SUPPORT" -D
"SK_IGNORE_GPU_DITHER" -D "SK_USE_POSIX_THREADS" -D
"SK_DEFERRED_CANVAS_USES_FACTORIES=1" -D "UNIT_TEST" -D "GTEST_HAS_RTTI=0" -D
"U_USING_ICU_NAMESPACE=0" -D "U_ENABLE_DYLOAD=0" -D "__STDC_CONSTANT_MACROS" -D
"__STDC_FORMAT_MACROS" -D "DYNAMIC_ANNOTATIONS_ENABLED=1" -D
"WTF_USE_DYNAMIC_ANNOTATIONS=1" -O0 -Werror -Wnewline-eof -Wall -Wendif-labels
-Wextra -Wno-unused-parameter -Wno-missing-field-initializers
-Wno-selector-type-mismatch -Wheader-hygiene -Wno-char-subscripts
-Wno-unneeded-internal-declaration -Wno-covered-switch-default
-Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register
-Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11
-fdeprecated-macro -ferror-limit 19 -fmessage-length 0 -fvisibility hidden
-fvisibility-inlines-hidden -stack-protector 3 -mstackrealign -fblocks
-fno-rtti -fno-threadsafe-statics -fobjc-runtime=macosx-fragile-10.6.0
-fobjc-subscripting-legacy-runtime -fencode-extended-block-signature
-fdiagnostics-show-option -fcolor-diagnostics -load
/Volumes/bdd/tapted/git/3chromium/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib
-add-plugin find-bad-constructs -x c++ native_view_host_unittest-579c64.cpp

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140828/5a682701/attachment.html>


More information about the llvm-bugs mailing list