[GHC] #9839: RTS options parser silently accepts invalid flags

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Incorrect Blocked By: | result at runtime Related Tickets: #4243 | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- RTS options that do not take arguments (such as `-T`) silently ignore anything that comes afterwards. For example, `+RTS -T,-s` or `+RTS -T-s` turns on collection of GC statistics (`-T`) but does not print out a summary (`-s`). Instead, this should produce an error message. Otherwise, users may mistakenly think that options have been applied. (This has just bitten us in a production system.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 7.8.3 System | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Incorrect | Related Tickets: #4243 result at runtime | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by MikolajKonarski): * cc: MikolajKonarski (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * keywords: => newcomer * owner: simonmar => Comment: The file to change is: `rts/RtsFlags.c`. Not difficult. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: carlostome Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by carlostome): * owner: => carlostome -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: carlostome Type: bug | Status: patch Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: Phab:D748 -------------------------------------+------------------------------------- Changes (by carlostome): * status: new => patch * differential: => Phab:D748 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags
-------------------------------------+-------------------------------------
Reporter: adamgundry | Owner: carlostome
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Runtime System | Version: 7.8.3
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: #4243 | Differential Revisions: Phab:D748
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: carlostome Type: bug | Status: closed Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: Phab:D748 -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => closed * resolution: => fixed Comment: Thanks Carlos! The only thing not handled by this patch is checking that arguments that are supposed to be numeric, are actually numeric. Currently `atof` is called on them, which accepts pretty much anything. Maybe a fix for this can be part of #4243. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: Type: bug | Status: new Priority: high | Milestone: 7.12.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: Phab:D748 -------------------------------------+------------------------------------- Changes (by thomie): * owner: carlostome => * priority: normal => high * status: closed => new * resolution: fixed => * milestone: => 7.12.1 Comment: This patch broke `+RTS -xc`, and probably also `+RTS -xt`. Running `make TEST=cgrun057` with a profiling compiler results in: "flag -x given an argument when none was expected: -xc" Carlos: could you try fixing it? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: Type: bug | Status: new Priority: highest | Milestone: 7.12.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: Phab:D748 -------------------------------------+------------------------------------- Changes (by simonmar): * priority: high => highest Comment: Must fix before 7.12.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: nkartashov Type: bug | Status: new Priority: highest | Milestone: 7.12.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: Phab:D748 -------------------------------------+------------------------------------- Changes (by nkartashov): * owner: => nkartashov -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: nkartashov Type: bug | Status: new Priority: highest | Milestone: 7.12.1 Component: Runtime System | Version: 7.8.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: Phab:D1039 -------------------------------------+------------------------------------- Changes (by nkartashov): * differential: Phab:D748 => Phab:D1039 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9839: RTS options parser silently accepts invalid flags
-------------------------------------+-------------------------------------
Reporter: adamgundry | Owner: nkartashov
Type: bug | Status: new
Priority: highest | Milestone: 7.12.1
Component: Runtime System | Version: 7.8.3
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: #4243 | Differential Revisions: Phab:D1039
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#9839: RTS options parser silently accepts invalid flags -------------------------------------+------------------------------------- Reporter: adamgundry | Owner: nkartashov Type: bug | Status: closed Priority: highest | Milestone: 7.12.1 Component: Runtime System | Version: 7.8.3 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: #4243 | Differential Revisions: Phab:D748, | Phab:D1039 -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * differential: Phab:D1039 => Phab:D748, Phab:D1039 * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9839#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC