[llvm-bugs] [Bug 44580] New: clang frontend crash due to an exponential complexity of typo corrector
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 17 07:07:02 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44580
Bug ID: 44580
Summary: clang frontend crash due to an exponential complexity
of typo corrector
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: RudenkoRNK at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Created attachment 23023
--> https://bugs.llvm.org/attachment.cgi?id=23023&action=edit
typos.cpp from description
Compiling typos.cpp ends with an "LLVM ERROR: out of memory"
typos.cpp is a very simple file with n=10 int definitions and a function call
with n arguments.
When clang analyzes this file it tries to correct typos in it. In order to do
this it calls method
clangSema::SemaExprCXX.cpp::CheckAndAdvanceTypoExprCorrectionStreams
The problem is that amount of calls is around 8^(n-1), which leads to a crash
or infinitely long waiting time.
--
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/20200117/b9d39d3d/attachment.html>
More information about the llvm-bugs
mailing list