# Ann: SWI-Prolog 8.1.4

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-4/458>\
**Category:** Releases\
**Created:** [March 27, 2019, 3:57pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-4/458 "2019-03-27T15:57:51Z")\
**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:** [March 27, 2019, 3:57pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-4/458/1 "2019-03-27T15:57:51Z")

</div>

Dear SWI-Prolog user,

I have uploaded SWI-Prolog 8.1.4. Most of the changes are relatively  
minor. A couple of bugs are flagged with SECURITY, but this shouldn’t be  
taken too seriously. Using the address sanitizer toolkit on the test  
suite I found a couple of places where code could be reading outside the  
allocated buffer. That might theoretically allow for accessing data one  
is not supposed to access (I doubt it really can) and might lead to  
crashes (also unlikely).

Most serious changes are in tabling, notably providing dynamically  
stratified negation and adding lots of tabling tests from XSB to our test suite.

There are several outstanding issues, notably wrt. packaging on MacOS and  
Windows.

```
Enjoy --- Jan

```

# SWI-Prolog Changelog since version 8.1.3

- ENHANCED: Avoid deep mutual recursion in trie node deallocation and  
fixed a memory leak in trie destruction.

- SECURITY: utf8\_strlen() on non-null terminated input may read beyond  
the buffer.

- FIXED: Using a thread\_local predicate inside a temporary module could  
crash the system.

- ENHANCED: Do not setup colors if `$TERM == dumb`. Also, when  
library(ansi\_term) is loaded, it will setup its default according to  
the same rules as the toplevel uses to load this library: I/O must  
be associated with a tty and $TERM may not be `dumb`. Peter Ludemann.

- DOC: Migrate documentation of library(readutil) from LaTeX to  
PlDoc. Deals with missing documentation for read\_line\_to\_string/2.

- FIXED: library(ansi\_term): loading should not set the `color_term`  
flag to `true` if it is already defined.

- FIXED: Make loaded C++ foreign libraries visible through  
current\_foreign\_library/2. Arthur Wang.

- FIXED: print\_term/2 to print zero-argument compounds. Peter Ludemann.

- FIXED: Drop the program from the Prolog flag `argv` for a saved state.  
Peter Ludemann.

- MODIFIED: Delay determining the associated files on the command line  
til after loading the user `~/.swiplrc` as well as the explicit  
script files. This allows for defining alternative extensions  
to be loaded as Prolog files from the commandline. See e.g.,  
`library/dialect/xsb/source.pl`

- XSB: Fixed module context for :- table/1 when loading .P modules.

- TEST: Actually make CTest fail on failing XSB tests.

- TEST: Added XSB negation tests

- DOC: tnot/1 and new table scheduling.

- ADDED: tnot/1: tabled negation.

- ADDED: C support for negative tabled nodes: marking is negative,  
resume negations after completion with failure.

- XSB: Added get\_returns\_for\_call/2.

- MAINTENANCE: Improve debugging support for tabling.

- ENHANCED: Colour :- table/1 declaration.

- PORT: PGO optimization using Clang to be flexible on the profile file  
name. Paulo Moura.

- ADDED: issue#447: tmp\_file\_stream/3 sets the `file_name` property of  
the created file. Peter Ludemann.

- FIXED: re-enable file consult messages when a file is consulted from  
the Windows menu.

- PORT: Support profile guided optimization for clang.

## Package clib

- ADDED: udp\_term\_string\_hook/3 may throw udp(invalid\_message) to make  
the UDP library ignore some message. This can be used together with  
encryption to create a safe UDP cluster.

- FIXED: timer thread should not be created as detached as it is joined.  
Matt Lilley.

- DOC: Typo and link for ptmalloc() details.

- FIXED: library(udp\_broadcast): keep the inbound thread running on  
exceptions during broadcast.

## Package ltx2htm

- SECURITY: Possibly reading beyond stack buffer. Note that the ltx2htm  
package is typically only used to build the documentation.

## Package paxos

- ADDED: paxos\_property/1 to query the status of the cluster.

- ADDED: paxos\_quorum\_ask/4 to ask questions to the forum outside the  
paxos protocol.

- ADDED: hook paxos:paxos\_ledger\_hook/5, allowing (some keys of) the  
ledger to be stored elsewhere.

- FIXED: Avoid deadlock assembling the dead node admin when starting  
with an explicit node id.

- FIXED: Avoid deadlock for last node disappearing.

## Package pldoc

- FIXED: PlDoc.sty macro definition.

- ENHANCED: PlDoc issue#11: restrict \tag to the \tags environment to  
avoid conflicts with LaTeX `amsmath` package.

## Package sgml

- FIXED: SGML/HTML/XML parser: possible memory leak and reading an  
out-of-scope automatic variable.

- MODIFIED: Change data handling from XSD 1.0 to XSD 1.1. In XSD 1.2,  
the value 0 is allowed for xsd:gYear. Note that all negative (before  
BC) are interpreted differently. Updated the tests accordingly.

## Package table

- FIXED: new\_order\_table/2: accept strings for character sets for  
compatibility with SWI7.
