| Summary: | '/run/optimizeGeometry false' crashes because G4string::toUpper() loops until <=size() | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | arce |
| Component: | global | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | CLOSED FIXED | ||
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.0 | ||
| Hardware: | Sun | ||
| OS: | Solaris | ||
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. 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. |
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)); } }