Fix runtime linker error message when old symbol had no owner
authorReid Barton <rwbarton@gmail.com>
Mon, 1 Feb 2016 14:43:48 +0000 (09:43 -0500)
committerReid Barton <rwbarton@gmail.com>
Mon, 1 Feb 2016 15:30:57 +0000 (10:30 -0500)
Test Plan: Actually run validate. This fixes test linker_error3.

Reviewers: austin, erikd, bgamari

Reviewed By: erikd, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1874

rts/Linker.c

index 29bd5d8..c225ab6 100644 (file)
@@ -439,6 +439,7 @@ static int ghciInsertSymbolTable(
       "     loaded twice.\n",
       (char*)key,
       obj_name,
+      pinfo->owner == NULL ? "(GHCi built-in symbols)" :
       pinfo->owner->archiveMemberName ? pinfo->owner->archiveMemberName
       : pinfo->owner->fileName
    );