Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Conversation

jorblancoa
Copy link
Contributor

The bug is reproduced when calling std::min/max_element() when spikevec_time is empty.

The use of those functions with an empty range returns the end iterator. Attempting to dereference this iterator is undefined behavior (segmentation fault in most cases).

@jorblancoa jorblancoa requested a review from ohm314 August 9, 2019 15:11
Copy link
Contributor

@ohm314 ohm314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good change, just one further improvement.

Copy link
Contributor

@ohm314 ohm314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pramodk pramodk merged commit b122751 into master Aug 13, 2019
@pramodk pramodk deleted the fix/sort_spikes branch August 13, 2019 14:54
pramodk pushed a commit to neuronsimulator/nrn that referenced this pull request Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants