rui314 / 8cc

A Small C Compiler
MIT License
6.12k stars 743 forks source link

Segmentation fault compiling suckless/ubase package #90

Open ghost opened 6 years ago

ghost commented 6 years ago

My mail: Hello Rui I am Otto. I have tried your compiler - it looks great! But I think I found a bug. I have tried to compile "suckless" project's ubase package http://git.suckless.org/ubase/ It doesn't compile mount.c - it gives a segfault :(

(libutil/explicit_bzero.c don't compile - gives parse error or internal error) probably it is not implemented :(

Thank you for your compiler!

mount.c-gdb-out.txt mount.c-gdb-out2.txt ubase-e3dacbb5_tmp_8cc.tar.gz

ghost commented 6 years ago

it seems the process stops at "defaults" in this struct struct { const char opt; const char notopt; unsigned long v; } optnames[] = { { "defaults", NULL, 0 }, { "remount", NULL, MS_REMOUNT }, { "ro", "rw", MS_RDONLY }, { "sync", "async", MS_SYNCHRONOUS }, { "dirsync", NULL, MS_DIRSYNC }, { "nodev", "dev", MS_NODEV }, { "noatime", "atime", MS_NOATIME }, { "nodiratime", "diratime", MS_NODIRATIME }, { "noexec", "exec", MS_NOEXEC }, { "nosuid", "suid", MS_NOSUID }, { "mand", "nomand", MS_MANDLOCK }, { "relatime", "norelatime", MS_RELATIME }, { "bind", NULL, MS_BIND }, { NULL, NULL, 0 } };