Problem 53

Summary: '/run/optimizeGeometry false' crashes because G4string::toUpper() loops until <=size()
Product: Geant4 Reporter: arce
Component: globalAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: 1.0   
Hardware: Sun   
OS: Solaris   

Description arce 2000-02-07 13:36:28 CET
I checked that the problem is when i=5 in

void G4String::toUpper ( void )
{
  for (int i=0; i<=size();i++)
  {
    //GB:HP-UX-aCC,Linux-KCC
    std_string::operator[](i) = tolower(std_string::operator[](i));
    //at(i) = toupper(at(i));
  }
}
Comment 1 Gabriele Cosmo 2000-02-08 02:25:59 CET
The fix to G4String::toUpper() (the function should be invoking
'toupper' instead of 'tolower'!) has already been implemented in
tag "global-V01-00-02" which will be part of the next global
reference tag and public patch. Thanks.
Comment 2 Gabriele Cosmo 2000-02-08 08:12:59 CET
The problem reported has actually been fixed now in "global-V01-00-03".
The bug was affecting either G4String::toUpper() and G4String::toLower().
In the for loop: i<size().
The tag has been submitted to test.