[llvm-bugs] [Bug 42775] New: Crash in GetNeonType

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 26 07:19:31 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42775

            Bug ID: 42775
           Summary: Crash in GetNeonType
           Product: new-bugs
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dmajor at mozilla.com
                CC: hans at chromium.org, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org
            Blocks: 42474

Clang-cl from the release_90 branch crashes while compiling Firefox for
aarch64-windows.

Unfortunately I couldn't reproduce this locally, it only crashes with Mozilla
automation's clang builds, which don't publish debug symbols. By tracing
execution side-by-side with the crashy build and my own build that has symbols,
I narrowed this down to an unhandled switch case in `GetNeonType`. The
`TypeFlags.Flags` are -1.

Reduced buffer.c:
foo() {
 _InterlockedExchangeAdd64(0, -1);
}

Command line from the reproducer script:
"clang-cl.exe" "-cc1" "-triple" "aarch64-unknown-windows-msvc19.16.27026"
"-emit-obj" "-mincremental-linker-compatible" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "buffer.c"
"-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim"
"-relaxed-aliasing" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-target-cpu" "generic" "-target-feature" "+neon"
"-target-abi" "aapcs" "-fallow-half-arguments-and-returns" "-D_MT" "-D_DLL"
"--dependent-lib=msvcrt" "--dependent-lib=oldnames" "-stack-protector" "2"
"-fdiagnostics-format" "msvc" "-gcodeview" "-debug-info-kind=limited"
"-ffunction-sections" "-fdata-sections" "-coverage-notes-file"
"z:\\build\\build\\src\\obj-firefox\\media\\ffvpx\\libavutil\\buffer.gcno" "-D"
"DEBUG=1" "-D" "_USE_MATH_DEFINES" "-D" "inline=__inline" "-D"
"HAVE_AV_CONFIG_H" "-D" "ASSERT_LEVEL=2" "-D" "MOZILLA_CLIENT" "-D"
"_HAS_EXCEPTIONS=0" "-O2" "-Wall" "-Wno-unknown-pragmas" "-Wno-ignored-pragmas"
"-Wno-deprecated-declarations" "-Wno-invalid-noreturn" "-Wno-parentheses"
"-Wno-pointer-sign" "-Wno-sign-compare" "-Wno-switch" "-Wno-type-limits"
"-Wno-unused-function" "-Wno-deprecated-declarations" "-Wno-absolute-value"
"-Wno-incompatible-pointer-types" "-Wno-string-conversion" "-Wno-visibility"
"-Wno-inconsistent-dllimport" "-Wno-macro-redefined" "-ferror-limit" "19"
"-fmessage-length" "0" "-fno-use-cxa-atexit" "-fms-extensions"
"-fms-compatibility" "-fms-compatibility-version=19.16.27026"
"-fdelayed-template-parsing" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
"-vectorize-loops" "-vectorize-slp" "-std=gnu99" "-faddrsig" "-x" "c"
"buffer.c"

Stack (the top frame is actually GetNeonType, the symbols are missing):

00 clang_cl!clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr
01 clang_cl!clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr
02 clang_cl!clang::CodeGen::CodeGenFunction::EmitBuiltinExpr
03 clang_cl!clang::CodeGen::CodeGenFunction::EmitCallExpr
04 clang_cl!clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP
05 clang_cl!clang::CodeGen::CodeGenFunction::EmitScalarExpr
06 clang_cl!clang::CodeGen::CodeGenFunction::EmitAnyExpr
07 clang_cl!clang::CodeGen::CodeGenFunction::EmitIgnoredExpr
08 clang_cl!clang::CodeGen::CodeGenFunction::EmitStmt
09 clang_cl!clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope
0a clang_cl!clang::CodeGen::CodeGenFunction::EmitFunctionBody
0b clang_cl!clang::CodeGen::CodeGenFunction::GenerateCode
0c clang_cl!clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition
0d clang_cl!clang::CodeGen::CodeGenModule::EmitGlobalDefinition
0e clang_cl!clang::CodeGen::CodeGenModule::EmitGlobal
0f clang_cl!clang::CodeGen::CodeGenModule::EmitTopLevelDecl
10 clang_cl!clang::CreateLLVMCodeGen
11 clang_cl!clang::BackendConsumer::HandleTopLevelDecl
12 clang_cl!clang::ParseAST
13 clang_cl!clang::FrontendAction::Execute
14 clang_cl!clang::CompilerInstance::ExecuteAction
15 clang_cl!clang::ExecuteCompilerInvocation
16 clang_cl!clang::ChainedDiagnosticConsumer::HandleDiagnostic
17 clang_cl
18 clang_cl!llvm::itanium_demangle::OutputStream::writeUnsigned
19 KERNEL32!BaseThreadInitThunk
1a ntdll!RtlUserThreadStart


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=42474
[Bug 42474] [meta] 9.0.0 Release Blockers
-- 
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/20190726/4e60dd23/attachment.html>


More information about the llvm-bugs mailing list