stormalf / chibicc

A small C compiler from rui314
MIT License
6 stars 1 forks source link

ISS-166 during postgres compile segmentation fault #59

Closed stormalf closed 4 months ago

stormalf commented 1 year ago

during postgres compile segmentation fault : chibicc -fno-strict-aliasing -fpic -I../../../../src/include -D_GNU_SOURCE -c -o pruneheap.o pruneheap.c Thread 2.1 "chibicc" received signal SIGSEGV, Segmentation fault.

It was caused by VLA type in sizeof function : ... typedef struct { int nredirected; / numbers of entries in arrays below / int ndead; int nunused; /*

} PruneState; ... memset(prstate.marked, 0, sizeof(prstate.marked));