Opened 6 years ago

Closed 5 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:

Description

This weeny program crashes:

int main(int argc, char** argv) {
    hs_init(NULL,NULL);
}

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 6 years ago by simonmar

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

comment:2 Changed 5 years ago by marlowsd@…

commit 4ca281829c70331571291ed3dcf813a6028cc904

Author: Simon Marlow <marlowsd@gmail.com>
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 5 years ago by simonmar

Milestone: 7.6.17.4.2
Status: newmerge

comment:4 Changed 5 years ago by pcapriotti

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