| Summary: | Crash in G4VBasicShell::ModifyPath | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | nanjo |
| Component: | interfaces/common | Assignee: | Koichi Murakami <Koichi.Murakami> |
| Status: | CLOSED FIXED | ||
| Severity: | critical | CC: | Koichi.Murakami |
| Priority: | P4 | ||
| Version: | 10.3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | a code to reporduce the problem | ||
Thanks. The problem is now fixed in the development version and the fix will be included in the next release or patch. *** Problem 2006 has been marked as a duplicate of this problem. *** |
Created attachment 465 [details] a code to reporduce the problem Dear geant4 developpers, A crash is occurred at the line 154 in G4VBasicShell.cc, L154 : if(newPath(newPath.size()-3,3) == "/..") { When newPath is "/", newPath.size()-3 is negative, and a software is crashed with the following message. terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr: __pos (which is 18446744073709551614) > this->size() (which is 1) Aborted (core dumped) The actual situation in my application is as follows. When "ls" is issued in the UIterminal interface, the following functions are called and finally crashed. G4UIterminal::GetCommand G4VBasicShell::ListDirectories G4VBasicShell::FindDirectory G4VBasicShell::ModifyPath The same thing is reproduced with the attached code. Best regards, Hajime