Skip to content
Snippets Groups Projects
  1. Feb 06, 2025
    • Cheng Shao's avatar
      ghci: use plain malloc for mkConInfoTable on non-TNTC platforms · 1804f12f
      Cheng Shao authored
      This patch avoids using mmap() to allocate executable memory for
      mkConInfoTable on platforms without tables-next-to-code, see added
      comment for explanation.
      
      (cherry picked from commit 839ac52e)
      (cherry picked from commit e54e3335)
      (cherry picked from commit 23cab8a1)
      1804f12f
    • Cheng Shao's avatar
      rts: use page sized mblocks on wasm · 75956767
      Cheng Shao authored
      This patch changes mblock size to page size on wasm. It allows us to
      simplify our wasi-libc fork, makes it much easier to test third party
      libc allocators like emmalloc/mimalloc, as well as experimenting with
      threaded RTS in wasm.
      
      (cherry picked from commit 558353f4)
      (cherry picked from commit f3ea9fb8)
      (cherry picked from commit f747805f)
      75956767
    • Cheng Shao's avatar
      testsuite: bump T7653 timeout for wasm · 677c2c55
      Cheng Shao authored
      (cherry picked from commit 2eee65e1)
      (cherry picked from commit 3f7b718f)
      (cherry picked from commit 77cc78eb)
      677c2c55
    • Cheng Shao's avatar
      testsuite: mark T7773 as fragile on wasm · c98aeaf1
      Cheng Shao authored
      (cherry picked from commit ae50a8eb)
      (cherry picked from commit b7e93bc9)
      (cherry picked from commit f2388ebc)
      c98aeaf1
    • Cheng Shao's avatar
      ghc-bignum: remove obsolete ln script · bb440214
      Cheng Shao authored
      This commit removes an obsolete ln script in ghc-bignum/gmp. See
      060251c2 for its original intention,
      but it's been obsolete for a long time, especially since the removal
      of the make build system. Hence the house cleaning.
      
      (cherry picked from commit c62dc317)
      (cherry picked from commit 5f4848c0)
      (cherry picked from commit 5b9561d6)
      bb440214
    • Cheng Shao's avatar
      base: treat all FDs as "nonblocking" on wasm · a1a37769
      Cheng Shao authored
      On posix platforms, when performing read/write on FDs, we check the
      nonblocking flag first. For FDs without this flag (e.g. stdout), we
      call fdReady() first, which in turn calls poll() to wait for I/O to be
      available on that FD. This is problematic for wasm32-wasi: although
      select()/poll() is supported via the poll_oneoff() wasi syscall, that
      syscall is rather heavyweight and runtime behavior differs in
      different wasi implementations. The issue is even worse when targeting
      browsers, given there's no satisfactory way to implement async I/O as
      a synchronous syscall, so existing JS polyfills for wasi often give up
      and simply return ENOSYS.
      
      Before we have a proper I/O manager that avoids poll_oneoff() for
      async I/O on wasm, this patch improves the status quo a lot by merely
      pretending all FDs are "nonblocking". Read/write on FDs will directly
      invoke read()/write(), which are much more reliably handled in
      existing wasi implementations, especially those in browsers.
      
      Fixes #23275 and the following test cases: T7773 isEOF001 openFile009
      T4808 cgrun025
      
      Approved by CLC proposal #234:
      https://github.com/haskell/core-libraries-committee/issues/234
      
      (cherry picked from commit 2eca52b4)
      (cherry picked from commit 288692dd)
      a1a37769
    • Cheng Shao's avatar
      Bump time submodule · ab152c79
      Cheng Shao authored
      (cherry picked from commit bd575a13)
      ab152c79
    • Cheng Shao's avatar
      testsuite: wasm32-specific fixes · 4459f436
      Cheng Shao authored
      This patch includes all wasm32-specific testsuite fixes.
      
      (cherry picked from commit bd2bfdec)
      4459f436
    • Sylvain Henry's avatar
      testsuite: req_smp --> req_target_smp, req_ghc_smp · 73528452
      Sylvain Henry authored and Cheng Shao's avatar Cheng Shao committed
      See #22630 and !9552
      
      This commit:
       - splits req_smp into req_target_smp and req_ghc_smp
       - changes the testsuite driver to calculate req_ghc_smp
       - changes a handful of tests to use req_target_smp instead of req_smp
       - changes a handful of tests to use req_host_smp when needed
      
      The problem:
       - the problem this solves is the ambiguity surrounding req_smp
       - on master req_smp was used to express the constraint that the program
       being compiled supports smp _and_ that the host RTS (i.e., the RTS used
       to compile the program) supported smp. Normally that is fine, but in
       cross compilation this is not always the case as was discovered in #22630.
      
      The solution:
       - Differentiate the two constraints:
         - use req_target_smp to say the RTS the compiled program is linked
         with (and the platform) supports smp
         - use req_host_smp to say the RTS the host is linked with supports smp
      
      WIP: fix req_smp (target vs ghc)
      
      add flag to separate bootstrapper
      
      split req_smp -> req_target_smp and req_ghc_smp
      
      update tests smp flags
      
      cleanup and add some docstrings
      
      only set ghc_with_smp to bootstrapper on S1 or CC
      
      Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1
      and cross compiling
      
      test the RTS in config/ghc not hadrian
      
      re-add ghc_with_smp
      
      fix and align req names
      
      fix T11760 to use req_host_smp
      
      test the rts directly, avoid python 3.5 limitation
      
      test the compiler in a try block
      
      align out of tree and in tree withSMP flags
      
      mark failing tests as host req smp
      
      testsuite: req_host_smp --> req_ghc_smp
      
      Fix ghc vs host, fix ghc_with_smp leftover
      
      (cherry picked from commit 06036d93)
      73528452
    • Cheng Shao's avatar
      rts: always build 64-bit atomic ops · 59e7a38f
      Cheng Shao authored
      This patch does a few things:
      
      - Always build 64-bit atomic ops in rts/ghc-prim, even on 32-bit
        platforms
      - Remove legacy "64bit" cabal flag of rts package
      - Fix hs_xchg64 function prototype for 32-bit platforms
      - Fix AtomicFetch test for wasm32
      
      (cherry picked from commit 87095f6a)
      59e7a38f
  2. Jan 27, 2025
    • Cheng Shao's avatar
      ghc-bignum: update gmp to 6.3.0 · af3e9b37
      Cheng Shao authored and Luite Stegeman's avatar Luite Stegeman committed
      This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0.
      The tarball format is now xz, and gmpsrc.patch has been patched into
      the tarball so hadrian no longer needs to deal with patching logic
      when building in-tree GMP.
      
      (cherry picked from commit 6399d52b)
      af3e9b37
  3. Jan 20, 2025
  4. Jan 16, 2025
  5. Jun 28, 2024
  6. Apr 15, 2024
  7. Apr 02, 2024
  8. Jan 08, 2024
    • Rodrigo Mesquita's avatar
      testsuite: Encoding test witnesses recent iconv bug is fragile · 3187fc76
      Rodrigo Mesquita authored and Zubin's avatar Zubin committed
      A regression in the new iconv() distributed with XCode 15 and MacOS
      Sonoma causes the test 'encoding004' to fail in the CP936 roundrip.
      
      We mark this test as fragile until this is fixed upstream (rather than
      broken, since previous versions of iconv pass the test)
      
      See #24161
      
      (cherry picked from commit c411c431)
      3187fc76
  9. Jan 03, 2024
  10. Dec 18, 2023
    • Sylvain Henry's avatar
      Fix remaining issues with bound checking (#23123) · d86cd08b
      Sylvain Henry authored and Zubin's avatar Zubin committed
      While fixing these I've also changed the way we store addresses into
      ByteArray#. Addr# are composed of two parts: a JavaScript array and an
      offset (32-bit number).
      
      Suppose we want to store an Addr# in a ByteArray# foo at offset i.
      Before this patch, we were storing both fields as a tuple in the "arr"
      array field:
      
        foo.arr[i] = [addr_arr, addr_offset];
      
      Now we only store the array part in the "arr" field and the offset
      directly in the array:
      
        foo.dv.setInt32(i, addr_offset):
        foo.arr[i] = addr_arr;
      
      It avoids wasting space for the tuple.
      
      (cherry picked from commit 2d5c1dde)
      d86cd08b
  11. Dec 15, 2023
  12. Dec 13, 2023
Loading