diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-05-25 10:00:29 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-05-25 13:09:47 +0100 |
commit | a6e8418a71b14ef85ee7134be654689b17765f03 (patch) | |
tree | 8094503174122b76e574baadcf02f046fd7732df /includes | |
parent | f61d53d322cdf81a1cfa09cf4a4af4198611bcd5 (diff) | |
download | haskell-a6e8418a71b14ef85ee7134be654689b17765f03.tar.gz |
prog_argv and rts_argv now contain *copies* of the args passed to
setupRtsFlags(), rather than sharing the memory. Previously if the
caller of hs_init() passed in dynamically-allocated memory and then
freed it, random crashes could happen later (#5177).
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Rts.h | 3 | ||||
-rw-r--r-- | includes/rts/Flags.h | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/includes/Rts.h b/includes/Rts.h index 3a6c6f20b9..91ec76d467 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -248,9 +248,6 @@ int stg_sig_install (int, int, void *); Miscellaneous garbage -------------------------------------------------------------------------- */ -/* declarations for runtime flags/values */ -#define MAX_RTS_ARGS 32 - #ifdef DEBUG #define TICK_VAR(arity) \ extern StgInt SLOW_CALLS_##arity; \ diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h index b4e7b64c4e..42ca671768 100644 --- a/includes/rts/Flags.h +++ b/includes/rts/Flags.h @@ -244,7 +244,7 @@ extern RTS_FLAGS RtsFlags; extern int prog_argc; extern char **prog_argv; */ -extern int rts_argc; /* ditto */ -extern char *rts_argv[]; +extern int rts_argc; /* ditto */ +extern char **rts_argv; #endif /* RTS_FLAGS_H */ |