#8385: Segmentation fault on garbage code. Added regression test.

This commit is contained in:
orbitcowboy 2018-09-10 16:24:09 +02:00
parent bc84ce43ec
commit 95da9f77c4
1 changed files with 6 additions and 0 deletions

View File

@ -227,6 +227,7 @@ private:
TEST_CASE(garbageCode194); // #8384
TEST_CASE(garbageCode195); // #8709
TEST_CASE(garbageCode196); // #8265
TEST_CASE(garbageCode197); // #8385
TEST_CASE(garbageCodeFuzzerClientMode1); // test cases created with the fuzzer client, mode 1
@ -1523,6 +1524,11 @@ private:
ASSERT_THROW(checkCode(";|4|<0;"), InternalError);
}
// #8385
void garbageCode197() {
ASSERT_THROW(checkCode("(){e break,{(case)|{e:[()]}}}"), InternalError);
}
void syntaxErrorFirstToken() {
ASSERT_THROW(checkCode("&operator(){[]};"), InternalError); // #7818
ASSERT_THROW(checkCode("*(*const<> (size_t); foo) { } *(*const (size_t)() ; foo) { }"), InternalError); // #6858