[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 8 commits: docs: mention -hiedir in docs for -outputdir

Marge Bot gitlab at gitlab.haskell.org
Thu Jun 18 21:03:26 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
ff184ec3 by Adam Sandberg Ericsson at 2020-06-18T17:02:40-04:00
docs: mention -hiedir in docs for -outputdir

[skip ci]

- - - - -
470fe322 by Sylvain Henry at 2020-06-18T17:02:55-04:00
Hadrian: fix build on Mac OS Catalina (#17798)

- - - - -
700af99d by Andreas Klebinger at 2020-06-18T17:02:56-04:00
Relax allocation threshold for T12150.

This test performs little work, so the most minor allocation
changes often cause the test to fail.

Increasing the threshold to 2% should help with this.

- - - - -
ac33fca7 by Sebastian Graf at 2020-06-18T17:02:57-04:00
hadrian: Bump pinned cabal.project to an existent index-state

- - - - -
aa9cc3a9 by Ömer Sinan Ağacan at 2020-06-18T17:03:08-04:00
Fix uninitialized field read in Linker.c

Valgrind report of the bug when running the test `linker_unload`:

    ==29666== Conditional jump or move depends on uninitialised value(s)
    ==29666==    at 0x369C5B4: setOcInitialStatus (Linker.c:1305)
    ==29666==    by 0x369C6C5: mkOc (Linker.c:1347)
    ==29666==    by 0x36C027A: loadArchive_ (LoadArchive.c:522)
    ==29666==    by 0x36C0600: loadArchive (LoadArchive.c:626)
    ==29666==    by 0x2C144CD: ??? (in /home/omer/haskell/ghc_2/testsuite/tests/rts/linker/linker_unload.run/linker_unload)
    ==29666==
    ==29666== Conditional jump or move depends on uninitialised value(s)
    ==29666==    at 0x369C5B4: setOcInitialStatus (Linker.c:1305)
    ==29666==    by 0x369C6C5: mkOc (Linker.c:1347)
    ==29666==    by 0x369C9F6: preloadObjectFile (Linker.c:1507)
    ==29666==    by 0x369CA8D: loadObj_ (Linker.c:1536)
    ==29666==    by 0x369CB17: loadObj (Linker.c:1557)
    ==29666==    by 0x3866BC: main (linker_unload.c:33)

The problem is `mkOc` allocates a new `ObjectCode` and calls
`setOcInitialStatus` without initializing the `status` field.
`setOcInitialStatus` reads the field as first thing:

    static void setOcInitialStatus(ObjectCode* oc) {
        if (oc->status == OBJECT_DONT_RESOLVE)
          return;

        if (oc->archiveMemberName == NULL) {
            oc->status = OBJECT_NEEDED;
        } else {
            oc->status = OBJECT_LOADED;
        }
    }

`setOcInitialStatus` is unsed in two places for two different purposes:
in `mkOc` where we don't have the `status` field initialized yet (`mkOc`
is supposed to initialize it), and `loadOc` where we do have `status`
field initialized and we want to update it. Instead of splitting the
function into two functions which are both called just once I inline the
functions in the use sites and remove it.

Fixes #18342

- - - - -
bf6dbda1 by Tamar Christina at 2020-06-18T17:03:11-04:00
fix windows bootstrap due to linker changes

- - - - -
eb5691a1 by Sylvain Henry at 2020-06-18T17:03:14-04:00
DynFlags: store default depth in SDocContext (#17957)

It avoids having to use DynFlags to reach for pprUserLength.

- - - - -
c034b46f by Sylvain Henry at 2020-06-18T17:03:17-04:00
Move tablesNextToCode field into Platform

tablesNextToCode is a platform setting and doesn't belong into DynFlags
(#17957). Doing this is also a prerequisite to fix #14335 where we deal
with two platforms (target and host) that may have different platform
settings.

- - - - -


30 changed files:

- compiler/GHC.hs
- compiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/Core/Opt/Monad.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Driver/Session.hs-boot
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/Closure.hs
- compiler/GHC/StgToCmm/Expr.hs
- compiler/GHC/StgToCmm/Layout.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Utils/Error.hs
- compiler/GHC/Utils/Outputable.hs
- docs/users_guide/separate_compilation.rst
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Monad.hs
- hadrian/cabal.project
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Warnings.hs
- libraries/ghc-boot/GHC/Platform.hs
- libraries/ghc-boot/GHC/Settings/Platform.hs
- rts/Linker.c


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8f497e65df734d71d96f9700babb5b48d6f6fac7...c034b46f17b59e919405ad544957ef7fd311dd27

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8f497e65df734d71d96f9700babb5b48d6f6fac7...c034b46f17b59e919405ad544957ef7fd311dd27
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200618/732fb73c/attachment.html>


More information about the ghc-commits mailing list