Dear SWI-Prolog user,
SWI-Prolog 9.0.2 is ready for download. Why not 9.0.1? Because I
discovered an unacceptable issue while building 9.0.1 for MacOS and
as part of the file were already out, skipping a number is the only
option.
9.0.2 simply follows the 9.1.x series as there are no incompatible
changes and lots of cleanup and fixes. Highlights:
- Fixed a couple of crashes and race conditions.
- Allow compiliation under
gcc -std=c11 -pedantic
. Not used
by default as it produces slower binaries because we cannot
exploit some of GCCs extensions. - Support C backtraces on Linux arm platforms.
- Fixed crypto_password_hash/2,3 hash incompatibility with
8.4 series. - Updated sweep and cpp (SWI-cpp2.h).
MacOS annoucement
Since upgrade of the Mac build machine to Ventura (13.0.1) it seems
Xcode now longer builds proper binaries due to some issue related to
libGMP. The symptoms are non-reproducible random segmentation faults,
bus errors and memory management errors. This happens against the
“portable” libGMP version, build from source supporting MacOS 10.14
and later. It doesn’t seem to happen when linking to Macports libGMP.
As a work-around the binary bundle is now linked against LibBF, the
since recently available alternative to LibGMP. This causes some
slowdown on most operations big and rational numbers are involved in,
notably harming ration number arithmetic.
Enjoy --- Jan
SWI-Prolog Changelog since version 9.0.0
-
PORT: Build MacOS bundle using LibBF based big integers. Somehow the
build for the universal binaries covering a large series of MacOS
versions (since 10.14) breaks after uograde to MacOS Ventura when
linking against libGMP. The results are random segfaults, bus errors
and memory corruption. -
FIXED: Possibly crash in breakpoint callback after GC/shift.
-
TEST: Make thread signal test behave better under high loads.
-
PORT: Make C backtraces work on ARM systems that use libunwind or
glibc backtrace(). -
FIXED: Error handling if prolog_frame_attribute/3 using
parent_frame
runs out of stack. Careful review of this function after reported
crash on 32 bit arm. Might be due to a stack shift in this code,
but I doubt it and cannot reproduce the issue. Surely the current
code is safer. -
DOC: Document prolog_frame_attribute/2 with
parent_frame(-Next)
-
TEST: test may result in another error on 32-bit platforms.
-
ADDED: library(streams). Intended for various tricks in capturing
and redirecting streams. Currently only provides with_output_to/3
that extends with_output_to/2 to allow capturinguser_output
and
user_error
. -
FIXED: WASM shell: failure after clearing output.
-
UPDATE: Merge devel@b70e1737c01220e258830db17ade553164d5d9d1 -
Fixed SSL password hash compatibility - Fixed race condition for
creating functor objects - Fixed data corruption in clause/2 when
decompiling the head - Fixed updating break table when removing a
clause - Updated sweep - Made all sources stricty C11 compatible
(gcc -std=c11 -pedantic) -
FIXED: breakpoint removal when retracting a clause.
-
PORT: Provide MSVC alternatives for MinGW runtime support.
-
DEBUG: Dump Prolog stack on assertion error.
-
PORT: Drop old MSVC
#ifdef
code in favour of<inttypes.h>
on all platforms. -
PORT: Strict C11 support for VM instruction argument declaration.
-
PORT: Avoid GCC empty struct and named variadic arguments for cpp to
make pl-wam.c compile under strict C11 standard. This does not solve
full portability. pl-codetable.c suffers from related problems. -
PORT: Fixed compilation for Windows after providing the
libswipl
patches -
FIXED: Race condition between destroying indexes of thread-local
predicates on thread exit and the clause garbage collector. -
FIXED: Race condition for creating a functor. We must add the
functor to the global functor array before we can declare it valid. -
FIXED: thread_wait/2: race condition in updating threads waiting for
a module. -
FIXED: clause/2: possible error handling H_LIST_FF if there is a GC
between handling the head and tail. -
BUILD: Simplify configuration detection in the build environment
by exploiting thelibswipl
flag if it is read-only (and thus
reliable). -
ADDED:
swipl --dump-runtime-variables
to provide the name of the
shared object inPLLIBSWIPL
. -
ENHANCED: Set the Prolog flag
libswipl
based on dladdr() when
possible. -
PORT: The C11 standard does not allow for empty structs.
-
SNAP: CMAKE_INSTALL_LIBDIR seems undefined inside snapcraft, causing
the build to fail. -
SNAP: Latest snapcraft sets LD_LIBRARY_PATH to provide access to the
“parts”. We should not consider this a broken environment. -
DOC: Fixed LaTeX issues blocking the generation of the PDF manual.
Package cpp
-
FIXED: PlQuery() should resolve the predicate in the target module
if one is provided as well as set the context. This bug breaks
completion in swipl-win. -
TEST: Avoid encoding issues when running the tests.
-
TEST: Fixed PL_scan_options() test for 32-bit platforms.
-
TEST: Avoid test_common.pl. Although avoiding duplication is good,
it is not a good idea that when build with -DINSTALL_TESTS, this file
ends up in the public library. -
DOC: Fixed LaTeX errors and duplicate labels.
-
DOC: Add “philosophy” section on classes Remove some obsolete sections
Some cleanup of markup -
ADDED: PlPredicate, PlModule classes, support Pltermv(0) Also removed
some unused parameter defaults and clean up initialization checks. -
DOC: fix description of how exceptions work
-
TEST: Disabled invalid tests on Windows.
-
DOC: more details about exception handling
Package plunit
- MODIFIED: extend message term plunit(end(Unit)) to plunit(end(Unit,
Summary)) where summary provides the status and time spend on the unit.
Package ssl
- FIXED: crypto_password_hash/2,3 assumed byte encoding for
base64_encoded/3 while the default changed to UTF-8. Added test.
Package sweep
-
ADDED: ability to pass command line args directly to swipl
- sweeprolog.el (sweeprolog-handle-command-line-args): new
function, sets up command line argument handling using…
(sweeprolog-command-line-function): new function.
- sweeprolog.el (sweeprolog-handle-command-line-args): new
-
ADDED: minor mode for moving to the next hole with TAB * sweeprolog.el
(sweeprolog-forward-hole-on-tab-mode): new minor mode, binding
TAB to… (sweeprolog-indent-or-forward-hole): new command. *
README.org (“Filling Holes”): rephrase and mention new minor mode. -
ENHANCED: indentation after infix operators * sweeprolog.el
(sweeprolog-indent-line-after-infix): adhere to last line indentation
even if non-standard, handle DCG RHS contexts and SSU guards. *
sweeprolog-tests.el: add more tests for indentation. -
ENHANCED: use argument names for holes in predicate
completion * sweep.pl (predicate_argument_names/2):
new predicate. (sweep_format_predicate/2): use it, and
revise into… (sweep_format_predicate/4): new predicate.
(sweep_predicate_completion_candidates): use it. -
ADDED: make flymake optionally complain about implicit autoloads *
sweeprolog.el (sweeprolog-note-implicit-autoloads): new user-option.
(sweeprolog-analyze-fragment-flymake): use it. * README.org (“Managing
Dependencies”): mention it. -
ADDED: new command for updating use_module/autoload directives
- sweep.pl (sweep_file_path_in_library/2): new predicate.
(sweep_color_normalized/3): normalize autoload source paths. *
sweeprolog.el (sweeprolog-analyze-buffer-with): new helper function.
(sweeprolog-update-dependencies): new command.
- sweep.pl (sweep_file_path_in_library/2): new predicate.
Package xpce
- PORT: Make the xpce source compile clean using GCC -pedantic flag.
Note that an important part of the problems is that XPCE threads data
and function pointers the same. This used to work with a cast to
void*
. This is not allowed in C11. It is allowed to cast both
pointers and functions tointptr_t
, so with a little detour we
get where we need to be. Time will tell whether we will see systems
where this conversion is not allowed.