Bitwise » Forums » Potential bug found.
Murii
1 posts
#15909 Potential bug found.
2 months, 2 weeks ago Edited by Murii on Aug. 3, 2018, 7:36 a.m.

Hello,
I've been playing around with the language a bit. While playing with it I wrote this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import libc {...}

func fib(a: int): int {
    if (a <= 1) {
        return 1;
    } else {
        return fib(a-1)+fib(a-2);
    }
}
func main(argc: int, argv: char**): int {
    printf("FIB: %d\n", fib(30));
    return 0;
}


Resulting in a SEGMENT Fault.
GDB tells this: a=<error reading variable: Cannot access memory at address 0x7fffff7fefec>)