seanbaxter / circle

The compiler is available for download. Get it!
http://www.circle-lang.org/
2.35k stars 72 forks source link

circle segfaults when given input from stdin #207

Open nithrill opened 3 months ago

nithrill commented 3 months ago

The following commands cause a segfault:

$ echo | circle -E -dM -
Segmentation fault
$ echo "" | circle -E -dM -
Segmentation fault
$ echo "int main() {}" | circle -E -dM -
Segmentation fault
$ circle -E -dM - <<EOF
> int main() {}
> EOF
Segmentation fault

The expected result should be the same as executing:

$ circle -E -dM empty.cpp
#define __circle_build__ 205
<... snip ...>
#define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED

where empty.cpp is just empty (created in bash via > empty.cpp)