# SEGV in tabled deterministic predicate, but only when compiled

**URL:** <https://swi-prolog.discourse.group/t/segv-in-tabled-deterministic-predicate-but-only-when-compiled/9514>\
**Category:** Help!\
**Tags:** bug\
**Created:** [February 11, 2026, 3:43pm UTC](https://swi-prolog.discourse.group/t/segv-in-tabled-deterministic-predicate-but-only-when-compiled/9514 "2026-02-11T15:43:22Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [February 12, 2026, 1:24am UTC](https://swi-prolog.discourse.group/t/segv-in-tabled-deterministic-predicate-but-only-when-compiled/9514/12 "2026-02-12T01:24:59Z")

</div>

Here’s one discussion I found (I’m pretty sure there were others … you can try searching for “yall” or “lambda”:

> [@Maplist using a lambda on a lists of dicts doesn't work as expected](https://swi-prolog.discourse.group/t/maplist-using-a-lambda-on-a-lists-of-dicts-doesnt-work-as-expected/9007):
>
> Given this: :- use\_module(library(yall)). :- use\_module(library(apply)). :- use\_module(library(apply\_macros)). works(L) :- maplist([A,B]\>\>(get\_dict(b, A, B)), [#{a:1,b:2},#{a:3,b:4}], L). doesnt(L) :- maplist([A,B]\>\>(B = A.b), [#{a:1,b:2},#{a:3,b:4}], L). This works as I expect: works(L). L = [2, 4] But this doesn’t: doesnt(L). Arguments are not sufficiently instantiated In: [4] throw(error(instantiation\_error,\_1920)) [1] doesnt(\_1974) at line 4 I though the two are supposed to be e…

tl;dr: library(yall) doesn’t know about other expansions, such as for dicts, so the generated code can be different than what you expect (and there are differences between lambdas in compiled code versus in interpreted code (inside a call/1)). So, it’s worth using listing/1 to see what term expansion did with your code.

This doesn’t account for the SEGV, of course – that shouldn’t happen under any circumstations.

---

_[View the full topic](https://swi-prolog.discourse.group/t/segv-in-tabled-deterministic-predicate-but-only-when-compiled/9514)._
