Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this might fix the crash we had in unit tests in some bsd/ppc environments. #301

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

isildur-g
Copy link

@isildur-g isildur-g commented Jun 25, 2024

(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.

G.E. and others added 5 commits June 25, 2024 17:28
root problem was with the RPATH settings that ended up rendering
c++ exceptions inactive, and bypassing the exception handler during some
of these tests (which tested deliberately broken cases) led us
into a segfault which was a symptom, not a cause.
…roblem

remains poorly understood.  this is a temporary fix.
will add a recommendation to the readme for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant