linker/mach-o: Catch the case where there is no symCmd
authorMoritz Angermann <moritz.angermann@gmail.com>
Sun, 16 Apr 2017 01:30:10 +0000 (21:30 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sun, 16 Apr 2017 01:30:11 +0000 (21:30 -0400)
commit6c05b27e5bafe9f232e7014f4760335f5e3ba591
tree816cd6036cb58b46348dfca6ade3b83f79f8d48c
parent8a54a4ff5565a2130f5c122ce5368446bfb2f22e
linker/mach-o: 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.

Reviewers: bgamari, adinapoli, austin, erikd, simonmar

Reviewed By: bgamari, adinapoli

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3459
rts/Linker.c
rts/linker/MachO.c