Ann: SWI-Prolog 9.2.2/9.3.2

Dear SWI-Prolog user,

SWI-Prolog 9.3.2 is ready for download. Most of the changes are
minor. Highlights:

  • Crucial is a fix to range streams that are used by the HTTP
    client. Due to a use-after-free error these things did not
    work correctly in general and not at all on the MacOS version.
    These streams are now used by http_open/3 for HTTPS connections,
    so failure has serious impact.
  • Peter Ludemann did more work on the C++ interface as well as
    clarification of the documentation, notably for the C interface.

Several small enhancements and bugfixes.

Enjoy --- Jan

SWI-Prolog Changelog since version 9.3.1

  • ADDED: library(sandbox): allow for current_predicate/1 without modules.

  • FIXED: Using the -l file option multiple times This used to load
    the first file into user (correct) but all others into the toplevel
    system module. Now all files are loaded into user.

  • ENHANCED: #1237 check_installation/0: hide details. Due to changes
    in the message format failing to load shared objects, failing tests
    due to shared object failures causes long error reports.

  • FIXED: Highlighting (SWISH). Avoid double brace_term_open/close for
    {} goal terms. Still needs proper highlighting in SWISH, as it is
    now just marked as brace term.

  • DOC: Clarify details of PL_get_chars() et al

  • DOC: pack management and a few minor patches.

  • DOC: Replaces !1232 with example for using PL_rewind_foreign_frame().

Package cpp

  • CLEANUP: tests and clarification of term to string conversion.

  • DOC: add missing method/function documentation

  • FIXED: term-to-string and related functions

  • ENHANCED: added PlTerm::must_be*() methods

  • ENHANCED: remove unnecessary “const …&” from parameters; deprecate
    some dubious functions

Package http

  • ENHANCED: http_read_data/3: map syntax errors to status 400 If
    reading the data results in a syntax error we add context that causes
    http_exception.pl to map the error to a HTTP 400 reply rather than
    HTTP 500.

  • FIXED: HTTP Session data plugin for Redis timeout handling.

  • ENHANCED: Redis support for HTTP sessions This patch deals with IPv6
    peers and allows for specifying both an RW and RO Redis database.
    An RO Redis database may be used for high-availability (sentinel)
    or clustered Redis DB.

  • FIXED: json_write/2,3: deal with high Unicode characters on Windows.

  • FIXED: use-after-free memory access error This notably causes the
    close/0 on a stream opened using http_open/3 to fail on some platforms.

Package redis

  • ADDED: sentinel_slave/4

  • FIXED: redis_get_list/3,4: LLEN can return OK. Unclear why
    this is possible. It happens in HTTP Redis based session management,
    where the list is created using LPUSH. As a work-around, we
    return the empty list.

Package ssl

  • FIXED: #170 crypto_data_hash/3: allow hmac key to contain 0-bytes.
2 Likes

Greetings from MSYS2 :slight_smile: Everything works.

$ pacman -S mingw-w64-ucrt-x86_64-swi-prolog
resolving dependencies...
...
matth@hp UCRT64 ~
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 9.2.2)
...
1 ?- check_installation.
% Checking your SWI-Prolog kit for common issues ...
%
% Version: ............. 9.2.2
% Address bits: ........ 64
% Architecture: ........ x64-win64
% Installed at: ........ c:/msys64/ucrt64/lib/swipl
% Cores: ............... 4
%
% Checking gmp ................................. ok
... (skipping the other "oks")
% Loading library(janus) ....................... FAILED
Warning: Cannot load required DLL
Warning: See http://www.swi-prolog.org/build/issues/janus.html
Warning: library(jpl) .......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/jpl.html
Warning: library(pce) .......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/xpce.html
Warning: Found 3 issues.
true.

2 ?- thread_create(thread_exit(true), Id).
Id = <thread>(3,000001BE685023C0).

3 ?- halt.

matth@hp UCRT64 ~
$

In other words, no unexpected behavior. python/janus, jpl and pce have been intentionally disabled. python is on the todo list for the next version.