diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-12-26 16:42:52 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-12-30 06:53:23 -0500 |
commit | fdeffa5e56abccc64df750ba67a39b4af99adac5 (patch) | |
tree | 394db20cd1cfa357c9196a94c1129a6c57d06745 | |
parent | 613f7265c7985b779877e6897118c53d5a333f10 (diff) | |
download | haskell-fdeffa5e56abccc64df750ba67a39b4af99adac5.tar.gz |
rts: Error on invalid --numa flags
Previously things like `+RTS --numa-debug` would enable NUMA support,
despite being an invalid flag.
-rw-r--r-- | rts/RtsFlags.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 4eac4622dd..2e11399aab 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -949,9 +949,14 @@ error = true; if (rts_argv[arg][6] == '=') { mask = (StgWord)strtol(rts_argv[arg]+7, (char **) NULL, 10); - } else { + } else if (rts_argv[arg][6] == '\0'){ mask = (StgWord)~0; + } else { + errorBelch("%s: unknown flag", rts_argv[arg]); + error = true; + break; } + if (!osNumaAvailable()) { errorBelch("%s: OS reports NUMA is not available", rts_argv[arg]); |