Branch: development (switch to
stable),
SWI-Prolog Changelog from version 10.1.21 to 11.1.0
[Nov 20 2026]
- BUILD: silence doc-build warnings for syspred.pl and tabling.pl Move
the predicate_property/2 meta_predicate declaration to the top-level
block so it precedes its use in source_file/2, and use the PlDoc
determinism keyword
failure for completion_step/1.
- FIXED: pldoc2tex: load the comments of predicates re-exported
by a preloaded library If the library was loaded from .qlf
files, only the comments of the library itself were recovered
using the cross-referencer. This lost the documentation of
e.g. rdf_current_prefix/2, defined in rdf_prefixes and re-exported
by rdf_db.
- DOC: design proposal for compact atoms with flag bits Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>
- ENHANCED: read/1, write/1: quickly decide that an atom is not an
operator Most atoms are not operators. A filter records every name
that has been declared an operator in any module. If a name is not in
the filter,
currentOperator() and priorityOperator() skip searching the
operator tables of the module and its super modules. read_clause/3 on
200,000 facts takes 0.89 -> 0.79 sec; writeq/1 is about 4% faster.
- ENHANCED: read_term/2,3: faster construction of subterm positions
Build the position terms directly on the global stack rather than
using PL_unify_term(). Reading terms with subterm positions is about
13% faster.
[Nov 19 2026]
- ENHANCED: load/qcompile: call replace_functions/4 only when there
are functions to replace Loading or qcompiling a file takes 31%
fewer inferences per fact.
[Nov 20 2026]
- FIXED: clang -Os: crash on backtracking into a clause choicepoint
copyWordsScalarUp() and copyWordsScalarDown() copied structures that
contain pointers, such as struct clause_choice, through `word*`.
Under strict aliasing, clang considers these stores not to initialise
the pointer fields. At -Os it removed the code that reads them,
which made shallow_backtrack call raiseStackOverflow() with true
after a successful growLocalSpace() and crash (MacPorts 11.0.0 build).
Copy through a MAY_ALIAS word type.
[Nov 19 2026]
- DOC: the culprit of
representation_error(nul_terminated_string(Text))
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ADDED: PL_save_ctty() and PL_restore_ctty() Expose the terminal
repair shell/1 does after a child that adopted the pty of an Epilog
window exits, which on MacOS and other BSD systems revokes that
terminal. Foreign code that runs such a child itself, in particular
process_create/3, needs the same.
- FIXED: use-after-free on source files destroyed by procedure GC
'$time_source_file'/3 and abolish_module/1 accessed source files from
the index without a reference while procedure GC could destroy them.
Add
acquireIndexSourceFile(), which acquires the file under L_SRCFILE,
and make releaseSourceFile() drop the last reference under L_SRCFILE,
such that a file cannot be acquired from zero and destroyed twice.
- FIXED: #1583 abolish_module/1 crashed if procedure GC collected one
of its procedures
unlinkSourceFilesModule() walked the module's
procedure table without acquiring the procedures. Procedure GC
reuses the source_no field of a collected procedure as free-list
link, which made set_bit() write far out of bounds. Enumerate using
acquireTableProcedure() and guard against source file indexes beyond
the bit vector.
- FIXED: API error when the kernel raises an error on a frame argument
With the flag validate_api (default unless -O), C functions such as
PL_type_error() also validated their term_t arguments when called
from the kernel, which may pass an argument slot of a Prolog frame.
This aborted the process, e.g., when tabling added a cyclic answer.
[Nov 13 2026]
- FIXED: transaction/1 and snapshot/1: clauses erased by another thread
A goal must see the clauses that were visible when it started. For a
goal in a transaction or snapshot these are the clauses at the start
of the transaction. A clause that is erased afterwards remains in
the clause list and is found if the goal scans this list or uses a
clause index that existed before the erase. It was lost in two cases:
[Nov 18 2026]
- ENHANCED: put_assoc/4: insert and update implemented in C Adds
'$btree_avl_put'/4 next to '$btree_find_node'/5. It does the search,
the copy of the path and the rebalancing in one pass.
[Nov 12 2026]
- FIXED: assert and retract while another thread fills a new clause index
hashDefinition() fills a new index from the clause list without holding
the predicate lock. A thread that asserts or retracts a clause changed
the clause list first and only then waited for the incomplete index,
so it could not know whether the scan had seen its change:
[Nov 14 2026]
- FIXED: retract/1 and retractall/1 erased clauses that the pattern's
constraints reject When the pattern holds attributed variables,
unifying it with a clause only schedules the constraint goals.
They ran after retract/1 or retractall/1 returned, when the clause
was already erased. A clause the constraints reject is now neither
returned nor erased. The constraint goals of retract/1 run as normal
goals: if they leave choicepoints, backtracking into them succeeds
again with the clause removed. This is compatible with SICStus Prolog.
[Nov 15 2026]
- FIXED: assert could publish a clause before its content on weakly
ordered processors Readers walk clause lists and index buckets without
the predicate lock. assertDefinition_() and
insertIntoSparseList()
linked a new clause reference with a plain store, so on a processor
that may reorder stores (ARM, POWER) a reader could follow the link
and read the clause reference or the clause before their content was
visible. Also, assertDefinition_() advanced the global generation
before it stamped the clause, so a goal at the new generation could
find the clause invisible and, a moment later, visible.
[Nov 18 2026]
- FIXED: transaction/1 and snapshot/1 published their start
generation unchecked The start generation of a transaction
(LD->transaction.gen_start) pins the global view of its goal:
clause GC marks it for every dirty predicate. transaction/1 and
snapshot/1 stored it with a plain store, without the second read of
the global generation that
setGenerationFrame() uses for a frame.
A clause GC that started between the read of the global generation
and the moment the store became visible could miss the pin and
reclaim clauses visible to the goal: a clause erased in between
disappears from the goal's view, which then matches no generation,
and a clause the goal is already walking can be freed under it.
The same holds when a transaction with a constraint moves its start
generation forward before it runs the constraint.
[Nov 15 2026]
- FIXED: an access object popped out of order could hide another
from clause GC
popPredicateAccess() of an access object that is
not the latest one moves the later ones down, one slot at a time.
Clause GC marks the access objects of another thread under that
thread's scan_lock and reads the slots in order, so it could read a
slot before the move and the next one after it, missing the access
object that moved between them; the clauses visible only at its
generation could then be reclaimed. The move now holds scan_lock.
Access objects are popped out of order only by nested enumerations,
such as forall(clause(...), use_module(...)) while loading.
[Nov 18 2026]
- FIXED: retract/1 could miss clauses after it lost its candidate If
another thread erased the clause retract/1 was about to remove, or an
update event refused to erase it, retract/1 continues at the current
generation. It resumed from the next candidate chosen at the older
generation. That skipped a clause only the current generation sees,
and was NULL if the lost clause was the last candidate, so retract/1
failed although another thread added a matching clause. If the clause
index it walked had been replaced or deleted since, it also missed the
clauses added after that, as such an index no longer receives clauses.
- FIXED: retract/1 could free the clause index it walks after losing
its candidate If another thread erased the first matching clause,
retract/1 continues at the current generation. Since a2fb283
it moves its predicate access object to that generation, so that
clause GC protects the clauses created since. But ctx->chp, the
clause retract/1 continues from, may be in a clause index that was
replaced after retract/1 started, and clause GC frees a replaced
index once every generation it marks is after the replacement.
After the move, clause GC therefore freed the index retract/1
continued in. Debug builds then abort with "Ditching clause" in
lingerClauseRef(), AddressSanitizer reports a heap-use-after-free in
next_clause_primary_index() and release builds lose a clause.
- FIXED: retract/1 did not check
pushPredicateAccessObj() for failure
pushPredicateAccessObj() returns NULL after raising an exception
when a thread has too many predicate access objects or memory runs
out. retract/1 then read the generation through a null pointer.
retractall/1 already checks the result.
[Nov 14 2026]
- FIXED: debug builds counted protected clause references without
a lock
protectCRef() and unprotectCRef() keep a count per clause
reference in a table that all threads share, and updated it without
a lock. Two threads protecting the same clause reference could
lose an update. A lost increment made unprotectCRef() fail its
assertion; a lost decrement left the reference marked as protected,
so lingerClauseRef() later reported "Ditching clause" for a clause
that no retract/1 still used. Only O_DEBUG builds keep this table.
[Nov 18 2026]
- FIXED: a static predicate could run a clause that reconsult or abolish
erased The supervisors of static predicates with one or two clauses
(S_TRUSTME, S_LIST) embed their clauses and run them without checking
whether they are visible.
reconsultFinalizePredicate() erases clauses
without replacing the supervisor. Usually fix_metapredicate() has
replaced it before, but not for a meta-predicate whose declaration
did not change. For example, after reloading
- FIXED: a goal could see clauses that a reload added to a
static predicate it runs Walking the clause list of a static
predicate skips the generation tests when the predicate is clean
(
is_clean_definition()): not dynamic, not reloading and not registered
dirty. Three gaps let a goal see another clause set than the one of
its generation:
- FIXED: unload, reload and abolish erased clauses without the
predicate lock
removeClausesPredicate() documents that its
caller holds L_PREDICATE. unloadFile(), delete_old_predicate()
and destroyDefinition() called it without the lock, and
reconsultFinalizePredicate() erased clauses without it. They update
the clause counts and the clause indexes of the predicate, which
assert, retract and clause GC update while holding the lock.
[Nov 12 2026]
- FIXED: undo/1: first goal after backtracking did not see the undo A
scheduled undo goal runs at the call port of the next goal, after
the frame of that goal was given its database generation. If the
undo goal changes the database, e.g.,
undo(erase(Ref)), this first
goal still resolved against the database as it was before the undo.
[Nov 14 2026]
- FIXED: a cyclic module-qualified meta argument could crash the call
m_qualify_argument() raises a type error if a meta argument is a cyclic
- M:Goal term. It called PL_error() while lTop was still at the frame
of the call (normal_call leaves it there and the supervisor moves it),
so PL_error() allocated over that frame and the exception was unwound
through what it wrote: three calls such as
m(X, _) with X = m:X,
where m/2 is declared with meta_predicate m(:, -), end in "failed
to recover from local-overflow" or, in a debug build, a SIGSEGV in
helper_b_throw(). The branch that grows the global stack already moves
lTop above the arguments first; the error branch now does the same.
[Nov 18 2026]
- BUILD: debug builds failed:
assert_proc() printed an undeclared term
0451759 moved the compilation of a clause from assert_term() into the
new assert_proc(), which gets the head and body, but kept the debug
message that printed the clause term. It now prints the head.
- FIXED: xref: no missing-file warning for loads inside :- if The
cross-referencer processes both branches of conditional compilation,
so a load guarded by exists_source/1 was reported as a missing file
whenever the guard was false. This printed a warning while generating
the documentation of library(http/http_path) in single threaded builds,
where library(http/http_host) is not installed.
[Nov 17 2026]
- BUILD: move TEST_PROTOBUFS_PROTOC to packages/protobufs
- ENHANCED: S_STATIC: do not set lTop before selecting the clause
S_STATIC used to raise lTop before
firstClause() so the arguments were
safe if clause selection touched the stacks. The common static cases
do not use the stacks, so that was wasted work on every static call.
firstClauseVM() tries the fast path without moving lTop and only
raises it when falling back to the general search. S_STATIC then
sets lTop once, after the clause is known (or when there is no match /
the local stack must grow).
- ENHANCED: VM: avoid passing hot values through memory With one
C function per VM instruction, jumping to a shared helper means
parking values in the in-memory register file and reading them back.
B_VAR/B_VAR0-2 now handle the common "already bound" case in the
instruction itself and I_CALL opens the new frame using a local
pointer instead of passing it through NFR to normal_call. The work
is done by the inline functions
put_bound_var() and open_call_frame().
- DOC: VM survey: avoiding
memset() in H/B_RFUNCTOR landed as 6752b79cc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ENHANCED: integer fast paths for the arithmetic VM instructions
Everyday arithmetic is mostly small integers. Special-case the common
paths in A_VAR/A_VAR0-2, A_ADD, A_MUL, the A_LT..A_NE comparisons
and A_FIRSTVAR_IS so tagged integers that do not overflow avoid the
general helpers and the register save/restore around them.
[Nov 13 2026]
- ENHANCED: clear the arguments of new terms without calling
memset()
GCC and Clang turn the short loops that set the arguments of a new
compound to variables (B_RFUNCTOR, H_RFUNCTOR, T_FUNCTOR and C_VAR_N)
into a call to memset()/bzero(). For the typical small arity that is
more expensive than a few stores and forces the VM instruction to save
its registers. clearWordsScalar() keeps one store per word by using
an empty asm on the pointer so the loop is not recognised as memset().
[Nov 14 2026]
- ENHANCED: omit the frame pointer in the VMI functions Using VMI
functions, each VM instruction is a small function that continues
with a tail call. Compilers that keep the frame pointer by default,
notably Clang on macOS x86_64, add a push/mov/pop of the frame
pointer to most of them. When using Clang, compile pl-wam.c using
-fomit-frame-pointer, except for the Debug and Sanitize builds.
GCC already omits the frame pointer at -O2.
[Nov 13 2026]
- ENHANCED:
firstClause() and nextClause(): inline the common cases
Prolog predicates that are neither dynamic nor dirty do not need a
generation check. For those, firstClause() and nextClause() now take
the matching clause from the clause list inline in pl-index.h when:
[Nov 17 2026]
- FIXED: help/1: clicking a link in Epilog called the non-existing
follow_link/2 The help library is module prolog_help.
- ADDED: Prolog flag gc_code and garbage collection of modules The flag
gc_code selects which code is garbage collected:
false, clause
(default), procedure or module, where each level includes the
previous ones. At procedure, predicates created at runtime are
reclaimed (see above). At module, modules that are empty and
no longer referenced are removed as well, e.g., modules created by
calling M:G or asserting into a new M, or reset using abolish_module/1.
At this level, in_temporary_module/3 safely reclaims the module and
its predicates when they are no longer referenced, rather than freeing
them immediately, which was unsafe if other threads or clauses still
referred to them. library(pengines) sets gc_code to module.
[Nov 16 2026]
- ADDED: abolish_module/1 to reset a module to a new empty module
abolish_module(+Module) abolishes all predicates of Module, removes its
exports and operators, resets its import module, class and flags and
unloads the file it was loaded from. The memory used by its clauses
and runtime predicates is reclaimed. Unlike '$destroy_module'/1,
this is safe while other threads run code of the module.
[Nov 17 2026]
- ENHANCED: garbage collection of procedures created at runtime
Procedures created at runtime are reclaimed by clause garbage
collection if nothing refers to them: stubs that call/N creates for
undefined predicates, stubs for undefined predicates called from
clauses that were removed, and predicates created using assert/1,
dynamic/1, etc. that were abolished using abolish/1. This avoids
leaking memory in programs that create predicates from data.
Predicates loaded from files and predicates accessed from C
(PL_predicate(), etc.) are not reclaimed.
- FIXED: race between assert/1 and auto-importing the same predicate
If a thread asserted into a module while another thread auto-imported
the same predicate into that module, the clause could get lost or be
added to the static imported predicate.
- FIXED: clauses overriding an imported predicate referred to the import
If a file defines a local version of a predicate that is imported,
the clauses belong to the local definition, but they were compiled
before the import was overruled and recorded the imported definition.
For example, clause_property/2 reported the imported predicate and
the imported predicate was marked as having clauses with a different
context module.
- FIXED: crash when aborting at the debugger redo port of retract/1
If a thread was aborted while the debugger was at the redo port of a
non-deterministic foreign predicate such as retract/1 or clause/2, the
predicate was called twice to discard its choice point. For retract/1,
the second call used its context after it was freed. This crashed
SWISH if a user closed the tracer at such a port.
[Nov 16 2026]
- FIXED: seen/0 after set_input/1 dropped a reference to user_input
The current input is reference counted by
setStandardStream(), but
pop_input_context(), used by seen/0, and see/1 assigned it directly.
After set_input/1 released user_input, seen/0 made it current again
without a reference. Repeating this dropped the reference count
of user_input to zero while a stream handle to it was still alive,
which failed an assertion in get_stream_handle().
- FIXED: assert/1, retract/1, retractall/1 could raise a false permission
error Running assert/1, retract/1 or retractall/1 concurrently
with abolish/1 or other updates on the same predicate could raise
"No permission to modify static procedure" on a predicate that is
dynamic or undefined.
- FIXED: retract/1 could access clauses reclaimed by clause GC retract/1
on a predicate that is concurrently modified could access freed memory,
leading to crashes or hangs.
- FIXED: assert/1 racing with abolish/1 could write to a freed clause
Asserting clauses to a predicate while another thread abolishes it
could corrupt memory, leading to crashes or hangs.
- FIXED: (re)loading a module file could crash threads calling into it
Loading a module file, as well as set_module/1 with
base(Module), freed
and reallocated the cell holding the import module, also if the import
module did not change. Threads that walk the import modules, for
example to resolve an undefined predicate, could access freed memory.
- BUILD: Windows ARM64 cross-build: use the host pkg-config MSYS2
installs a Windows pkg-config without .exe in ${MINGW_ROOT}/bin.
As CMAKE_FIND_ROOT_PATH is ${MINGW_ROOT}, FindPkgConfig found this
one before the host's, could not run it and failed with "Could NOT
find PkgConfig". Find pkg-config outside the target root and default
PKG_CONFIG_LIBDIR to the MSYS2 .pc files.
- BUILD: Compile without threads after the thread_property/2 fixes
init_interactor_mutex() only exists with O_PLMT, as only then the
thread handle has room for the mutex. Also avoid unused variable
warnings for detached without O_PLMT and for LD in gc_trace_handler()
with NDEBUG.
- FIXED: Local sweep kept sparse empty chunks rather than full ones
Chunks lose the slots of promoted atoms, so chunks reused from the
pool may have few slots.
returnEmptyLocalChunks() returned empty
chunks from the end of the list while the remaining slots sufficed,
so it returned the new, full chunks and kept the sparse ones from the
pool: up to 165 chunks for 1024 slots. It now keeps the empty chunks
with the most slots. This made local_blobs:empty_chunks_returned
fail under load.
- ENHANCED: Local sweep returns empty chunks without slots; report slots
An empty chunk whose slots all left to ordinary atoms adds nothing
to the slots a thread keeps for its local atoms, but it was only
returned if the remaining chunks had enough slots. It now always goes.
- FIXED: assert/1 concurrent with abolish/1 could add a clause to a
static predicate If abolish/1 ran while assert/1 added a clause to an
undefined predicate, the clause could end up in a static predicate.
Further assert/1 calls then raised a permission error.
- FIXED: abolish/1 concurrent with assert/1 could leave a clause that
is never reclaimed If abolish/1 erased a clause that assert/1 was
adding, the clause could remain visible and was never reclaimed.
The predicate then remained defined after abolish/1, so assert/1
raised a permission error.
- FIXED: thread_property/2 could crash while detached threads are
created Enumerating thread properties while other threads create
detached threads could reclaim the handle of a running detached thread,
leading to a crash or "invalid atom" error when the thread terminates.
- FIXED: thread_property/2 could crash while engines are created or
destroyed Enumerating thread properties while other threads create
and destroy engines could crash, either in thread_property/2 or in
engine_next/2.
Package RDF
[Nov 20 2026]
- DOC: do not load the times package after pl.sty pl.sty selects
the fonts. Loading times later selected Type 1 fonts that lualatex
cannot use with the TU encoding.
Package clib
[Nov 19 2026]
- MODIFIED: process_create/3: text with a 0-code raises the kernel error
Arguments, environment values and the working directory that contain a
0-code now raise
representation_error(nul_terminated_string(Text))
as the kernel does for PL_get_chars(), rather than
domain_error(text_non_zero_code, Text) or (Windows)
domain_error(no_zero_code_atom, Text).
- FIXED: MacOS: process_create/3 child could kill the Epilog window
A child that inherits the pty of an Epilog window adopts it as its
controlling terminal. On BSD systems, MacOS among them, the kernel
revokes the terminal when that child exits, so the next write of the
calling thread failed with EIO and the window went down. Like shell/1,
save the terminal before forking and repair it when the child is
reaped. Requires PL_save_ctty()/PL_restore_ctty() from the core.
Package graphviz
[Nov 16 2026]
- BUILD: link graphviz4pl with the thread library graphviz4pl.c uses a
pthread mutex, but the plugin was not declared THREADED. This went
unnoticed where pthreads are part of libc and failed to link for
Windows ARM64 (llvm-mingw).
Package http
[Nov 20 2026]
- FIXED: HTTP server leaked the socket if a reply failed on close If
the handler succeeded but cgi_finish/4 raised (typically because
the client went away), the CGI stream was never closed. It keeps
the socket stream open, so closing the connection did not release
the file descriptor. This affects, for example, SSE handlers that
catch the I/O error from a dead client and succeed.
- FIXED: Writing a parsed Set-Cookie header used wrong attribute names
Max-Age was emitted as max_age, which browsers ignore, and Expires
was quoted. Cookie attributes now use their canonical names and
their values are emitted verbatim (RFC 6265).
Package mqi
[Nov 20 2026]
- DOC: section id mqi-messages was used twice Co-Authored-By: Claude
Opus 5.5 <noreply@anthropic.com>
Package odbc
[Nov 16 2026]
- FIXED: ODBC: double free if growing the column buffer fails
odbc_realloc() freed the old block if realloc() failed, after which
pl_put_column() freed it again. odbc_realloc() now leaves the block
valid as realloc() does. This also fixes mark_context_as_executing(),
which kept the freed array and the enlarged size on failure.
Package pengines
[Nov 17 2026]
- FIXED: destroying a pengine that runs a query could leave it running
If a client sends
destroy while the pengine is running a query,
the HTTP request is answered with pending output of the query.
After that no HTTP request waits for the pengine, so the time limit
was not enforced and a looping query ran forever. If the pengine
did not yet read the destroy request, it is now aborted.
- ENHANCED: Pengines enable garbage collection of temporary modules Each
pengine runs in a temporary module. Loading library(pengines) sets
the Prolog flag gc_code to
module if it is clause or procedure,
so these modules are reclaimed.
Package pldoc
[Nov 20 2026]
- FIXED: LaTeX backend: a [[Name/Arity]] list without documented
predicates created an empty description environment This is a LaTeX
error. Now emit an item with the reference. Also added the missing
message for
pldoc(no_predicates_from(Spec)).
Package protobufs
[Nov 18 2026]
- TEST: protobuf_varint suite: test the library, not a local reference
The generated suite defined its own varint/zigzag encoder and decoder
in the test file and only tested those. Run the same vectors through
protobuf_var_int//1, protobuf_message/2 and int64_zigzag/2, using
plunit forall/1 for the vector tables. Malformed varints fail,
as the library does. Also give the two varint/300 tests unique names.
- DOC: protobuf_segment_convert/2 example: show the actual string output
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- FIXED: protobuf_var_int//1: reject a 10th varint byte larger than 1 A
varint holds at most 64 bits, so the 10th byte only contributes bit 63.
The decoder accepted any value there, producing integers beyond 2^64.
Also replace the bare
Shift < 70 bound by an explanation of the
byte/shift arithmetic.
[Nov 17 2026]
- CLEANUP: minor formatting and comment changes
- TEST: add some tests generated by Gemini
- BUILD: move TEST_PROTOBUFS_PROTOC to here
Package ssl
[Nov 17 2026]
- PORT: OpenSSL 4.1: use ASN1_STRING_get_length() OpenSSL 4.1 deprecates
ASN1_STRING_length() in favour of ASN1_STRING_get_length(). Detect the
new symbol and map ASN1_STRING_length() to it so ssl4pl.c builds
without warnings on OpenSSL 4.1 while remaining compatible with
older releases.
[Nov 16 2026]
- FIXED: report IP address mismatch as hostname_mismatch When
host(Host)
is an IP address, OpenSSL reports X509_V_ERR_IP_ADDRESS_MISMATCH rather
than X509_V_ERR_HOSTNAME_MISMATCH. This was passed to cert_verify_hook
as an unknown error, so hooks that accept hostname_mismatch (e.g.,
library(redis)) rejected connections to servers addressed by IP.
Package swipy
[Nov 16 2026]
- TEST: janus_data:cyclic_pl_stack: accept RecursionError from Python
before 3.14 Python 3.14 derives its recursion limit from the C
stack, so with a big C stack the Prolog stack overflows first.
Older versions, e.g., 3.12 on Ubuntu 24.04, have a fixed limit that
is reached first. Either error stops the conversion, which is what
the test is about.
Package xpce
[Nov 20 2026]
- FIXED:
pp() of an invalid object crashed after an earlier recovery
pcePP() recovers from SIGSEGV/SIGBUS using longjmp() out of the
signal handler. Where setjmp() does not save the signal mask (Linux),
the signal remained blocked after the first recovery, so a second
fault killed the process. Install the handler with SA_NODEFER and
use sigsetjmp(env, 0)/siglongjmp(). This also avoids the cost of
saving the signal mask on macOS, where setjmp() does so under a
process-wide lock.
[Nov 19 2026]
- FIXED: MacOS: swipl-win exited after running a child process E.g.,
pack_upgrade/1 of a git pack. When a child that adopted the window's
pty exits, the kernel revokes the pty and the window reads end of file.
rlc_reclaim_pty() reconnected it, but since the pty is drained by the
watcher thread the end of file stayed recorded on the watch, so the
next read reported it again and the window closed, halting swipl-win.
Clear it after reclaiming the pty.
- TEST: #1582 deleting on a full first row of a wrapped input line
Regression test for the libedit fix: delete a character from the first
row of a wrapped input line whose first row fills the width exactly.
[Nov 18 2026]
- FIXED: SDL: crash in CtoEvent() handling the end of a visual flash
The flash timer took its reference on the frame only when it fired,
in SDL's timer thread, so a frame destroyed during the flash left a
dangling pointer in MY_EVENT_FLASH_END. Take the reference when the
flash is scheduled. Also do not end a newer flash early.
- FIXED: Epilog: goals signalled to a busy console ran in module epilog
If the console was not reading a query, ->inject with on_fail=signal
used thread_signal/2 from module epilog. Consulting a file this way
(e.g., Compile buffer in PceEmacs while a query runs) loaded it into
module epilog rather than user.
- ENHANCED: do not trace files (re)loaded from PceEmacs or the console
If the toplevel was in debug or trace mode, (re)loading a file using
PceEmacs (Compile buffer, Make, Consult region) or the console's
consult actions (links, drag-and-drop, File/Consult) started tracing
the load. These commands are now injected as
notrace(Goal) if the
toplevel runs queries in debug or trace mode. ->inject has a new
optional argument debug to control this.
[Nov 16 2026]
- CLEANUP: interface.c: remove the SICStus glue and unused globals SWI
is defined unconditionally, so the SICStus sections were dead code.
Removed the atoms, functors and types that are initialised but never
used, which clang 23 reports with -Wunused-but-set-global.