History

genksyms: Fix segfault with invalid declarations

Do not try to recover too early and segfault when parsing invalid declarations such as echo 'int (int);' | scripts/genksyms/genksyms echo 'int a, (int);' | scripts/genksyms/genksyms echo 'extern void *__inline_memcpy((void *), (const void *), (__kernel_size_t));' | scripts/genksyms/genksyms The last one was a real-life bug with include/asm-generic/asm-prototypes.h on x86_64.

Michal Marek committed 9 years ago

Commit d920f7c1 parent 7ce7d891 file · +0 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/genksyms/parse.y+0−2
@@ -322,8 +322,6 @@ direct_declarator: · 321 unmodified lines
322 { $$ = $2; }322 { $$ = $2; }
323 | '(' declarator ')'323 | '(' declarator ')'
324 { $$ = $3; }324 { $$ = $3; }
325 | '(' error ')'
326 { $$ = $3; }
327 ;325 ;
328 326
329/* Nested declarators differ from regular declarators in that they do327/* Nested declarators differ from regular declarators in that they do