[GHC] #12031: GHCi segfaults on Windows when compiling C code using extern-declared variable
GHC
ghc-devs at haskell.org
Sat Aug 27 23:36:51 UTC 2016
#12031: GHCi segfaults on Windows when compiling C code using extern-declared
variable
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: Phyx-
Type: bug | Status: merge
Priority: high | Milestone: 8.0.2
Component: Runtime System | Version: 8.0.1
(Linker) |
Resolution: | Keywords:
Operating System: Windows | Architecture: x86_64
| (amd64)
Type of failure: GHCi crash | Test Case: T12031
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2316
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Phyx-):
@bgamari, you need to merge ae7e9cb574801954c7769c210829b06193fa72ea as
well as this fixes the Ticky format specifiers. Currently that GHC-8.0
branch doesn't build with validate settings due to it.
Also the following need to be applied
{{{
diff --git a/rts/Linker.c b/rts/Linker.c
index 8e00b92..82a37c8 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -4102,13 +4102,13 @@ ocGetNames_PEi386 ( ObjectCode* oc )
if (globalBssSize > 0) {
bss = stgCallocBytes(1, globalBssSize,
"ocGetNames_PEi386(non-anonymous bss)");
- addSection(§ions[oc->n_sections-1],
+ addSection(&oc->sections[oc->n_sections-1],
SECTIONKIND_RWDATA, SECTION_MALLOC,
bss, globalBssSize, 0, 0, 0);
IF_DEBUG(linker, debugBelch("bss @ %p %" FMT_Word "\n", bss,
globalBssSize));
addProddableBlock(oc, bss, globalBssSize);
} else {
- addSection(§ions[oc->n_sections-1],
+ addSection(&oc->sections[oc->n_sections-1],
SECTIONKIND_OTHER, SECTION_NOMEM, NULL, 0, 0, 0, 0);
}
}}}
This will make It compile, but the test isn't giving any output, have to
look into that.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12031#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list