Ann: SWI-Prolog 9.2.5 (stable)

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

    else-branch of if ( !e4 || (is_vmh && !e5) )
    <=> e4 && !(is_vmh && !e5)
    <=> e4 && (!is_vmh || e5)

    Consequence is e4-- (which is fine) and e5 -= is_vmh which is either
    a noop* for is_vmh == 0 or fine for is_vmh != 0 && e5 != NULL.

    The noop case raises the error if e5 == NULL. * CLEANUP: Use
    unsigned int for variable table bitmap.
    This avoids an officially undefined shift in C.

  • 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.
1 Like