swipl-devel icon indicating copy to clipboard operation
swipl-devel copied to clipboard

UBSAN errors, need inspection

Open mgondan opened this issue 1 year ago • 2 comments

https://github.com/SWI-Prolog/swipl-devel/blob/1ff28598f7c5da16396bbb7a3293b3ba9fb26878/src/pl-prims.c#L142

If I add an assertion,

set_marked(p); assert(LD->cycle.vstack.top); if ( !pushSegStack(&LD->cycle.vstack, p, Word) ) outOfCore();

the build fails.

Same here https://github.com/SWI-Prolog/swipl-devel/blob/1ff28598f7c5da16396bbb7a3293b3ba9fb26878/src/pl-prims.c#L172

mgondan avatar Jun 17 '24 22:06 mgondan

Also in pl-segstack.c, assert(stack->top) right before line 72 And in pl-rec.c, assert(LD->cycle.lstack.top), line 617

mgondan avatar Jun 17 '24 22:06 mgondan

I think that this has now been solved.

https://github.com/SWI-Prolog/swipl-devel/pull/1289#issuecomment-2185021440

mgondan avatar Jun 23 '24 14:06 mgondan