Problem 1870 - valgrind reports an invalid read in G4SeltzerBergerModel for Pu
Summary: valgrind reports an invalid read in G4SeltzerBergerModel for Pu
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic (show other problems)
Version: 10.2
Hardware: PC Linux
: P5 normal
Assignee: Vladimir.Ivantchenko
URL:
Depends on:
Blocks:
 
Reported: 2016-06-12 03:16 CEST by Chris Pinkenburg
Modified: 2016-06-13 13:00 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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