SWI-Prolog / swipl-devel

SWI-Prolog Main development repository
http://www.swi-prolog.org
Other
925 stars 167 forks source link

UBSAN errors, need inspection #1290

Open mgondan opened 2 weeks ago

mgondan commented 2 weeks ago

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 commented 2 weeks ago

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 commented 1 week ago

I think that this has now been solved.

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