Skip to content

Commit

Permalink
refine the characterization and fix for the BorrowShuffleBuffer() crash
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaller committed Apr 12, 2024
1 parent dc7ef83 commit a51fdf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSIONS
Expand Up @@ -6,7 +6,7 @@ Note that not every commit will be logged here; that is what the Github commit h


development head (in the master branch):
fix a crash when BorrowShuffleBuffer() is called with size zero, unfortunately introduced when debugging a different problem; occurs when a nonWF model has a subpop of size 0 at reproduction() time
fix a crash in BorrowShuffleBuffer(), introduced debugging a different problem; occurs when (a) a nonWF model has (b) a subpop of size 0 (c) at reproduction() time (d) before ever having a non-zero size


version 4.2 (Eidos version 3.2):
Expand Down
4 changes: 2 additions & 2 deletions core/species.cpp
Expand Up @@ -3118,8 +3118,8 @@ slim_popsize_t *Species::BorrowShuffleBuffer(slim_popsize_t p_buffer_size)
EIDOS_TERMINATION << "ERROR (Species::BorrowShuffleBuffer): (internal error) shuffle buffer already borrowed." << EidosTerminate();

#if DEBUG_SHUFFLE_BUFFER
// guarantee allocation even with a p_buffer_size of 0, so we have a place to put our overrun barriers
if ((p_buffer_size > shuffle_buf_capacity_) || (p_buffer_size == 0))
// guarantee allocation of a buffer, even with a requested size of 0, so we have a place to put our overrun barriers
if ((p_buffer_size > shuffle_buf_capacity_) || !shuffle_buffer_)
#else
if (p_buffer_size > shuffle_buf_capacity_)
#endif
Expand Down

0 comments on commit a51fdf0

Please sign in to comment.