Aleksi Nurmi wrote: > I was searching the Web for system programming languages, found BitC > and decided to rsync it out. However, I encountered a few bugs and > investigated them a little. I couldn't find a bug tracker, so I > thought I'd post my findings here. For the record, I'm running the > AMD64 version of Ubuntu Linux.
Aleksi: Thanks for pointing out the bugs. I have tried to address these issues in my latest commit. > 1. This is the most obvious one: lib64/libbitc.bita is missing > whitespace after import statements, resulting in lines such as > "(importbitc.stdio as stdio)". Fixed this bug. Thanks for the patch too. I did not really apply it since the change was very small, but it is the same solution. > 2. Reading a character from standard input often segfaults. The cause > is libbitc/stdio.c and a null/uninitialized pointer. Placing > assert(ios->f) right after fix_stdio_stream(ios) _sometimes_ catches a > null pointer. This is pretty strange, because I was unable to reproduce this bug. How are you running it? I ran the same program (called h2.bitc below) > (bitc-version "0.10") > (import bitc.main as main) > (provide bitc.main main) > (import bitc.stdio as stdio) > > (define main.main:(fn (vector string) -> int32) > (lambda (argvec) > (stdio.read-char stdio.stdin) > (stdio.write-string stdio.stdout "hello") > (stdio.write-char stdio.stdout #\linefeed) > 0)) and it runs fine: [EMAIL PROTECTED] compiler]$ BUILD/bitcc --nostdlib -I ../libbitc/ -o h2 h2.bitc ../libbitc/BUILD/libbitc.a [EMAIL PROTECTED] compiler]$ ./h2 a hello > 3. This is not a bug per se, but rather an usability nitpick. I had to > read the source to find out how to make bitcc find its libraries from > a nonstandard --prefix location and to output C code. I added a extra line (--emit 'Language') to the bitc --help output that shows how to specify the output language. About the library issue, are you talking about the --system option? Swaroop. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
