Closed GabrielRavier closed 2 years ago
Hello @GabrielRavier, hello @davidgiven,
Apparently there is a null pointer dereference at line 709 of lang/cem/cpp.ansi/replace.c
, which will be here:
702 if (*ptr & FORMALP) {
703 register int n = *ptr++ & 0177;
704 register char *p;
705
706 assert(n != 0);
707 p = args->a_rawvec[n-1];
708 add2repl(repl, '"');
709 while (*p) {
710 if (is_wsp(*p)) {
711 if (!space) {
712 space = 1;
713 add2repl(repl, ' ');
714 }
715 p++;
716 continue;
717 }
718 space = 0;
... ...
729 }
Thank you!
Trying to pre-process this results in this output:
This seems to be caused by the code trying to stringify the non-existent argument to the macro. (Also, while I suppose crashing is a technically correct response to ill-formed code, it doesn't exactly seem very appropriate to have it ever happen in general)