Problem 1883 - requesting element from 0-length vector causes crash
Summary: requesting element from 0-length vector causes crash
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/cascade (show other problems)
Version: 10.2
Hardware: All All
: P4 normal
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2016-08-30 01:55 CEST by Daren Sawkey
Modified: 2016-11-29 19:33 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 Daren Sawkey 2016-08-30 01:55:22 CEST
In the file
processes/hadronic/models/cascade/cascade/src/G4InuclCollider.cc
there are two calls to
checkOutput.getOutgoingNuclei()[0]
(lines 355 and 360 of version 10.2.patch2)

The std::vector checkOutput.getOutgoingNuclei() can have no elements and thus these calls cause a segmentation fault.

To reproduce see comments at end of:
https://bugzilla-geant4.kek.jp/show_bug.cgi?id=1680
Comment 1 dennis.herbert.wright 2016-11-29 19:33:13 CET
Added checks against zero entries.