Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8832

Pointer validation should set exit code to 1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.12/00, 6.10/06
    • Component/s: Cling
    • Labels:
      None
    • Environment:

      any

      Description

      $ root -l -b -q -e 'int*p=nullptr; *p' ; echo $?
      ...
      Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
      Execution of your code was aborted.
      ROOT_cli_0:1:17: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
      int*p=nullptr; *p
                      ^
      0

      The exit code should really be 1, also for tests that claim to succeed otherwise.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              axel Axel Naumann
              Reporter:
              axel Axel Naumann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: