- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 270
Description
I recently tried building master both natively and as a linux/x64 cross-compiler and ran into these issues with the tests. I will look into these more and submit patches for the phobos bugs upstream, would like some help with the LDC ones.
LDC issues
- std.digest.murmurhashsegfaults with a- Bus erroron its last test, when it tries to compute the- unalignedHashwith any llvm optimizations. This is reproducible going back to ltsmaster: all of 0.17.3, 1.1.1, and 1.2 (each built against llvm 3.9.1) pass this test without optimizations but segfault with- -01or higher optimizations. This module was added with 1.2 so obviously it wasn't tested with those older D versions before, but it seems to have uncovered some ARM codegen issue.
- std.randomsegfaults with this error when compiled with- -O2or higher:
 - Fatal error in EH code: _Unwind_RaiseException failed with reason code: 9 Aborted
 A gdb backtrace shows that it fails in the massive last test block. ldc 0.17.3 can't build the 1.2 version of this module's tests because of a static assert, while 1.1.1 has no problem with it, even with all optimizations. This looks like the ARM codegen errors we were getting before, @smolt?
Phobos issues
- Vlad added a new linux-only test that seems to expect too much precision from std.fileon Android, it passes if I change the last digit from a 7 to 0.
- tsbockman added some tests to std.jsonthat needed to be relaxed for platforms with 64-bit reals. AddingAndroidto those two version blocks gets the tests to pass again.
- Vlad added a File.reopentostd.stdiowhich can't change modes on Android:
 std/stdio.d(658): Cannot reopen file in mode 'w' (Bad address)
I used to build for Android/x86 from upstream and catch these stdlib issues early, but haven't done that in awhile, especially since my last x86 device died more than a year ago. I may look into installing Android/x86 in a VPS and run the upstream tests there.
The good news is that @kinke's 1.2 changes to somewhat allow cross-compiling reals work fine, ie all the same druntime/phobos tests pass when cross-compiled from linux/x64, so that applying #1317 wasn't needed anymore. Also, the full dmd-testsuite still passes natively on Android/ARM. 💃