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

Pointer validation should set exit code to 1

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • None
    • 6.12/00, 6.10/06
    • Cling
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: