Opened 2 years ago

Closed 2 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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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

  • Component changed from Compiler to Runtime System
  • Difficulty set to Unknown
  • Milestone set to 7.6.1
  • Owner set to simonmar
  • Priority changed from normal to high

comment:2 Changed 2 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 2 years ago by simonmar

  • Milestone changed from 7.6.1 to 7.4.2
  • Status changed from new to merge

comment:4 Changed 2 years ago by pcapriotti

  • Resolution set to fixed
  • Status changed from merge to closed
Note: See TracTickets for help on using tickets.