trealla-prolog / trealla

A compact, efficient Prolog interpreter written in plain-old C.
MIT License
274 stars 13 forks source link

Segfault within modules #585

Closed flexoron closed 2 months ago

flexoron commented 2 months ago

v2.55.35

$ tpl
?- module(v).
Info: created module 'v'
   true.
?- [user]. v:"V". end_of_file.
   true.
?- listing.
'V'(dummy,dummy).
   true.
?- 'V'(X,X).
Segmentation fault (core dumped)

$ tpl
?- [user]. user:"U". end_of_file.
   true.
?- listing.
'U'(dummy,dummy).
   true.
?- 'U'(X,X).
Segmentation fault (core dumped)
flexoron commented 2 months ago

v2.55.38

?- [user]. user:"U". end_of_file.
   true.
?- listing.
'U'(dummy,dummy).
   true.
?- [user].
"U".
Error: type error, not callable, user:1
   true.
?- listing.
   true.
?- 'U'(X,Y).
   throw(error(existence_error(procedure,'U'/2),'U'/2)).
?- [user]. user:"U". end_of_file.
Warning: overwriting 'U'/2 % not listed, not existed but overwritten?
   true.
?- 'U'(X,Y).
   X = dummy, Y = dummy.
?- 'U'(X,X).
Segmentation fault (core dumped)
infradig commented 2 months ago

I'm aware of all these things. No need to keep reposting. It's an ongoing thing.

On Sat, Sep 7, 2024 at 10:27 AM flexoron @.***> wrote:

v2.55.38

?- [user]. user:"U". end_of_file. true. ?- listing. 'U'(dummy,dummy). true. ?- [user]. "U". Error: type error, not callable, user:1 true. ?- listing. true. ?- 'U'(X,Y). throw(error(existence_error(procedure,'U'/2),'U'/2)). ?- [user]. user:"U". end_of_file. Warning: overwriting 'U'/2 % not listed, not existed but overwritten? true. ?- 'U'(X,Y). X = dummy, Y = dummy. ?- 'U'(X,X). Segmentation fault (core dumped)

— Reply to this email directly, view it on GitHub https://github.com/trealla-prolog/trealla/issues/585#issuecomment-2334965474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNKSESKJIZBVQHI3XJBEELZVJB67AVCNFSM6AAAAABNYLQKQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZUHE3DKNBXGQ . You are receiving this because you commented.Message ID: @.***>

flexoron commented 2 months ago

Ok.

infradig commented 2 months ago

Fix for issue #587 brought this back...

$ tpl ?- module(v). Info: created module 'v' true. ?- [user]. v:"V". end_of_file. Error: not callable v:(V)/2 true. ?- listing. malloc(): unaligned tcache chunk detected Aborted (core dumped)

EDIT: But lesser of two evils.