News for hackers. Stuff that matters.
Re:50 Bytes of Code That Took 4 GB to Compile (2013) by bluetomcat on Monday February 13, 2017 @01:26PM (#13637493)
I have accidentally discovered a bug in Clang that causes the compiler generate millions of consecutive "addq $2147483647, %rsp" instructions and it wouldn't terminate maybe in hours (it could probably be an infinite loop, I haven't seen it terminate):

    $ clang --version
    Apple LLVM version 8.0.0 (clang-800.0.38)
    Target: x86_64-apple-darwin16.4.0
    ...
    $ cat test.c
    #include <stdint.h>

    int main(void) {
        int x[SIZE_MAX / 31];
        return 0;
    }
    $ clang test.c
    test.c:5:11: error: array is too large (595056260442243600 elements)
    int x[SIZE_MAX / 31];
    $ cat test-2.c
    #include <stdint.h>

    int main(void) {
        int x[SIZE_MAX / 32];
        return 0;
    }
    $ clang test-2.c
    ... Keep waiting :-) ...
Re:50 Bytes of Code That Took 4 GB to Compile (2013) by sdardis on Wednesday February 15, 2017 @08:23AM (#13651792)
Re:50 Bytes of Code That Took 4 GB to Compile (2013) by sdardis on Tuesday February 14, 2017 @05:47PM (#13648025)
Interesting, I'm seeing this on clang trunk.
Re:50 Bytes of Code That Took 4 GB to Compile (2013) by foota on Monday February 13, 2017 @06:29PM (#13639868)
Strange, seems like it should do that with a loop.