[llvm-bugs] [Bug 40286] New: Typo + missing function parameters = crash
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jan 10 12:30:35 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40286
Bug ID: 40286
Summary: Typo + missing function parameters = crash
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Keywords: crash-on-invalid
Severity: release blocker
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: husseydevin at gmail.com
CC: husseydevin at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Created attachment 21312
--> https://bugs.llvm.org/attachment.cgi?id=21312&action=edit
crash dump
When a function call has both a missing parameter and a typo in one of the
parameters that Clang recognizes, Clang trunk (r350783 - r350877 at least)
crashes. Clang 7.0 is not affected.
This isn't a platform-specific issue, it currently occurs on the Linux-based
Compiler Explorer as seen here: https://godbolt.org/z/ngCmP_
Arguments:
clang -fsyntax-only test5.c
int foo(int x, int y);
int bar(int value) {
return foo(valie);
}
Notice the typo in "valie" and the missing parameter.
----
Preprocessed source isn't really necessary, but here it is:
# 1 "<built-in>"
# 1 "/Users/user/test5.c"
int foo(int x, int y);
int bar(int value) {
return foo(valie);
}
----
shell script:
# Crash reproducer for clang version 8.0.0 (trunk 350877)
# Driver args: "-fsyntax-only" "/Users/user/test5.c"
# Original command: "/Users/user/llvm/llvm/build/bin/clang-8" "-cc1" "-triple"
"x86_64-apple-macosx10.14.0" "-Wdeprecated-objc-isa-usage"
"-Werror=deprecated-objc-isa-usage" "-fsyntax-only" "-disable-free"
"-main-file-name" "test5.c" "-mrelocation-model" "pic" "-pic-level" "2"
"-mthread-model" "posix" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables"
"-target-cpu" "penryn" "-dwarf-column-info" "-debugger-tuning=lldb"
"-ggnu-pubnames" "-target-linker-version" "409.12" "-resource-dir"
"/Users/user/llvm/llvm/build/lib/clang/8.0.0"
"-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include"
"-I/usr/local/include" "-fdebug-compilation-dir" "/Users/user/llvm/llvm/build"
"-ferror-limit" "19" "-fmessage-length" "238" "-stack-protector" "1" "-fblocks"
"-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit"
"-fobjc-runtime=macosx-10.14.0" "-fmax-type-align=16"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-x" "c"
"/Users/user/test5.c"
"/Users/user/llvm/llvm/build/bin/clang-8" "-cc1" "-triple"
"x86_64-apple-macosx10.14.0" "-Wdeprecated-objc-isa-usage"
"-Werror=deprecated-objc-isa-usage" "-fsyntax-only" "-disable-free"
"-main-file-name" "test5.c" "-mrelocation-model" "pic" "-pic-level" "2"
"-mthread-model" "posix" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables"
"-target-cpu" "penryn" "-dwarf-column-info" "-debugger-tuning=lldb"
"-ggnu-pubnames" "-target-linker-version" "409.12" "-ferror-limit" "19"
"-fmessage-length" "238" "-stack-protector" "1" "-fblocks"
"-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit"
"-fobjc-runtime=macosx-10.14.0" "-fmax-type-align=16"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-x" "c" "test5-49dc52.c"
------
Crash dump is attached.
------
macOS 10.14.2 (Mojave Patcher)
MacBook Pro (15-inch, Early 2011) / MacBookPro8,2
Intel Core i7 (2nd Generation/Sandy Bridge) @ 4 cores, 2.0 GHz
8 GB RAM
LLVM and Clang built from source, CMAKE_C{XX}_FLAGS="-O0 -g",
CMAKE_BUILD_TYPE="Debug", LLVM_TARGETS_TO_BUILD="X86;ARM"
Compiled with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
--
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/20190110/5d1049f7/attachment.html>
More information about the llvm-bugs
mailing list