# Ann: SWI-Prolog 9.2.5 (stable)

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-9-2-5-stable/7464>\
**Category:** Releases\
**Created:** [May 22, 2024, 1:09pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-2-5-stable/7464 "2024-05-22T13:09:02Z")\
**Posts on this page:** 1\
**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:** [May 22, 2024, 1:09pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-9-2-5-stable/7464/1 "2024-05-22T13:09:02Z")

</div>

Dear SWI-Prolog user,

SWI-Prolog 9.2.5 (stable) is ready for download. This release fixes  
some portability issues as well as a couple of crashes. There are  
small additions to the HTTP, PlDoc and Janus extension packages.

```
Enjoy --- Jan

```

# SWI-Prolog Changelog since version 9.2.4

- FIXED: Generating variable names may conflict with user variables.

- FIXED: Links to FAQ pages.

- FIXED: Enabled pre-check for left-shift of large integers This both  
avoids possible GMP exceptions and allocating huge amounts of memory.

- ENHANCED: Clarify shifting negative integers This patch also avoids  
relying on undefined C behavior.

- FIXED: shift (\<\< and \>\>) of zero.

- DOC: Add `--sigalert=NUM` to `swipl --help`.

- FIXED: trie\_gen\_compiles/2,3: possible stack corruption

- FIXED: #1277 crash in trie\_gen\_compiled/3.

- CLEANUP: Avoid UBSAN error Test for arity \> 0

- CLEANUP: workaround for an UBSAN error UBSAN complained about a left  
shift of -1

- CLEANUP: avoid UBSAN error in mkvmi.c The error is raised because we  
have e5 -= 0 for e5 == NULL

- FIXED: Possibly undefined too large shift

- FIXED: bf\_set\_si for -INT\_MIN avoid undefined behavior raised by UBSAN

- PORT: !1269 Deal with the type `z_crc_t` used by minizip zlib This  
works around a type conflict over get\_crc\_table(). Some headers define  
this as returning `z_crc_t*` without defining this type while others  
(Fedora 40) defines the function as `uint32_t*` and defines `z_crc_t`.  
This patch makes CMake check for the `z_crc_t` type and, if defined,  
use this definition.

- DOC: write\_term/2: document interaction between portrayed and  
numbervars

- FIXED: Do not name binding variables if the answer options to not  
handle `'$VAR'(N)`

## Package clib

- CLEANUP: Use unsigned integers for bitmaps Avoids undefined shifts  
and makes the code more readable.

## Package http

- DOC: Server-sent events support

- ADDED: Support for server-sent events These patches allow for  
streaming output which is enabled by default if the content-type is  
`text/event-stream`. Still needs documenting.

- ADDED: http\_reply\_from\_files/3: option not\_found(+Action) Using  
not\_found(404), reply using http\_404/1 if the requested file does  
not exist.

- MODIFIED: json\_write/3 and friends: no spacing with width(0).  
If the option `width(0)` is provided, do not emit a space after a  
“,” delimiting object fields. This implies spacing is minimal.  
This is a requirement for _signing_ JSON documents.

- DOC: http\_post\_data/3: document string([Type], String) data

## Package jpl

- TEST: Search for junit.jar as well as junit4.jar. Fedora only ships  
with `junit.jar`. We’ll assume version 3 and older have died by  
this time.

## Package pldoc

- ADDED: plDoc: support ` __text__ ` and ` **text** ` for **strong**.

- ADDED: Support `[Label](mailto:me@example.com)` links in PlDoc

## Package swipy

- ENHANCED: Context manager for janus.query() + tests for doc examples

- FIXED: #9 PrologError exceptions cannot be caught as  
`janus.PrologError`

- FIXED: py\_is\_object/1: Need to grab the GIL

## Package xpce

- CLEANUP: Avoid relying on too big integer shift Also document that  
the save format is not 64-bit robust. I do not know the consequences.  
Probably it just limits the size of some objects.
