Uploaded image for project: 'Virtual Monte Carlo'
  1. Virtual Monte Carlo
  2. VMC-7

Bad handling of default value for argv in TG4RunManager

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: geant4_vmc 3.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Archlinux 64 bit with GCC 4.9.2

    • Bug / Feature:
      Bug report
    • Severity:
      4 - Important
    • Platforms:
      x86_64-slc6-gcc48-opt
    • Development:

      Description

      In geant4_vmc 3.1.p1 the constructor of TG4RunManager allows for null default values for argc and argv (TG4RunManager.h line 46-47):

      TG4RunManager(TG4RunConfiguration* configuration,
      int argc = 0, char** argv = 0);

      The constructor sets fARGV=argv, which is NULL if the default value for argv is used. Then in the definition of TG4RunManager::CreateRootUI (TG4RunManager.cxx, line 298) there is a reference to fARGV[0]:

      argv[0] = StrDup(fARGV[0]);

      which on my machine causes a crash since fARGV==NULL.

        Attachments

          Activity

            People

            • Assignee:
              ihrivnac Ivana Hrivnacova
              Reporter:
              nmori Nicola Mori
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                PlannedEnd: