Skip to content

prolog? leaks pvars out of its context. #58

Open
@NHALX

Description

(0-) (let PZ (prolog? (return Free)) \\ Free isn't derefed
       (prolog? (receive PZ)
                (unify PZ 1)         \\ Should fail because PZ should not be a logic variable in this context
                (return PZ)))
1

(1-) (shen.pvar? (prolog? (return Free)))
true

(2-) (symbol? (prolog? (return Free)))
false

It's more noticeable in larger code where the old pvar get's reclaimed before being used again:
"Exception in vector-ref: 19 is not a valid index for #(10 shen.-null- ...."

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions