Problem 53 - '/run/optimizeGeometry false' crashes because G4string::toUpper() loops until <=size()
Summary: '/run/optimizeGeometry false' crashes because G4string::toUpper() loops until...
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: global (show other problems)
Version: 1.0
Hardware: Sun Solaris
: P2 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2000-02-07 13:36 CET by arce
Modified: 2000-02-08 08:12 CET (History)
0 users

See Also:


Attachments

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