this might fix the crash we had in unit tests in some bsd/ppc environments. #301
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(even with the rPATH fix gcc13/bsd/ppc remains broken because exceptions thrown are not being caught, investigation continues)
however fixing that exposed a totally different segfault which is encountered apparently after a stl flat_set, decared on the stack directly after a small_colour_map is created (which contains among other things an stl vec of bytes) , is populated by an insert. After the insert the metadata (at least) of the vec in the colour map object, is corrupted, leading to it indicating a size of 64-bit -320 , or as it is unsigned , fffffffffffffec0 .. shortly after this we end up in a memset on that vec , using the size() of the vec to determine the size of the memset, and this of course segfaults.
we have not yet discovered why this is clobbering it. the problem occurs on a rare occasion and the size of the flat_set is not out of the ordinary. Adding a guard buffer between the declaration of the colour_map and the flat_set 'fixes' the crash (and one can see the clobbering of the guard buffer if one looks) but more investigation is needed to determine the root cause of the corruption. So far it seems to be occurring from in the stl flat_set::insert() itself.