Stone Division, Revisited

  • + 1 comment

    I have been testing using the C-code base. I inserted the following simple code:

    long stoneDivision (long n, int s_count, long* s) {
        printf ("30\n");
        return (30);
    }
    

    I compiled it on my RedHat 8.7 system. When I run it with the test input, it cored (tmp.c is the C-code base + above 4 lines of code):

    # gcc tmp.c
    # a.out
    4                       <-- input one line at a time
    64 5             
    2 4 8 16 64
    30               
    Segmentation fault (core dumped)
    

    Looks like there is some issue with the original C-code base.