Ann: SWI-Prolog 8.5.2

Dear SWI-Prolog user,

SWI-Prolog 8.5.2 is ready for download. Most of the changes concern
portability, testing and stability. Highlights:

  • Handle C-stack overflows as normal Prolog exceptions for read/1,
    write/1 and assert/1 (and friends). Only works on POSIX systems
    that provide the sigaltstack() API.

  • Several reports on test failures by @peter.ludemann. Resulted in
    a fix for a possible crash in shutdown.

  • Serious rewrite for installing community packs that involve
    foreign components. Now provides support for conan for
    dependencies and much enhanced support for CMake for building.
    May cause some (pack install) regression. Please report.

  • Clean build on gcc-11 (stop some innocent warnings). Unfortunately
    gcc-11 seems to produce noticeable slower code (~5%) than 10 and 9.

  • Make SWI-cpp.h compile without warnings on g++-11.

  • Corinna Vinschen updated the Cygwin port.

@eric.zinda, I’m afraid I missed the latest MQI patches. They are now
in the git version. Sorry.

Enjoy --- Jan

SWI-Prolog Changelog since version 8.5.1

  • STYLE: list_void_declarations/0, part of checks after make/0 to list
    predicates defined as discontuguous/1 while they have no clauses.
    This is, according to ISO, not a bug as such predicates are considered
    to be defined.

  • FIXED: Be more relaxed about existence of the current predicate
    when pushing and popping the compilation context.

  • ENHANCED: Report failed build steps because no tools was willing to
    do the job. Pass -DCMAKE_BUILD_TYPE=Type, which may be set from
    the options to pack_install/2.

  • ENHANCED: Get version info into the Prolog flag. Now uses CMake rather
    than a shell script and provides a new Prolog flag cmake_build_type.

  • FIXED: pack_install/1 install step for make based packages.

  • FIXED: Rebuilding GNU-style packages failed due to catching wrong
    exception.

  • FIXED: pack_rebuild/1 for CMake configurations.

  • ADDED: A file <home>/cmake/swipl.cmake that provides generics to
    use CMake for building SWI-Prolog packs.

  • DOC: Updated CMake build instructions.

  • ADDED: pack_install/1: reorganized the code building foreign resources.
    This code is now in a new library(build/tools) and uses a plugin
    architecture that deals with Conan, CMake and GNU tools (autoconf
    etc.). The changes are intended to be fully compatible with the
    old system. The build system now supports more tools and provides
    mechanisms for structured extensions.

  • DOC: meta_predicate/1: updated mode declarations.

  • EHNACED: pack_rebuild/1,2 for CMake based packages to use cmake --build and cmake --install for the build and install steps rather
    than calling make, ninja, etc. directly. Suggested by Wouter Beek.

  • MAINTENANCE: Possible segv in retract/1 when compiled using O_DEBUG.

  • FIXED: Possible race conditions between the various ways a thread
    can be joined.

  • FIXED: Do not start a new thread to join garbage collected threads
    while shutting down the system.

  • MAINTENANCE: On a system error we only go into interactive mode if
    both stdin and stderr are connected to a terminal. Otherwise we
    print the message, C and Prolog stack and abort.

  • MAINTENANCE: Use of guarded C-stack using sigaltstack() doesn’t go
    with ASAN. Results in the error below. Disabled guarding the C
    stack when compiling using address sanitizer. ``` ==101190==ERROR:
    AddressSanitizer failed to deallocate 0x2000 (8192) bytes at
    address 0x6250000b1900 ==101190==AddressSanitizer CHECK failed:
    …/…/…/…/src/libsanitizer/sanitizer_common/sanitizer_posix.cc:60
    “((“unable to unmap” && 0)) != (0)” (0x0, 0x0)

    
    
  • FIXED: CMake packs must use environment variables.

  • ADDED: Support ninja builds when using CMake

  • FIXED: pack_install/1,2: If we use CMake for configuration, we should
    also build in the CMake directory.

  • TEST: Signalled thread may already be dead.

  • ADDED: pack_install/1,2: provide pack_install(.) to add the local
    directory to the pack registry and build it. Also add option link(true)
    and rebuild(When) to provide more fine control over the build.

  • FIXED: pack_install/1,2: do not remove contents if the package
    registered as a symbolic link.

  • FIXED: memberchk/2 for partial lists where the unbound part is
    constrained. Reported on Discourse by Abramo Bagnara.

  • BUILD: Avoid GCC-11 warning

  • ENHANCED: Protect assertz/1 and friends (compiler) against C-stack
    overflows.

  • ENHANCED: Use setjmp() instead of sigsetjmp() to reduce the overhead
    of the C-stack guarding.

  • MAINTENANCE: Updated C calltree analysis for CMake build and new
    coding style and conventions.

  • FIXED: Fallback to find a place for packages to install executables.

  • FIXED: Hash consistency on pointer sided integers for 64-bit bigendian
    machines. Only affects consistency of term_hash/2 over platforms.

  • FIXED: Checking that an uncaught exception is caught in an outer
    environment
    , i.e., nested C<->Prolog callback.

  • FIXED: Make C-stack guarding work in threads.

  • ENHANCED: Use C-stack guarding for read/1 and friends.

  • FIXED: format/2,3: Term printing using ~[kpqw] did not propagate
    exception.

  • ENHANCED: Handle C-stack overflows gracefully on POSIX targets with
    sigaltstack().

Package cpp

  • CLEANUP: SWI-cpp.h: more consistent type handling and silence several
    more casts.

  • COMPATIBILITY: SWI-cpp.h to use static_cast<type>(expression)
    to avoid warnings on modern C++ compilers.

Package http

  • TEST: Simplified shutdown management for the http:proxy tests.

Package jpl

  • BUILD: Silence GCC-11 warning (ugly)

Package mqi

  • TEST: Handle all failures from test_server_options_and_shutdown as
    warnings unless “SWIPL_TEST_FAIL_ON_UNLIKELY=y” This test has lots
    of threading and potential race conditions so it can fail when the
    system is heavily loaded.

    Handle by catching all exceptions and only actually failing if
    SWIPL_TEST_FAIL_ON_UNLIKELY - y

  • DOC: Update URLs from EricZinda/swiplserver to packages-mqi

  • ADDED: All files needed to actually build the Python ‘swiplserver’
    model and post to pypi.org so that ‘pip install swiplserver’
    works Includes instructions on how to the build the model in
    /BuildingAndTesting.md

Package odbc

  • CMAKE: Requires minimally cmake 3.9

Package protobufs

  • FIXED: Issue #15 (long directory name) Shorten directory
    protoc_gen_prolog_pb to gen_pb for R build (R build outputs a warning
    if a the path is more than 100 bytes)

Package redis

  • TEST: Prevent occasional early termination in test(primes).

  • TEST: Make sure the Redis test group consumers are properly discarded.

Package semweb

  • BUILD: Trick GCC-11 we are not really freeing a non-heap address.

Package ssl

  • BUILD: Silence (incorrect) GCC-11 uninitialized warning.

Package xpce

  • PORT: remove Cygwin from targets requiring dllexport Cygwin ld uses
    auto-export by default. Mixing that with dllexport in some cases
    leaves other symbols unexported.

    Signed-off-by: Corinna Vinschen vinschen@redhat.com

  • BUILD: Avoid GCC-11 warning.

1 Like