Opened 8 years ago

Closed 8 years ago

#6006 closed bug (fixed)

hs_init(NULL, NULL) segfaults on latest snapshot

Reported by: ezyang Owned by: simonmar
Priority: high Milestone: 7.4.2
Component: Runtime System Version: 7.5
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


This weeny program crashes:

int main(int argc, char** argv) {

Old versions of GHC accomodate null pointers fine, and there is an explicit check for this case inside the function. If this is intentional behavior change, it should be documented.

Change History (4)

comment:1 Changed 8 years ago by simonmar

Component: CompilerRuntime System
difficulty: Unknown
Milestone: 7.6.1
Owner: set to simonmar
Priority: normalhigh

comment:2 Changed 8 years ago by marlowsd@…

commit 4ca281829c70331571291ed3dcf813a6028cc904

Author: Simon Marlow <>
Date:   Fri Apr 27 13:20:56 2012 +0100

    hs_init(): cope with argc and/or argv being NULL (#6006)

 rts/RtsStartup.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

comment:3 Changed 8 years ago by simonmar

Status: newmerge

comment:4 Changed 8 years ago by pcapriotti

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.