Problem 1870

Summary: valgrind reports an invalid read in G4SeltzerBergerModel for Pu
Product: Geant4 Reporter: Chris Pinkenburg <pinkenburg>
Component: processes/electromagneticAssignee: Vladimir.Ivantchenko
Status: RESOLVED FIXED    
Severity: normal CC: pinkenburg
Priority: P5    
Version: 10.2   
Hardware: PC   
OS: Linux   

Description Chris Pinkenburg 2016-06-12 03:16:23 CEST
To keep things simple I just initialize the physics for all elements in G4. valgrind has been reporting an invalid read during G4SeltzerBergerModel::ReadData for the last few G4 versions but we never had any issues related to this. I finally tried to track this down to an apparent array index overflow. When reading the parameters for Z=94 in line 179
   ylimit[Z] = v->Value(0.97, emaxlog, idx, idy);
idx = 22
going down the stack into G4Physics2DVector.icc line 114:
 else if(z < v[idx] || z >= v[idx+1]) { 
in my understanding the size of v is 14 (14 is passed down as idxmax), so v[idx] and v[idx+1] is out of bounds
Comment 1 Vladimir.Ivantchenko 2016-06-13 12:59:59 CEST
Hello,

thank you very much for pointing out to the problem. It is fixed and the fix will be available with the new public Geant4 version 10.3beta end of June.

VI