<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Ben Gamari pushed to branch wip/T17605
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d445cf05d47e8c5513c55cb5e7157b33e83c8123">d445cf05</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-10T10:26:20-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/linker: Fix relocation overflow in PE linker

Previously the overflow check for the IMAGE_REL_AMD64_ADDR32NB
relocation failed to account for the signed nature of the value.
Specifically, the overflow check was:

    uint64_t v;
    v = S + A;
    if (v >> 32) { ... }

However, `v` ultimately needs to fit into 32-bits as a signed value.
Consequently, values `v > 2^31` in fact overflow yet this is not caught
by the existing overflow check.

Here we rewrite the overflow check to rather ensure that
`INT32_MIN <= v <= INT32_MAX`. There is now quite a bit of repetition
between the `IMAGE_REL_AMD64_REL32` and `IMAGE_REL_AMD64_ADDR32` cases
but I am leaving fixing this for future work.

This bug was first noticed by @awson.

Fixes #15808.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4c407f6e71f096835f8671e2d3ea6bda38074314">4c407f6e</a></strong>
<div>
<span>by Sylvain Henry</span>
<i>at 2020-11-10T10:27:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Export SPEC from GHC.Exts (#13681)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7814cd5bb0d145c4d83d7566885bdc3992b63d0c">7814cd5b</a></strong>
<div>
<span>by David Eichmann</span>
<i>at 2020-11-10T10:27:35-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">ghc-heap: expose decoding from heap representation

Co-authored-by: Sven Tennie <sven.tennie@gmail.com>
Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: Ben Gamari <bgamari.foss@gmail.com>
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fa344d33dba71f31f55269c5fc733daa3830073a">fa344d33</a></strong>
<div>
<span>by Richard Eisenberg</span>
<i>at 2020-11-10T10:28:10-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add test case for #17186.

This got fixed sometime recently; not worth it trying to
figure out which commit.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2e63a0fb1bdaecc7916a3cc35dcfd2b2ef37c328">2e63a0fb</a></strong>
<div>
<span>by David Eichmann</span>
<i>at 2020-11-10T10:28:46-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add code comments for StgInfoTable and StgStack structs
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fcfda909fd7fcf539ff31717ce01a56292abb92f">fcfda909</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-11T03:19:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">nativeGen: Make makeImportsDoc take an NCGConfig rather than DynFlags

It appears this was an oversight as there is no reason the full DynFlags
is necessary.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6e23695e7d84aa248e7ca20bdb8d133f9b356548">6e23695e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-11T03:19:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Move this_module into NCGConfig

In various places in the NCG we need the Module currently being
compiled. Let's move this into the environment instead of chewing threw
another register.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c6264a2d652517954b7cd076c7bc4487ed17c97d">c6264a2d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-11T03:20:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">codeGen: Produce local symbols for module-internal functions

It turns out that some important native debugging/profiling tools (e.g.
perf) rely only on symbol tables for function name resolution (as
opposed to using DWARF DIEs). However, previously GHC would emit
temporary symbols (e.g. `.La42b`) to identify module-internal
entities. Such symbols are dropped during linking and therefore not
visible to runtime tools (in addition to having rather un-helpful unique
names). For instance, `perf report` would often end up attributing all
cost to the libc `frame_dummy` symbol since Haskell code was no covered
by any proper symbol (see #17605).

We now rather follow the model of C compilers and emit
descriptively-named local symbols for module internal things. Since this
will increase object file size this behavior can be disabled with the
`-fno-expose-internal-symbols` flag.

With this `perf record` can finally be used against Haskell executables.
Even more, with `-g3` `perf annotate` provides inline source code.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/584058ddff71460023712a8d816b83b581e6e78f">584058dd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-11T03:20:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Enable -fexpose-internal-symbols when debug level >=2

This seems like a reasonable default as the object file size increases
by around 5%.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c34a4b98b1f09ea3096d39a839a86f2d7185c796">c34a4b98</a></strong>
<div>
<span>by Ömer Sinan Ağacan</span>
<i>at 2020-11-11T03:20:35-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix and enable object unloading in GHCi

Fixes #16525 by tracking dependencies between object file symbols and
marking symbol liveness during garbage collection

See Note [Object unloading] in CheckUnload.c for details.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2782487f5f6ad9df4dc8725226a47f07fec77f9f">2782487f</a></strong>
<div>
<span>by Ray Shih</span>
<i>at 2020-11-11T03:20:35-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add loadNativeObj and unloadNativeObj

(This change is originally written by niteria)

This adds two functions:
* `loadNativeObj`
* `unloadNativeObj`
and implements them for Linux.

They are useful if you want to load a shared object with Haskell code
using the system linker and have GHC call dlclose() after the
code is no longer referenced from the heap.

Using the system linker allows you to load the shared object
above outside the low-mem region. It also loads the DWARF sections
in a way that `perf` understands.

`dl_iterate_phdr` is what makes this implementation Linux specific.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7a65f9e140906087273ce95f062775f18f6a708d">7a65f9e1</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-11T03:20:35-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Introduce highMemDynamic
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e9e1b2e75de17be47ab887a26943f5517a8463ac">e9e1b2e7</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-11T03:20:35-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Introduce test for dynamic library unloading

This uses the highMemDynamic flag introduced earlier to verify that
dynamic objects are properly unloaded.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5506f1342e51bad71a7525ddad0650d1ac63afeb">5506f134</a></strong>
<div>
<span>by Krzysztof Gogolewski</span>
<i>at 2020-11-11T03:21:14-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Force argument in setIdMult (#18925)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d6454f6789ce3356a1a531ca11416467522ef166">d6454f67</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-12T21:05:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">nativeGen/dwarf: Fix procedure end addresses

Previously the `.debug_aranges` and `.debug_info` (DIE) DWARF
information would claim that procedures (represented with a
`DW_TAG_subprogram` DIE) would only span the range covered by their entry
block. This omitted all of the continuation blocks (represented by
`DW_TAG_lexical_block` DIEs), confusing `perf`. Fix this by introducing
a end-of-procedure label and using this as the `DW_AT_high_pc` of
procedure `DW_TAG_subprogram` DIEs

Fixes #17605.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/affa40c3be4019cc2ea47bb6c8aa7e9261dd269a">affa40c3</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-12T21:05:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">nativeGen/dwarf: Only produce DW_AT_source_note DIEs in -g3

Standard debugging tools don't know how to understand these so let's not
produce them unless asked.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0a32843f7a7e53e27765b812f072941e71322b12">0a32843f</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-12T21:05:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">nativeGen/dwarf: Use DW_AT_linkage instead of DW_AT_MIPS_linkage
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8937c9b63406cd7a24f301a5158d411a3bc6e96a">8937c9b6</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-12T21:05:40-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Add DWARF release jobs for Debian 10, Fedora27
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#587d266bb27a4dc3022bbed44dfa19849df3044c">
.gitlab-ci.yml
</a>
</li>
<li class="file-stats">
<a href="#db697f6aea9f93f1583f1d5c62d25570a1e07f73">
compiler/GHC/Cmm/CLabel.hs
</a>
</li>
<li class="file-stats">
<a href="#2d3721ad8de95e1144493ca545db846672cb109f">
compiler/GHC/Cmm/Info/Build.hs
</a>
</li>
<li class="file-stats">
<a href="#10b61652f9817945bb54ccf8fc40f8a664ca3c30">
compiler/GHC/CmmToAsm.hs
</a>
</li>
<li class="file-stats">
<a href="#7223682bb3d11ed5bc80db47627d3d9ef7fa2ac7">
compiler/GHC/CmmToAsm/Config.hs
</a>
</li>
<li class="file-stats">
<a href="#b131e0d591301ee7a1c76bbd812f3d14783e934f">
compiler/GHC/CmmToAsm/Dwarf.hs
</a>
</li>
<li class="file-stats">
<a href="#31959c38fe93e481a7160526f11fa80db82d20b7">
compiler/GHC/CmmToAsm/Dwarf/Constants.hs
</a>
</li>
<li class="file-stats">
<a href="#3008b031dfff6e38be4d7b8861e17927ee8c3fab">
compiler/GHC/CmmToAsm/Dwarf/Types.hs
</a>
</li>
<li class="file-stats">
<a href="#ea29061dab1b843e0ea9294afc614998f3a8d08f">
compiler/GHC/CmmToAsm/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#ce4acbced40df8012ccc56db501549f835fb180b">
compiler/GHC/CmmToAsm/PIC.hs
</a>
</li>
<li class="file-stats">
<a href="#335d279236d65dcf13f2bab3891e515cb803203c">
compiler/GHC/CmmToAsm/X86/Ppr.hs
</a>
</li>
<li class="file-stats">
<a href="#2e5692f568fd7b67a6b172e2a60469da8392508c">
compiler/GHC/Driver/Flags.hs
</a>
</li>
<li class="file-stats">
<a href="#774d88050336ef660c7a219fb06c480c2fc639bc">
compiler/GHC/Driver/Session.hs
</a>
</li>
<li class="file-stats">
<a href="#5aa3321b0f5c08d7ebfa1a4a3340d4451258988b">
compiler/GHC/Linker/Loader.hs
</a>
</li>
<li class="file-stats">
<a href="#5dac619989e8509003cf7b463c100f5cc56072a3">
compiler/GHC/Types/Var.hs
</a>
</li>
<li class="file-stats">
<a href="#86c92886ea01ecd58dd8ae627a0e7918ccda57bf">
docs/users_guide/debug-info.rst
</a>
</li>
<li class="file-stats">
<a href="#12f1226bde7e9f48203d34d8d857513f2f1f4d75">
docs/users_guide/phases.rst
</a>
</li>
<li class="file-stats">
<a href="#ae6b27fda1cc1591738c66625518d3472c48163f">
includes/rts/Linker.h
</a>
</li>
<li class="file-stats">
<a href="#0ea78c0eb38d298692960f63f47248f6464a0479">
includes/rts/storage/Closures.h
</a>
</li>
<li class="file-stats">
<a href="#94ca41c5afbb3d932bd6f37ee16458322988fb69">
includes/rts/storage/GC.h
</a>
</li>
<li class="file-stats">
<a href="#6ee44ce9461008fa244623eb266f78f556eab112">
includes/rts/storage/Heap.h
</a>
</li>
<li class="file-stats">
<a href="#2f870b7c76a5e24010e464cc1a1f860c0f9e0dab">
includes/rts/storage/TSO.h
</a>
</li>
<li class="file-stats">
<a href="#48a6c03232a2b3f836daeff09b3c6e3790804632">
libraries/base/GHC/Exts.hs
</a>
</li>
<li class="file-stats">
<a href="#06b370ff84e63d5f9d23a0e79846fa802f93dc44">
libraries/ghc-heap/GHC/Exts/Heap.hs
</a>
</li>
<li class="file-stats">
<a href="#ba1d62598dfbf5ddb817dd9c93461a02a0bba43d">
rts/CheckUnload.c
</a>
</li>
<li class="file-stats">
<a href="#67cc28da78ad5c427434fbe2efdcecffe61ae002">
rts/CheckUnload.h
</a>
</li>
<li class="file-stats">
<a href="#152b85a9ce66dcf385a199eab2acad9d98fd737b">
rts/Hash.c
</a>
</li>
<li class="file-stats">
<a href="#4352fec095ae082617e59e2f077ec6dc9e865ee7">
rts/Hash.h
</a>
</li>
<li class="file-stats">
<a href="#7cd911ebab0f9f45be4a3d53fd5b4cb6cf96de6b">
rts/Heap.c
</a>
</li>
<li class="file-stats">
<a href="#044fe9284335a9bfd17546e06c2e5c40a680dd3d">
rts/Linker.c
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/0ab4eceff307ccc5470244c3ad88d4996d79f843...8937c9b63406cd7a24f301a5158d411a3bc6e96a">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.



</p>
</div>
</body>
</html>