Windows native build with ASan - Claude AI notes: ASan found a heap-use-after-free bug

Status update

Using x64 Native Tools Command Prompt for VS Terminal


   C:\dev-MSVC-PR\swipl-devel\build>swipl --version
      Expected result: 'swipl' is not recognized as an internal or external command, operable program or batch file.
      Note: If swipl is on the Windows PATH it could potentially cause problems as there will be two executables on the same machine. By removing swipl from the Windows Path, absolute paths are needed.
   set PATH=%PATH:C:\Program Files\swipl\bin;=%                           (If needed)
   python --version
      Expected result: Python 3.13.5
   set PATH=C:\Users\Groot\AppData\Local\Programs\Python\Python313;%PATH%  (If needed)
   cd C:\dev-MSVC-PR\swipl-devel
   del \\.\C:\dev-MSVC-PR\swipl-devel\build\src\Debug\nul                (If needed)
   rmdir /s /q build
   mkdir build 
   cd build
   cmake .. -G "Visual Studio 18 2026" -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake -DPython_EXECUTABLE="C:/Users/Groot/AppData/Local/Programs/Python/Python313/python.exe" -DBDB_LIBRARY=C:/dev/vcpkg/installed/x64-windows/lib/libdb48.lib 
   echo %ERRORLEVEL%
      Expected result: 0
   cmake --build . --config Debug --verbose
   echo %ERRORLEVEL%
      Expected result: 0
   ctest -C Debug --output-on-failure --timeout 300 --verbose 
   echo %ERRORLEVEL%
      Expected result: 0
   "C:\dev-MSVC-PR\swipl-devel\build\src\Debug\swipl.exe"
   ?- check_installation.

CTest results

29: .failed(150113)
29: Script c:/dev-msvc-pr/swipl-devel/tests/thread/test_shared_dynamic.pl failed
29: ..

99% tests passed, 1 tests failed out of 89

Total Test time (real) = 192.49 sec

The following tests FAILED:
	 29 - swipl:thread (Failed)
Errors while running CTest

Skipped tests

Line 4634: 66: No W3C test files present; skipping Turtle tests
Line 5388: 84: Cannot find JSON Schema test data; skipping tests

Blocked tests

dif:cyclic - C:\dev-MSVC-PR\swipl-devel\tests\attvar\test_dif.pl
bigint:bf_trig_alloc - C:\dev-MSVC-PR\swipl-devel\tests\core\test_arith.pl
phrase:iso_8_1_1_3 - C:\dev-MSVC-PR\swipl-devel\tests\core\test_dcg.pl
ieee754:ieee_div - C:\dev-MSVC-PR\swipl-devel\tests\rational\test_ieee754.pl
bomb_compiler:call - C:\dev-MSVC-PR\swipl-devel\tests\signals\test_bomb.pl

C:\dev-MSVC-PR\swipl-devel\build>"C:\dev-MSVC-PR\swipl-devel\build\src\Debug\swipl.exe"
Welcome to SWI-Prolog (threaded, 64 bits, version 10.1.2-20-ge220f2be8)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

    CMake built from "c:/dev-MSVC-PR/swipl-devel/build"

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

1 ?- check_installation.
% Checking your SWI-Prolog kit for common issues ...
%
% Version: ............. 10.1.2-20-ge220f2be8
% Address bits: ........ 64
% Architecture: ........ x64-win64
% Installed at: ........ c:/dev-msvc-pr/swipl-devel/build/home
% Cores: ............... 8
%
% Checking gmp ................................. ok
% Loading library(archive) ..................... ok
%   Supported filters: bzip2, compress, gzip, grzip, lrzip, lzip, lzma, lzop, none, rpm, uu, xz
%   Supported formats: 7zip, ar, cab, cpio, empty, gnutar, iso9660, lha, mtree, rar, raw, tar, xar, zip
% Loading library(cgi) ......................... ok
% Loading library(crypt) ....................... ok
% Loading library(bdb) ......................... ok
% Loading library(double_metaphone) ............ ok
% Loading library(editline) .................... ok
% Loading library(filesex) ..................... ok
% Loading library(http/http_stream) ............ ok
% Loading library(json) ........................ ok
% Loading library(http/jquery) ................. ok
%   jQuery from c:/dev-msvc-pr/swipl-devel/build/home/library/http/web/js/jquery-3.6.0.min.js
% Loading library(isub) ........................ ok
% Loading library(janus) ....................... ok
% Interactive session; added `.` to Python `sys.path`
%   Python version 3.13.5 (tags/v3.13.5:6cb20a2, Jun 11 2025, 16:15:46) [MSC v.1943 64 bit (AMD64)]
% Loading library(jpl) ...
% Extended DLL search path with
%   'C:\\Program Files\\Microsoft\\jdk-25.0.1.8-hotspot/bin/server'
................................................ ok
% Loading library(memfile) ..................... ok
% Loading library(odbc) ........................ ok
% Loading library(pce) ......................... ok
% Loading library(pcre) ........................ ok
% Loading library(pdt_console) ................. ok
% Loading library(porter_stem) ................. ok
% Loading library(process) ..................... ok
% Loading library(protobufs) ................... ok
% Loading library(readutil) .................... ok
% Loading library(semweb/rdf_db) ............... ok
% Loading library(semweb/rdf_ntriples) ......... ok
% Loading library(semweb/turtle) ............... ok
% Loading library(sgml) ........................ ok
% Loading library(sha) ......................... ok
% Loading library(snowball) .................... ok
% Loading library(socket) ...................... ok
% Loading library(ssl) ......................... ok
% Loading library(sweep_link) .................. ok
%   GNU-Emacs plugin loads
%     M c:/dev-MSVC-PR/swipl-devel/build/src/Debug/sweep-module.dll
% Loading library(crypto) ...................... ok
% Loading library(table) ....................... ok
% Loading library(time) ........................ ok
% Loading library(unicode) ..................... ok
% Loading library(uri) ......................... ok
% Loading library(uuid) ........................ ok
% Loading library(yaml) ........................ ok
% Loading library(zlib) ........................ ok
%
% Congratulations, your kit seems sound and complete!
true.

2 ?- 

Build is currently not using ASan.