1. 16 Jul, 2018 1 commit
    • Simon Marlow's avatar
      Support the GHCi debugger with -fexternal-interpreter · 3bdf0d01
      Simon Marlow authored
      * All the tests in tests/ghci.debugger now pass with
        -fexternal-interpreter. These tests are now run with the ghci-ext way
        in addition to the normal way so we won't break it in the future.
      
      * I removed all the unsafeCoerce# calls from RtClosureInspect. Yay!
      
      The main changes are:
      
      * New messages: GetClosure and Seq.  GetClosure is a remote interface to
        GHC.Exts.Heap.getClosureData, which required Binary instances for
        various datatypes. Fortunately this wasn't too painful thanks to
        DeriveGeneric.
      
      * No cheating by unsafeCoercing values when printing them. Now we have
        to turn the Closure representation back into the native representation
        when printing Int, Float, Double, Integer and Char. Of these, Integer
        was the most painful - we now have a dependency on integer-gmp due to
        needing access to the representation.
      
      * Fixed a bug in rts/Heap.c - it was bogusly returning stack content as
        pointers for an AP_STACK closure.
      
      Test Plan:
      * `cd testsuite/tests/ghci.debugger && make`
      * validate
      
      Reviewers: bgamari, patrickdoc, nomeata, angerman, hvr, erikd, goldfire
      
      Subscribers: alpmestan, snowleopard, rwbarton, thomie, carter
      
      GHC Trac Issues: #13184
      
      Differential Revision: https://phabricator.haskell.org/D4955
      3bdf0d01
  2. 04 Jul, 2018 1 commit
    • Ömer Sinan Ağacan's avatar
      Fix nptr field alignment in RtClosureInspect · 15bb4e0b
      Ömer Sinan Ağacan authored
      `extractSubTerms` (which is extracting pointer and non-pointer fields of a
      closure) was computing the alignment incorrectly when aligning a 64-bit value
      (e.g. a Double) on i386 by aligning it to 64-bits instead of to word size
      (32-bits). This is documented in `mkVirtHeapOffsetsWithPadding`:
      
      > Align the start offset (eg, 2-byte value should be 2-byte aligned).
      > But not more than to a word.
      
      Fixes #15061
      
      Test Plan:
      Validated on both 32-bit and 64-bit. 32-bit fails with various unrelated stat
      failures, but no actual test failures.
      
      Reviewers: hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: simonpj, rwbarton, thomie, carter
      
      GHC Trac Issues: #15061
      
      Differential Revision: https://phabricator.haskell.org/D4906
      15bb4e0b
  3. 17 Jun, 2018 1 commit
  4. 15 Nov, 2017 1 commit
    • Peter Trommler's avatar
      RTS: Disable warnings in ffi.h · 8b1020ed
      Peter Trommler authored
      The update of GHC's in-tree libffi causes warnings about
      undefined macros and hence validate fails.
      
      Also mark broken tests that have a ticket.
      
      Fixes #14353
      
      Test Plan: ./validate (on AIX and powerpc if possible)
      
      Reviewers: bgamari, hvr, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: snowleopard, rwbarton, thomie
      
      GHC Trac Issues: #14353, #11259, #14455, #11261
      
      Differential Revision: https://phabricator.haskell.org/D4181
      8b1020ed
  5. 30 Oct, 2017 1 commit
    • Michal Terepeta's avatar
      Allow packing constructor fields · cca2d6b7
      Michal Terepeta authored
      This is another step for fixing #13825 and is based on D38 by Simon
      Marlow.
      
      The change allows storing multiple constructor fields within the same
      word. This currently applies only to `Float`s, e.g.,
      ```
      data Foo = Foo {-# UNPACK #-} !Float {-# UNPACK #-} !Float
      ```
      on 64-bit arch, will now store both fields within the same constructor
      word. For `WordX/IntX` we'll need to introduce new primop types.
      
      Main changes:
      
      - We now use sizes in bytes when we compute the offsets for
        constructor fields in `StgCmmLayout` and introduce padding if
        necessary (word-sized fields are still word-aligned)
      
      - `ByteCodeGen` had to be updated to correctly construct the data
        types. This required some new bytecode instructions to allow pushing
        things that are not full words onto the stack (and updating
        `Interpreter.c`). Note that we only use the packed stuff when
        constructing data types (i.e., for `PACK`), in all other cases the
        behavior should not change.
      
      - `RtClosureInspect` was changed to handle the new layout when
        extracting subterms. This seems to be used by things like `:print`.
        I've also added a test for this.
      
      - I deviated slightly from Simon's approach and use `PrimRep` instead
        of `ArgRep` for computing the size of fields.  This seemed more
        natural and in the future we'll probably want to introduce new
        primitive types (e.g., `Int8#`) and `PrimRep` seems like a better
        place to do that (where we already have `Int64Rep` for example).
        `ArgRep` on the other hand seems to be more focused on calling
        functions.
      Signed-off-by: Michal Terepeta's avatarMichal Terepeta <michal.terepeta@gmail.com>
      
      Test Plan: ./validate
      
      Reviewers: bgamari, simonmar, austin, hvr, goldfire, erikd
      
      Reviewed By: bgamari
      
      Subscribers: maoe, rwbarton, thomie
      
      GHC Trac Issues: #13825
      
      Differential Revision: https://phabricator.haskell.org/D3809
      cca2d6b7
  6. 19 Oct, 2017 1 commit
    • Jessica Clarke's avatar
      Untag the potential AP_STACK in stg_getApStackValzh · b6204f70
      Jessica Clarke authored
      If the AP_STACK has been evaluated and a GC has run, the BLACKHOLE
      indirection will have been removed, and the StablePtr for the original
      AP_STACK referred to be GHCi will therefore now point directly to the
      value, and may be tagged. Add a hist002 test for this, and make sure
      hist001 doesn't do an idle GC, so the case when it's still a BLACKHOLE
      is definitely also tested.
      
      Reviewers: austin, bgamari, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D4099
      b6204f70
  7. 16 Oct, 2017 1 commit
  8. 27 Jul, 2017 1 commit
    • Andreas Klebinger's avatar
      Initialize hs_init with UTF8 encoded arguments on Windows. · 7af0b906
      Andreas Klebinger authored
      Summary:
      Get utf8 encoded arguments before we call hs_init and use them
      instead of ignoring hs_init arguments. This reduces differing
      behaviour of the RTS between windows and linux and simplifies
      the code involved.
      
      A few testcases were changed to expect the same result on windows
      as on linux after the changes.
      
      This fixes #13940.
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari, erikd, simonmar, Phyx
      
      Subscribers: Phyx, rwbarton, thomie
      
      GHC Trac Issues: #13940
      
      Differential Revision: https://phabricator.haskell.org/D3739
      7af0b906
  9. 26 Feb, 2017 2 commits
    • rwbarton's avatar
      tests: remove extra_files.py (#12223) · 3415bcaa
      rwbarton authored
      The script I used is included as testsuite/driver/kill_extra_files.py,
      though at this point it is for mostly historical interest.
      
      Some of the tests in libraries/hpc relied on extra_files.py, so this
      commit includes an update to that submodule.
      
      One test in libraries/process also relies on extra_files.py, but we
      cannot update that submodule so easily, so for now we special-case it
      in the test driver.
      3415bcaa
    • rwbarton's avatar
      tests: manually move some extra_files into *.T files · 98119f5a
      rwbarton authored
      Some of the *.T files were in libraries/hpc, so this contains an
      update to that submodule.
      98119f5a
  10. 22 Jan, 2017 1 commit
  11. 17 Oct, 2016 1 commit
  12. 23 Aug, 2016 1 commit
  13. 18 Jun, 2016 1 commit
    • thomie's avatar
      Testsuite: run tests in <testdir>.run instead of /tmp · f72f23f9
      thomie authored
      As discussed in Phab:D1187, this approach makes it a bit easier to
      inspect the test directory while working on a new test.
      
      The only tests that needed changes are the ones that refer to files in
      ancestor directories. Those files are now copied directly into the test
      directory.
      
      validate still runs the tests in a temporary directory in /tmp, see
      `Note [Running tests in /tmp]` in testsuite/driver/runtests.py.
      
      Update submodule hpc.
      
      Reviewed by: simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2333
      
      GHC Trac Issues: #11980
      f72f23f9
  14. 25 Feb, 2016 1 commit
    • Peter Trommler's avatar
      testsuite: mark tests broken on powerpc64 · feb19eae
      Peter Trommler authored
      The following tests fail on powerpc64 and have a ticket.
      Mark those tests as expect_broken.
      
      Here are the details:
      The PowerPC native code generator does not support DWARF debug
      information. This is tracked in ticket #11261. Mark the respective
      tests broken on powerpc64.
      
      testsuite: mark print022 broken on powerpc64
      Ticket #11262 tracks difference in stdout for print022.
      
      testsuite: mark recomp015 broken on powerpc64
      testsuite: mark recomp011 broken on powerpc64
      This is tracked as ticket #11323 and #11260.
      
      testsuite: mark linker tests broken on powerpc64
      Ticket #11259 tracks tests failing because there is no RTS
      linker on powerpc64.
      
      Test Plan: validate
      
      Reviewers: erikd, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1928
      
      GHC Trac Issues: #11259, #11260, #11261, #11262, #11323
      feb19eae
  15. 17 Feb, 2016 1 commit
  16. 07 Nov, 2015 1 commit
    • Simon Marlow's avatar
      Make GHCi & TH work when the compiler is built with -prof · ce1f1607
      Simon Marlow authored
      Summary:
      Amazingly, there were zero changes to the byte code generator and very
      few changes to the interpreter - mainly because we've used good
      abstractions that hide the differences between profiling and
      non-profiling.  So that bit was pleasantly straightforward, but there
      were a pile of other wibbles to get the whole test suite through.
      
      Note that a compiler built with -prof is now like one built with
      -dynamic, in that to use TH you have to build the code the same way.
      For dynamic, we automatically enable -dynamic-too when TH is required,
      but we don't have anything equivalent for profiling, so you have to
      explicitly use -prof when building code that uses TH with a profiled
      compiler.  For this reason Cabal won't work with TH.  We don't expect
      to ship a profiled compiler, so I think that's OK.
      
      Test Plan: validate with GhcProfiled=YES in validate.mk
      
      Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang
      
      Reviewed By: ezyang
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1407
      
      GHC Trac Issues: #4837, #545
      ce1f1607
  17. 19 Aug, 2014 1 commit
  18. 28 Nov, 2013 2 commits
  19. 24 Nov, 2013 1 commit
  20. 14 Aug, 2013 1 commit
  21. 16 Feb, 2013 1 commit
  22. 14 Feb, 2013 1 commit
  23. 11 Feb, 2013 3 commits
  24. 25 Jan, 2013 1 commit
  25. 06 Nov, 2012 1 commit
  26. 13 Oct, 2012 1 commit
  27. 15 May, 2012 1 commit
  28. 23 Apr, 2012 1 commit
    • pcapriotti's avatar
      Add combined_output option. · ef0d0b70
      pcapriotti authored
      Added an option to combine stdout and stderr into a single file. This is
      useful for ghci scripts that produce interleaved errors and normal
      output.
      
      Also modified check_stderr_ok so that it normalizes stderr in the same
      way as compile tests.
      ef0d0b70
  29. 02 Nov, 2011 1 commit
  30. 20 Jul, 2011 1 commit
  31. 24 Oct, 2010 1 commit
    • Ian Lynagh's avatar
      Give break007 its own copy of Test3.hs · 2859077f
      Ian Lynagh authored
      It compiles it, so it can cause problems with other tests if it shares
      the same source, as they get confused by object files appearing and
      disappearing.
      2859077f
  32. 21 Sep, 2010 2 commits
  33. 21 Mar, 2010 1 commit
  34. 01 Jan, 2010 1 commit
  35. 03 Nov, 2009 1 commit