summaryrefslogtreecommitdiff
path: root/rts/Linker.c
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2017-04-21 12:12:01 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-21 12:12:22 -0400
commit69d5ad068b4ddf96c1497712ee8e7cdfe1d765df (patch)
tree5c387295b304322fe3d5a3a6ea702ece2d9b0ca8 /rts/Linker.c
parentcfff183f9ebcbe8ec4df9dcf39e95ac077d6e312 (diff)
downloadhaskell-69d5ad068b4ddf96c1497712ee8e7cdfe1d765df.tar.gz
catch the case where there is no symCmd
We do check for symCmd, to set the info->nlist value, but forgot to do the same check for info->names. Thus when trying to extract stroff from symCmd, we hit a segfault. Test Plan: The validation failure on windows is rather suspicious... let's try this one Reviewers: bgamari, adinapoli, austin, erikd, simonmar Reviewed By: adinapoli Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D3468
Diffstat (limited to 'rts/Linker.c')
-rw-r--r--rts/Linker.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 7366904831..b214e9c01f 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1215,6 +1215,8 @@ mkOc( pathchar *path, char *image, int imageSize,
IF_DEBUG(linker, debugBelch("mkOc: start\n"));
oc = stgMallocBytes(sizeof(ObjectCode), "mkOc(oc)");
+ oc->info = NULL;
+
# if defined(OBJFORMAT_ELF)
oc->formatName = "ELF";
# elif defined(OBJFORMAT_PEi386)