summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-12-26 16:42:52 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-12-30 06:53:23 -0500
commitfdeffa5e56abccc64df750ba67a39b4af99adac5 (patch)
tree394db20cd1cfa357c9196a94c1129a6c57d06745
parent613f7265c7985b779877e6897118c53d5a333f10 (diff)
downloadhaskell-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.c7
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]);