libfirm/cparser

Segfault in is_Id (libFirm.so) due to misparse

ibara opened this issue · 0 comments

ibara commented

Hello --

The following code causes a segfault in is_Id.
Ideally, cparser should reject this code on line 6 (while (c[1])) since it makes no sense in context.

Thanks!

a;
double b;
c() {
  if (a)
    if (0 % 0)
      while (c[1])
        ;
  while ((unsigned long)b)
    ;
}