# Ann: SWI-Prolog 9.2.6 (stable)

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-9-2-6-stable/7630>\
**Category:** Releases\
**Created:** [July 24, 2024, 1:21pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-2-6-stable/7630 "2024-07-24T13:21:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [July 24, 2024, 1:21pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-2-6-stable/7630/1 "2024-07-24T13:21:49Z")

</div>

Dear SWI-Prolog user,

SWI-Prolog 9.2.6 is ready for download. Most of the patches are  
portability and build issues. This version also improves  
compatibility with the 9.3.x series.

The C++ interface has been updated. Unfortunately there seems to be a  
problem using PlTermScoped() on gcc 10 and older. gcc-12 works, I  
don’t know about gcc-11.

```
  Enjoy --- Jan

```

# SWI-Prolog Changelog since version 9.2.5

- BUILD: Added CMake options SWIPL\_CC and SWIPL\_CXX This selects the  
defaults for the `c_cc` and `c_cxx` flags. Distributions should  
normally set these to the common C and C++ compiler of the platform.  
Local builds typically leave them default, setting these flags to  
the same as used to build SWI-Prolog.

- FIXED: #1300 Modify prefix block operator to plain term if there is  
no argument.

- CMAKE: Fixed `-DCMAKE_BUILD_TYPE=Sanitize` Defaults to  
`-fsanitize=address`.

- BUILD: Extended `scripts/configure` to include `termux`

- FIXED: using big integers as trie value when using LibBF

- ADDED: PL\_api\_error() to signal invalid use of the API

- ADDED: Dummy PL\_free\_term\_ref()

- TEST: make string\_upper/2 test succeed if `LANG=C`

- FIXED: `qlf` app to not import the compiled library into `user`.  
This leads to conflicts.

- DOC: Improved docs for prolog\_alert\_signal/2.

- FIXED: `swipl pack install .` to install using a symlink.

- PORT: Another iteration trying to tame MacOS.

- PORT: Deal with wcsxfrm() nor immediately returning required size

- FIXED: Type for PL\_get\_intptr\_ex(). Breaks on Win32

- CLEANUP: Make all code clean for clang-18 -fsanitize=undefined

- ENHANCED: Added ‘c\_cxx’ flag and env SWIPL\_CXX for packs

- FIXED: #1292: possible stack corruption in exception handling.  
Probably can only be triggered if `SECURE_GC` is enabled which wipes  
the unused parts of the stacks in trimStacks().

- SANDBOX: Allow for term\_singletons/2

- FIXED: #1292 Possible stack corruption after exception.

- FIXED: thread\_signal/2: may raise exception and succeed.

- ENHANCED: make/0: no longer try to update the indices of system  
libraries. These libraries are properly maintained by the build and  
installation process while the time stamps are often wrong after the  
installation process.

- DOC: time/1: we do support per thread CPU time on MacOS.

- FIXED: Properly export `environment_frame` in foreign predicate redo.  
The incorrect setting causes problems in the new consistency checks  
for `term_t` as well as confusing backtraces.

- WASM: `SWIPL()` initialization changed in Emscripten Where  
`SWIPL(Module)` used to return a Promise that would complete  
returning the same `Module`, it now returns a new module object  
that is independent from the agument passed.

- FIXED: =@=/2: attributed variables must be handled as normal variables.

- FIXED: Determine file exports under conditional conditional  
compilation.

- FIXED: Process multiple predicates from export/1 directives.  
To determine file exports, we considered only a single predicate  
for export/1.

- FIXED: ‘$open\_xterm’/5: raise exeption if we cannot run xterm.  
Used to hang, waiting for output from the xterm process.

- MODIFIED: Renamed `open_xterm/5` as private `'$open_xterm'/5`.  
open\_xterm/5 was not documented. This patch removes the implementation  
completely if the OS lacks the required POSIX pty support and renames  
the predicate to `'$open_xterm'/5` if xterm consoles can be supported.  
In addition, this patch adds conditional compilation to console support  
in `library(threadutil)` if neither the Windows support nor the xterm  
support can be provided.

- FIXED: Build dependency of documentation on `utf8proc` package

- ENHANCED: call\_in\_thread/2 error handling.

- TEST: test\_interrupt: skip test if alert signals are required but  
they are disabled.

- DOC: fix typo and improve cmake instructions

- FIXED: thread\_create/3: handling of `c_stack` option. While the  
size was documented to be in K-bytes, it actually is in bytes.  
Updated the docs for that. Allow for c\_stack(0) to use the mininum.

- ADDED: thread\_get\_message/3 and thread\_send\_message/3:  
signals(BoolOrTime) option.

## Package clib

- PORT: Proper ip6 support detection for OpenBSD

- DOC: change example to use stream pairs

## Package cpp

- TEST: Disable scoped term tests for 9.2.x

- ENHANCED: Use read mutex for AtomMap::find()

- ENHANCED: added move constructor to PlRecord to support make\_pair()

- FIXED: base class visibility

- DOC: fix some obsolete function names

- ENHANCED: convenience methods in PlRecordExternalCopy

- ENHANCED: Experimental PlTermScoped API

- DOC: PlTail is now PlTerm\_tail + fix examples

- PORT: OpenBSD does not have malloc header

## Package http

- DOC: Fix building docs in single threaded version.

- ADDED: library(http/htmx). Support predicates for [htmx.org](http://htmx.org)

- FIXED: Failure to serve data with unknown mime type.

## Package jpl

- TEST: removed Garbo.java This file uses the deprecated `finalize()`  
method and does not seem to be used anywhere.

- TEST: Find hamcrest needed for JPL tests on Fedora

- FIXED: Illegal use of SWI-Prolog API Code as modifying predicate  
arguments.

## Package ltx2htm

- FIXED: Avoid overwriting predicate argument

## Package pengines

- ADDED: Add support for put\_code/1 and put\_char/1 to  
library(pengines\_io)

- CLEANUP: Use reply\_json\_dict/1 for replying

- ADDED: Add support to collate multiple output events. This extends  
the HTTP protocol to wait for more output, sending multiple output  
events as one chunk. The chunk is ended if no more output is timely  
available, the max of (currently 100) output events is collected,  
or a non-output event is found.

## Package plunit

- FIXED: run\_tests/0-2: correctly report combined CPU usage.

## Package protobufs

- CLEANUP: tests now run outside the build

- TEST: Use cmake’s built swipl executable where possible

- DOC: examples+tests using updated protobuf-compiler package

## Package semweb

- DOC: Clarify rdf\_retractall/3 and rdf\_load/2

## Package sgml

- FIXED: Avoid referencig an invalid term\_t

## Package ssl

- CLEANUP: Abstract from OpenSSL/LibreSSL versions and use more CMake

- PORT: Fix building with modern LibreSSL versions LibreSSL 3.5.0.

- FIXED: Illegal use of SWI-Prolog API

## Package swipy

- FIXED: accept string(Text) as input Added tests for extended  
py\_string\_as().

- ADDED: support for py\_string\_as() option with `codes` or `chars`

## Package xpce

- PORT: Make compile on Windows after switching to getaddrinfo()

- PORT: #1299 Replace deprecated gethostbyname() by getaddrinfo()

- PORT: Initialization of `builtin_names`. This used two structs,  
one for initialization (bname) and one for access (name) due to the  
lack of support for designated initializers in old C. We can now do  
it cleanly.

- PORT: Work around MacOS 15 (beta) pulling socket.h with sys/ioctl.h

- CLEANUP: Use offsetof() where applicable This avoids runtime errors  
when using `-fsanitize=address`

---

<div class="post-metadata">

**Author:** ![mgondan1](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mgondan1/32/803_2.png) [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Post date:** [August 25, 2024, 3:05pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-2-6-stable/7630/2 "2024-08-25T15:05:44Z")

</div>

The obligatory “Now also on MSYS2” reply.
