LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 21816 - [fuzz] Assertion `SS.isSet() && "C++ scope was cleared ?"' failed.
Summary: [fuzz] Assertion `SS.isSet() && "C++ scope was cleared ?"' failed.
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: -New Bugs (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks: 23057
  Show dependency tree
 
Reported: 2014-12-10 14:39 PST by Sami Liedes
Modified: 2016-10-21 17:16 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
test case (8 bytes, text/x-c++src)
2014-12-10 14:39 PST, Sami Liedes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Liedes 2014-12-10 14:39:29 PST
Created attachment 13458 [details]
test case

Fuzzing discovered that the attached test case, when given as input to

  clang -fno-crash-diagnostics -std=c++11 -xc++ -c -emit-llvm

causes this assertion failure:

clang-3.6: tools/clang/include/clang/Parse/Parser.h:2184: clang::Parser::DeclaratorScopeObj::~DeclaratorScopeObj(): Assertion `SS.isSet() && "C++ scope was cleared ?"' failed.

This test case in particular is very small; it merely contains "::[]B::".
Comment 1 Alexander Makarov 2016-01-19 05:43:14 PST
I will handle this.

Alexander Makarov,
Intel Software Engineer
Comment 2 Reid Kleckner 2016-10-21 17:16:04 PDT
This appears fixed: 
$ echo '::[]B::' | clang -cc1 -x c++ -
<stdin>:1:3: error: expected unqualified-id
::[]B::
  ^
1 error generated.