This commit is contained in:
orbitcowboy 2015-01-07 10:17:11 +01:00
commit 7bc31e363b
1 changed files with 13 additions and 1 deletions

View File

@ -54,7 +54,7 @@ private:
TEST_CASE(garbageCode11);
TEST_CASE(garbageCode12);
TEST_CASE(garbageCode13); // Ticket #2607 - crash
TEST_CASE(garbageCode14); // TIcket #5595 - crash
TEST_CASE(garbageCode14); // Ticket #5595 - crash
TEST_CASE(garbageCode15); // Ticket #5203
TEST_CASE(garbageCode16);
TEST_CASE(garbageCode17);
@ -64,6 +64,7 @@ private:
TEST_CASE(garbageCode21);
TEST_CASE(garbageCode22);
TEST_CASE(garbageCode23);
TEST_CASE(garbageCode24); // Ticket #6361 - crash
TEST_CASE(garbageValueFlow);
TEST_CASE(garbageSymbolDatabase);
@ -328,6 +329,17 @@ private:
ASSERT_EQUALS("", errout.str());
}
void garbageCode24() {
// don't crash (example from #6361)
checkCode("float buffer[64];\n"
"main (void)\n"
"{\n"
" char *cptr;\n"
" cptr = (char *)buffer;\n"
" cptr += (-(long int) buffer & (16 * sizeof (float) - 1));\n"
"}\n");
}
void garbageValueFlow() {
// #6089
const char* code = "{} int foo(struct, x1, struct x2, x3, int, x5, x6, x7)\n"