DataReel 6 Release Notes (all 6.x releases)
Every DataReel 6.x release, newest first. Each release also has its own page and text file.
DataReel 6.4.3 Release Notes, 11/30/2026
DataReel 6.4.2 Release Notes, 11/20/2026
DataReel 6.4.1 Release Notes, 11/17/2026
DataReel 6.4 Release Notes, 11/17/2026
DataReel 6.3.1 Release Notes, 11/14/2026
DataReel 6.3 Release Notes, 10/31/2026
DataReel 6.2 Release Notes, 10/25/2026
DataReel 6.1 Release Notes, 10/25/2026
DataReel 6.0 Release Notes, 10/24/2026
DataReel 6.4.3 Release Notes, 11/30/2026
DataReel version 6.4.3 (was 6.4.2)
DataReel 6.4.3 is a bug-fix release of the 6.4 legacy line: the library builds with C++20, and a C++ transition guide shows every example program side by side with a modern C++11, C++17 or C++20 equivalent. The API, the database file format and the gxStream wire format are those of 6.4.2, and everything in RELEASE_NOTES_6.4.2.txt is included. Version 6 is the legacy line: it gets bug fixes and security updates, but no new features. The shared library (Linux makefiles) is built as libdatareel.so.6.4.3.
Changes
- C++20 build: C++20 (P0487R1) removed operator>>(std::istream &, char *), which the UString and UStringw stream input operators used, so the library did not compile with -std=c++20 (src/ustring.cpp). They now read into a 255 byte array. setw() still limits a read to 254 characters, and the behavior is the same with C++17 and C++20. The CMake build still defaults to C++17; set CMAKE_CXX_STANDARD=20 to build the library with C++20.
- C++ transition guide: docs/cpp_transition/index.html maps the 6.x classes and calls (threads, mutexes, conditions, strings, lists, trees, buffers, files, directories, configuration, logs, time) to the C++11, C++17 and C++20 standard library, says which parts stay DataReel (the object database, sockets, TLS, the protocol clients), and lists the differences that need care when porting. One page per example shows the legacy and modern sources side by side (docs/bin/make_transition_html.py makes the pages).
- examples_modern: 82 modern programs cover all 93 source files of examples_threads, examples_general, examples_database and examples_socket. Client and server pairs run both ends in one process on 127.0.0.1, the protocol clients talk to a scripted local server, and every program runs as a self test. examples_modern/ CMakeLists.txt builds them against this library (and the 7.x features with DATAREEL7_FEATURES_DIR); run_modern_tests.sh builds each with every standard from its minimum to C++20 and runs them.
- README.txt, docs/index.html and docs/examples/programs.htm link to the guide. AGENTS.md names DataReel 7.5 as the main release.
Upgrading
No file format or API change. Programs that use UString stream input behave the same. Recompile and relink programs against the 6.4.3 library as with every 6.x release.
DataReel 6.4.2 Release Notes, 11/20/2026
DataReel version 6.4.2 (was 6.4.1)
DataReel 6.4.2 is a maintenance release of the 6.4 legacy line: license headers, documentation and AI-assisted development files. No library code changed: the API, the database file format and the gxStream wire format are those of 6.4.1, and everything in RELEASE_NOTES_6.4.1.txt is included. Version 6 is the legacy line: it gets bug fixes and security updates, but no new features. The shared library (Linux makefiles) is built as libdatareel.so.6.4.2.
Changes
- License: every source header says LGPL version 3 or later, matching LICENSE (some still named an older version).
- AI-assisted development: AGENTS.md, CLAUDE.md and GEMINI.md for the legacy release, with the AI usage policy (written management approval, approved enterprise AI models only) and the human-in-the-loop rules.
- Documentation: docs/security_white_paper.md (.html), the security design of the library; docs/gxstream_replication_white_paper.md (.html), gxStream, gxDatagram and replication on port 2073 (gxs-data-port, registered with IANA); docs/rfc/ draft-gaer-datareel-gxstream-00, the protocol's specification (an Internet-Draft for the Independent Submission stream that covers DataReel 7.4 and the 6.x legacy transports).
- Documentation: the example pages escape the license URL, so browsers show it.
- Comments and documentation no longer include personal names or email addresses (gxsIMAPClient).
DataReel 6.4.1 Release Notes, 11/17/2026
DataReel version 6.4.1 (was 6.4)
DataReel 6.4.1 is a bug-fix release of DataReel 6.4: socket and thread fixes only. The API, the database file format and the gxStream wire format are the same as 6.4, and everything in RELEASE_NOTES_6.4.txt is included. Version 6 is the legacy line: it gets bug fixes and security updates, but no new features. The shared library (Linux makefiles) is built as libdatareel.so.6.4.1.
Fixes
- gxSocket: close-on-exec sockets: gxSocket::Socket() and both gxSocket::Accept() calls set FD_CLOEXEC (POSIX). A program that forks and runs other programs used to pass them its sockets; a child that kept a server's listening socket held the port open, so a restarted server could not bind it. (DRCM 1.46 carried this change in its own copy of gxsocket.cpp.) Test: examples_socket/socket_security, the "cloexec" check.
- Threads: state set before the thread starts: apiCreateThread() (POSIX) sets the thread state to RUNNING before pthread_create(). The new thread used to set it itself, so a caller could see NEW right after CreateThread() and take the thread for one that never ran, and a cancel made before the thread ran had CANCELED overwritten with RUNNING.
- Threads: monotonic timed waits: On Linux, condition variables use CLOCK_MONOTONIC and gxThreadConditionTimedWait() computes its deadline on it. A change to the system time (an NTP step, date -s) used to make timed waits end early or last hours longer.
- Threads: sleep functions: api_nSleep(), api_uSleep() and api_mSleep() locked a mutex, never unlocked it and destroyed it locked on every call, and uSleep() overflowed on 32-bit systems. They now use nanosleep() (POSIX) or Sleep() (Windows). Test: examples_threads/thread_security (state, cancel, sleep, timedwait).
DataReel 6.4 Release Notes, 11/17/2026
DataReel version 6.4 (was 6.3.1)
DataReel 6.4 is the DataReel 6.3.1 library, with the single-node crash safety and damaged-file fixes of DataReel 7.0-7.4 ported to the 6.x classes (beta 2 and beta 3, below), and an optional build of the DataReel 7.x vector database and object replication features for 6.x programs. The 6.x API is the same, and database files keep the 6.2 and 6.3.1 format: 6.2 and 6.3.1 read every file 6.4 writes. (A file whose freed blocks are reused with best fit can hold different bytes than 6.3.1 would write; see BETA 3.) The gxStream wire header changed in 6.4: 6.4 network peers do not talk to 6.3 or older peers built on Windows or for 32 bits (see BETA 3). DataReel 6.4 has no copy of the 7.x vector or replication code. A 6.x build uses the 7.x code, from a DataReel 7.4 or later source tree, only when it is asked to:
cmake -S datareel-6.4 -B build -DDATAREEL7_FEATURES_DIR=/path/to/datareel-7.4
A program that does not use the 7.x features builds with the makefiles or with CMake as with 6.3.1. Everything in RELEASE_NOTES_6.3.1.txt and RELEASE_NOTES_6.3.txt is included. The shared library (Linux makefiles) is built as libdatareel.so.6.4.
BETA 2 (11/16/2026): FIXES FROM DataReel 7.x
- Power loss: gxdFPTRCreate() and gxdFPTRCreatePrivate() sync the folder after they create a file (POSIX), so a new database or journal file, and the commits made to it, survive a power cut (DataReel 7.4).
- Damaged files (DataReel 7.0):
- BtreeBucket::ReadNode() rejects a key count larger than the node order (a heap overflow in the cached B-tree; the uncached B-tree was fixed in 6.1).
- The cached B-tree walks stop after gxBtreeMaxNodeReads nodes, as the uncached ones do.
- InfoHog::Read() and gxPersistent::ReadString() check lengths read from the file unsigned against the end of the file.
- gxDatabase copies file names with a bound (strcpy() overflowed on long path names).
- The B-tree cache works with index files opened read only (clean buckets are reused); before, a cached find or walk on a read-only index found nothing.
- Block navigation (DataReel 7.0 and 7.3.1): FindNextBlock(), FindNextObject(), FindPrevBlock() and FindPrevObject() take an object or a block address and return 0 at the ends of the file. Before, FindNextBlock() skipped a block when given an object address and returned the last block again at the end, so a FindFirstObject()/ FindNextObject() walk missed records and never ended. FindPrevBlock() no longer skips deleted blocks (FindPrevObject() does). A damaged block length is compared unsigned, with no signed overflow. FindFirstBlock() is unchanged, and FindFirstObject() returns the same object as before in an undamaged file. Programs that walk with FindFirstBlock() and the block length (as EPDB does) are not affected.
- Warnings: the gxstream.cpp TLS helpers are built only with __USE_GX_SSL_EXTENSIONS__; gxSocket::InitSIN() unused parameter.
- Files from another platform's layout (new error code): with native integer types (__USE_NATIVE_INT_TYPES__, the default) gxUINT32 and gxINT32 are 8 bytes on 64-bit Linux and 4 bytes on Windows and in 32-bit builds, so the database file headers differ. Such a file used to open and read as empty, or as damaged. gxDatabase::Open() (and so gxBtree, InfoHog and the other classes on it) now refuses it with gxDBASE_FILE_LAYOUT_ERROR. A file from the other database engine (32-bit or 64-bit file addresses) gets gxDBASE_FILE_ENGINE_ERROR: a 32-bit engine build used to open a 64-bit engine file, because the signature "GXDBASE" is the start of "GXDBASE64". The new codes are added at the end of gxDatabaseError, so the other codes keep their numbers. A file with no objects, or with a damaged first block, is opened as before. Builds with the portable types (fcrypt, EPDB) write the same files everywhere and are not affected.
BETA 2 (11/16/2026): TLS SETTINGS FROM DataReel 7.x
- TLS 1.2 is the minimum. With OpenSSL 1.1 and later, gxSSL_SSLv23 and gxSSL_TLS negotiate TLS 1.2 or TLS 1.3 and gxSSL_TLSv1_2 is TLS 1.2 only. SSLv2, SSLv3, TLS 1.0, TLS 1.1 and DTLS 1.0 (gxSSL_SSLv2, gxSSL_SSLv3, gxSSL_TLSv1, gxSSL_TLSv1_1, gxSSL_DTLSv1) make InitCTX() fail with gxSSL_PROTOCOL_ERROR. The Windows Schannel build has the same minimum.
- New gxSSL_TLSv1_3: TLS 1.3 only (Windows 10 1809 and later with Schannel).
- With RequireVerifyCert() set before InitCTX(), a client handshake fails when the server's certificate chain or host name (SetHostName(), checked against the subject alternative names and IP entries) does not verify, and the system certificate store is trusted when no CA list is set. Before, the check was left to VerifyCert() after the handshake.
- The server name (SNI) is not sent when SetHostName() is an IP address.
- The handshake timeout (SetHandshakeTimeout(), 60 seconds by default) keeps a shorter send or receive timeout that the program set on the socket. Before, the handshake ran with the 60 second limit and a program's shorter limit (the ssl-bridge's) did not apply.
- OpenSSL 3: SSL_get1_peer_certificate(); OPENSSL_init_ssl() loads the system configuration (on RHEL, the crypto policy).
BETA 2 (11/16/2026): IMAP CLIENT (gxsimap.h, gxsimap.cpp)
- New gxsIMAPClient class, the IMAP counterpart of gxsPOP3Client, based on work from the 2007 IMAP client (RFC 3501, RFC 2595):
- ConnectClient() with TLS from the start (port 993) or plain text (port 143) and StartTLS();
- Login(), Logout(), SelectMailbox() (SELECT or EXAMINE), ListMailboxes(), Search(), Noop(), Capability();
- FetchHeader(), FetchBody(), FetchMessage(), FetchDates(); the fetches do not set \Seen;
- StoreFlags(), MarkSeen(), MarkDeleted(), Expunge();
- SendCommand() for any other command.
- A reply ends only at the line that starts with the command's tag, and only an OK status is success; NO and BAD replies are errors with the server's text. Literals are read by count. Arguments are quoted, or sent as literals when they have 8-bit characters.
- Login() refuses to send a password without TLS unless AllowPlainLogin() is set. Data sent before a STARTTLS handshake is refused. Replies are limited to SetMaxReply() bytes (64 MB). The session log (RecordSession()) leaves out passwords.
- New gxSSL::RecvSomeSSLSocket(): the bytes available, waiting up to a timeout for the first one (OpenSSL and Schannel).
- The DataReel 7.4 gxsIMAPClient interface, with the 2007 work client's calls, is in 6.4 too, so a program builds against either version: Connect() (gxsMAIL_IMPLICIT_TLS or gxsMAIL_STARTTLS), ConnectPlain(), Login(), Logout(), Capability()/HasCapability() (LOGIN is refused on LOGINDISABLED), SelectMailbox(), Examine(), ListMailboxes(), Search(), FetchHeader() (also the 2007 form with the dates), FetchBody(), FetchMessage(), FetchInternalDate(), Delete(), Expunge(), Command() with Untagged() and LastReply(), the 2007 SendCommand(cmd, tag), RecvBuffer() and ParseResponse(), FetchItem(), Quote(), Error() and the settings SetTimeout(), SetCAFile(), SetVerifyPeer(), SetMaxSize() and SetRecordProto()/ProtoString(). These use std::string and std::vector and return 0 or -1, as in 7.4.
- examples_socket/imap_client: one IMAP command from the command line, written with the 7.4 calls. proto_security: 47 IMAP checks with a fake server.
Beta 3 (11/17/2026): fixes and the wire header from DataReel 7.4
- Best-fit block reuse (gxDatabase::ReclaimBestFit(), gxDBASE_RECLAIM_BESTFIT): only exact fits were reused, so every other allocation grew the file. Now a free block whose unused bytes are within the reuse limit (2.5 times the bytes requested) is a candidate, and the one leaving the fewest unused bytes is taken; the rest of the split stays free. The deleted-block count follows the chosen block. First fit (the default) is unchanged, and so is the file format. Because blocks are now reused, a file built with best fit (for example the defrag example's) can differ byte for byte from 6.3.1's; 6.2 and 6.3.1 read it. Test: examples_database/reclaim.
- Journal salts (gxdJournal): processes forked from one parent that wrote a journal header in the same second got the same salt, and a recovery could replay the previous session's records. The salt now mixes the OS random source (/dev/urandom; on Windows the performance counter, the process id and the tick count), a fine clock, the process id, a counter and the object's address. The journal format is unchanged. Test: examples_database/journal_salt.
- The gxStream block header on the wire (gxStream, gxDatagram, gxSerialCommServer): DataReel 7.4's canonical 32-byte form, the bytes 64-bit Linux always sent, on every platform. A sender with 4-byte words (a Windows or 32-bit build before this change) is refused (gxStream::PeerOldHeader()). COMPATIBILITY: a 6.4 gxStream, gxDatagram or gxSerialCommServer peer does not talk to a 6.3 or older peer built on Windows or for 32 bits. Upgrade both ends together. 6.4 talks to DataReel 7.4 and later.
- Object replication for 6.x programs (gxv7ObjRepl, the 7.x features build): see OBJECT REPLICATION below.
THE 7.x FEATURES BUILD (CMake only)
- DATAREEL7_FEATURES_DIR (a path, empty = off): the 7.x source tree. The build refuses a tree older than 7.4. It builds, next to the 6.x library: Link a program with the CMake target DataReel::dr7features. It needs a C++17 compiler, the same one for both libraries.
- the 7.x library, from that tree as it is. Its names are in the datareel namespace, so it links next to the 6.x library in one program;
- dr7inner (dr7features/inner): a plain C interface to the 7.x classes, compiled against the 7.x headers only;
- dr7features (dr7features/include/dr7features.h): DataReel 6.x classes that use it, with 6.x types (gxString, MemoryBuffer).
- DATAREEL7_TOOLS (default ON with DATAREEL7_FEATURES_DIR): also build the 7.x programs from the 7.x tree into <build>/dr7inner/tools: objrepl, objrepl_sim and test_gxobjrepl_api (object replication), vix_rebuild, and on POSIX object_server, object_client and the 6.4 vector_server (the object server with a vector set).
- 11/17/2026: the 7.x tree must be DataReel 7.4 or later (gxObjRepl, the canonical gxStream block header, no gxrepl). The build checks for these features, not a version or commit, and stops with a message for an older tree.
- The 7.x library is built with the same database engine as the 6.x library (DATAREEL_64BIT_DATABASE).
- Do not include DataReel 7.x headers in a 6.x source file. The two versions have header files of the same names and include guards. dr7features.h includes only 6.x headers.
VECTOR DATABASE: gxv7VectorIndex, gxv7VectorSet
The 7.x vector index (.vix files) and vector set (.vixset manifests), for 6.x programs:
- vectors of up to 4096 float32, float16 or int8 elements, L2, cosine or inner product, four tags per vector, an id per vector (for example a 6.x record's block address);
- Search() (HNSW, approximate) and Exact(), tag filters, Get(), Update(), Delete(), Repair(), Verify(), read-only open and a spec text that Open() can require;
- vector sets: many .vix files (for example one per day) searched as one, with a day range on tag 2.
The files are the 7.x files: a 7.x program opens what a 6.x program writes, and the other way round. Do not open one .vix file for writing in a 6.x program and a 7.x program at the same time. As with every DataReel database file (6.x and 7.x), a file made by a Linux build and one made by a Windows build are laid out differently: the file and block headers hold C "unsigned long" values (8 bytes on 64-bit Linux, 4 bytes on Windows). Use the files on the system that made them; to move vectors between Linux and Windows, rebuild the index there (for example with the 7.x vix_rebuild). Example: examples_database/vector_index.
VECTOR SEARCHES ON A 7.x OBJECT SERVER: gxv7ObjectClient
A 6.x program sends op 7 VECTOR_SEARCH and op 8 VECTOR_INFO to a DataReel 7.x database object server (for example the 6.4 vector_server tool, which serves a database with "vectors"). The connection uses mutual TLS: the client's certificate, the CA, and the server name checked. The client uses the 7.x client classes, so the messages are the 7.x ones. POSIX only, as the DataReel 7.4 object client (its multiplex session is built on POSIX systems only): on Windows Connect() returns -1. Example: examples_socket/vector_client.
OBJECT REPLICATION: gxv7ObjRepl (11/17/2026)
The 7.x gxObjRepl for 6.x programs: object replication between two independent object databases (node folders). Only objects travel (gxStream blocks over TLS with certificates on both sides), never file pages; each node keeps its own file addresses, free space and indexes.
- A primary commits objects (bytes under a 64-bit id both nodes share) with Begin(), Put(), Remove(), Purge(), Commit(); each commit is durable with its outbox entry, and Pump() or Drain() sends it.
- A copy serves with Serve() until Stop() and refuses application writes. Takeover(), Rejoin(), Status(), Check(), Digest() and ClearAlarm() work on a node folder.
- The configuration is the objrepl.conf keys (SetConfig(), LoadConfig()), as for the 7.4 objrepl tool.
- A 6.x program and a DataReel 7.4 program (or the 7.4 objrepl tool) replicate to each other, on Linux and Windows: 7.4 sends gxStream's block header in one canonical 32-byte form, and so does 6.4 (gxstream-wire-6x).
- The node files are the 7.x files of the build's database engine; a 32-bit engine node and a 64-bit engine node never share a folder.
- The 7.x gxrepl (page-shipping replication) is gone: DataReel 7.4 removed it. The replication_6x example is rewritten on gxv7ObjRepl: repl6_writer is a primary, repl6_check a copy, and either replicates with the 7.4 objrepl tool.
Example and how-to: examples_database/replication_6x (README.txt). See also the DataReel 7.4 gxObjRepl reference and administrator's guide.
Tested platforms
DataReel 6.4, 11/17/2026. The 7.x features build used DataReel 7.4.
On RHEL 10.2 (GCC), 32-bit and 64-bit database engines:
- examples_database/run_db_tests.sh: 39 of 39 on both engines (the examples, the damaged-file and security sweeps, the networking and TLS checks, reclaim, journal_salt, the journal tests and 50 kill -9 crash rounds). Also under AddressSanitizer and UBSan: 39 of 39, no reports.
- The 6.2 file compare: of 21 files, only defrag.gxd differs (best-fit reuse, see BETA 3); 6.2 reads it.
- The CMake build with the 7.x features off builds as before.
- The 7.x features build:
- vector_index: all checks; the DataReel 7.4 phase C .vix files give the 7.4 results (fau64 and fau32).
- vector_client: 7 of 7 (against vector_server).
- replication_6x (gxv7ObjRepl): 23 of 23 on both engines: a 6.4 primary to a 7.4 copy and a 7.4 primary to a 6.4 copy with equal digests, 6.4 to 6.4 with every record's CRC and index checked, a copy that starts late, a refused certificate and a 7.4 takeover.
- The DataReel 7.4 wire tests against 6.4 (run_repl6_xver.sh): the same 32-byte header from both, 6.4 and 7.4 as server and client, 6.4 speaking the gxObjRepl handshake both ways: 5 of 5.
- The DataReel 7.4 objrepl test scripts on the tools of a 6.4 build: all pass (the API test 73 of 73; the lag test at 2,000 commits).
- Programs built on 6.4: fcrypt (key management 44, security 77, compatibility 43, migration 50), the encrypted password database (162 CLI checks, journal 25 of 25), the DataReel cluster manager (standby test 89 of 89), the load balancers (21, 18 and 15 checks) and the work programs.
On Windows 11 with Visual Studio 2026, x64 (64-bit engine) and Win32 (32-bit engine):
- run_db_tests.bat: 29 of 29; the networking checks 160 of 160; reclaim 9 of 9; layout detection refuses the other platform's and the other engine's files.
- The 7.x features build: no errors or warnings; replication_6x 23 of 23; the 7.4 objrepl API test 73 of 73; vector_index; vix_rebuild.
- gxv7ObjectClient is POSIX only, as in DataReel 7.4. The phase C files are Linux files (see VECTOR DATABASE above).
Linux and Windows (x64): a Linux 6.4 primary to a Windows 6.4 copy, a Windows 6.4 primary to a Linux 7.4 copy and a Linux 7.4 primary to a Windows 6.4 copy, each with equal digests.
DataReel Copyright (c) 2001-2026 DataReel Software Development
DataReel 6.3.1 Release Notes, 11/14/2026
DataReel version 6.3.1 (was 6.3)
DataReel 6.3.1 finishes the 6.x security sweep. 6.3 had the database fixes and the support code; 6.3.1 adds the networking part of the DataReel 7.3.1 sweep (sockets, TLS, the gxStream object database protocol with client certificates required by default, HTTP, URL, SMTP, POP3, FTP) and the rest of the 6.x-only modules DataReel 7 removed (gxDatagram, gxRDBMS, the HTML, XML and RSS parsers, gxIP32, gxMAC48, CDate, the print drivers, SysTime, Terminal, the thread messages). Everything in RELEASE_NOTES_6.3.txt is included.
The database and index file formats are unchanged: 6.3.1 writes the same bytes as 6.2 and 6.3 for the same operations. The library version in version.txt is 6.3.1 and SHAREDLIB_VERSION is 6.3.1 (libdatareel.so.6.3.1). The public interface only gains functions, but gxSocket, gxSSL, gxStream, gxDatagram and the protocol client classes have new members, so recompile and relink. Fixes are marked in the source with "10/31/2026", "11/01/2026" or "11/14/2026" comments.
BEHAVIOUR CHANGE: gxStream SERVERS NEED CLIENT CERTIFICATES
This is the one change that can stop an existing program from working. The networked object database protocol (gxStream) had no authentication: any program that could reach the port could add, read and delete blocks, and stop the server. As in DataReel 7.3.1:
- gxStream::StreamServer(), Accept() and AcceptClient() now return gxSOCKET_SSL_ERROR unless the server has a server certificate (SetServerCert()), a client CA file (SetClientCAFile()) and at least one allow list entry (AllowClientFingerprint() with a SHA-256 fingerprint, or AllowClientCN()). Clients send a certificate with SetClientCert().
- The explicit opt-out is AllowAnonymousClients(true): plain TCP as in 6.2, or TLS without client certificates when a server certificate is set. Call it to keep an existing 6.x gxStream server running unchanged; only do that on a trusted network.
- Clients are unchanged unless they call UseTLS(); a TLS client checks the server certificate and host name (SetServerCAFile(), SetServerName(), SetVerifyServer()).
- Fail closed: a failed handshake or certificate check closes the socket, and in TLS mode the block functions refuse a socket without a TLS connection, so nothing is sent in cleartext.
- The socket_cache example server takes the 7.3.1 option names: --cert/--key, --client-ca, --allow-fingerprint, --allow-cn and --open (the opt-out), and obeys a client's shutdown request only with --allow-remote-shutdown. Its client takes --ca, --insecure, --cert/--key.
Existing 6.x gxStream servers must add the certificate settings, or call AllowAnonymousClients(true), when they are rebuilt with 6.3.1.
Networking (from the DataReel 7.3.1 sweep and the 6.x sweep)
- gxSocket: Close() kept the closed descriptor numbers (a second Close() closed another file); select() on descriptors at or above FD_SETSIZE wrote past the fd_set (UNIX now uses poll()); Send() and SendTo() looped on 0-byte sends; SIGPIPE killed the program on a closed peer (MSG_NOSIGNAL); new SetIOTimeout(). Host address reads of 8 bytes from a 4-byte address, InitSIN() in the thread safe build, SetRemoteIPAddress() of an unknown host, name buffers.
- gxSSL: handshake timeout (SetHandshakeTimeout(), 60 s), close_notify sent once (a silent peer hung CloseSSLSocket() and the destructor), buffered TLS bytes seen by timed reads, SIGPIPE, VerifyCert() checks the alternative names and IP addresses (X509_check_host()), MakeCertReq() file leaks and day overflow.
- gxStream: block lengths from the peer are checked against SetMaxBlockSize() (64 MB) before RequestBlock() allocates and before ReadBlock() reads; new sized ReadBlock()/ReadRemoteBlock(); negative and over-INT_MAX writes refused; new WriteResultBlock64()/ ReadResultBlock64().
- gxDatagram (UDP): the same block length checks, sized reads and write checks as gxStream (SetMaxBlockSize(), gxDATAGRAM_DEF_MAX_BLOCK). UDP has no peer authentication.
- Schannel (Windows): receive buffers capped at 256 KB; mutual TLS ported from 7.3.1; built and tested on Windows 11 (see TESTED PLATFORMS).
- gxsHTTPClient: no fixed stack buffers in the header parser, fields matched at the start of a line, strict status line and Content-Length, control characters refused, header (256 KB) and body (1 GB, SetMaxBodySize()) limits, the body offset of a header that spans packets, no CR LF from a URL into the request.
- gxsURL: table bounds, ports 1-65535, control characters refused, safe % decoding, new HasControlChars() and DecodeStrict().
- gxsSMTPClient: command buffer overflow, CR LF in commands refused, addresses normalized to <user@host> (parameter injection), multi-line replies, dot-stuffing and CR LF line ends in the body (SMTP smuggling), header injection in To/From/Subject.
- gxsPOP3Client: "+OK" must start the status line (a "-ERR ... +OK" reply was a login), command overflow, buffer bounds.
- gxsFTPClient: PASV parser, the data connection goes to the control connection's address (not the address the server names), command and buffer overflows, multi-line replies.
- ParseServiceFileEntry() stack overflow, InChecksum16() overflow; socket example overflows and endless loops.
- Examples: the socket_cache server did not compile (a void function returned a value in the new serial block check); the ssl_server example stopped on Schannel builds, which need no DH file and cannot make keys (it now asks for a key and certificate made with openssl); the security_sweep test did not build for x86 (ambiguous MemoryBuffer index).
- Checked and not applicable to 6.x: the 7.3.1 redirect fix (the 6.x HTTP client reports Location but never follows a redirect, and has no custom header API), the FTPS data channel check (6.x FTP has no TLS: it is plaintext), the https_server path mapping (the 6.x http_server example serves a fixed page).
6.x-only modules
- gxIP32, gxMAC48, CDate and gxsHTML parsers stay in their buffers.
- gxRDBMS: damaged disk records, block lengths and negative array lengths (the format is unchanged).
- PostScriptDrv: the constructor never set the page size (columns and lines per page came from uninitialised values, and ConvertTextFile() could loop for ever); it is Letter by default now. A cut or wrapped line lost its terminator, so the printer output read past the buffer; the nroff filter read past the end of a line. HyperText: color values out of range, a buffer leaked by GetSystemTime(0). (Both drivers are built when __USE_POSTSCRIPT_PRINTING__ / __USE_HTM_PRINTING__ are defined, the default in env/linux.env and the CMake build.)
- SysTimeUnit::c_str_*() wrote one byte past its buffer; SysTime crashed on times localtime()/gmtime() cannot convert and, in the thread safe build, leaked a struct tm on every format call.
- Terminal: GetString()/GetPassword() have no length limit (new GetStringN()/GetPasswordN(); GetInt()/GetLong()/GetFloat() use them) and stop at end of input; Write(double) could overflow its buffer.
- gxThread_t: operator!= was inverted on POSIX; message lookups one past their tables. Database error messages for negative codes.
- Reviewed, no change: the thread pool, gxThread, the thread API wrapper, the database file cache, the binary search tree iterator, ASPrint, gxsXML and gxsRSS (fuzzed).
Tested platforms
Linux: RHEL 10.2 (gcc 14, OpenSSL 3.x), 32-bit and 64-bit database engines. The library builds with no warnings; all 73 example and utility directories build; examples_database/run_db_tests.sh passes 33 of 33 on each engine; the eight database examples write files byte-identical to 6.2, and files created by 6.2 and reopened by 6.3.1 stay identical; 16 libFuzzer targets ran 5 minutes each with no errors; gcc -fanalyzer is clean on the changed files.
Windows: Windows 11, Visual Studio 2026 (MSVC 19.52), 11/14/2026.
- winslib (nmake, FINAL=1) builds with native Schannel (USESSL=0, the default) and with OpenSSL 3.5.9 (USESSL=1), for x64 with the 64-bit and the 32-bit database engine and for x86.
- examples_database\run_db_tests.bat passes 27 of 27 on x64 (both engines) and on x86 (Schannel builds).
- CMake builds with DATAREEL_SSL=SCHANNEL (x64 and Win32) and DATAREEL_SSL=OPENSSL (x64) build the library and 29 socket example programs with no errors or warnings.
- gxStream mutual TLS (the socket_cache example, 9 cases: allowed client by fingerprint and by CN; no client certificate, plain client, a certificate not in the allow list and a self-signed certificate with an allowed CN refused; a server without client authentication refuses to start; --open plain and --open TLS work) passes 9 of 9 with Schannel x64, Schannel Win32 and OpenSSL x64.
- echo, simple, multi-threaded, HTTP and HTTPS (ssl_server and https_client), host info, and the SMTP, POP3 and FTP clients (against local mock servers: mail sent, mailbox listed and read, FTP passive download and upload) work with all three builds.
- The UNIX-only security tests (socket, SSL, stream and protocol; they use fork()) are not run on Windows; serial and ping were not run (no COM port; raw sockets need administrator rights).
Tests
examples_database/run_db_tests.sh now also builds and runs examples_general/print_security (new), examples_socket/socket_security, ssl_security, stream_security (with the gxDatagram checks) and proto_security. The TLS checks make throwaway certificates with the openssl program and use 127.0.0.1. libFuzzer targets (clang): examples_general/fuzz (cfg, str, b64, html, xml, rss, rdbdef, rdbrec, dfile, membuf, misc), examples_socket/fuzz (fuzz_proto), examples_socket/stream_fuzz and examples_database/fuzz.
DataReel Copyright (c) 2001-2026 DataReel Software Development
DataReel 6.3 Release Notes, 10/31/2026
DataReel version 6.3 (was 6.2)
DataReel 6.3 brings the object database speed and crash safety work of DataReel 7.2 and 7.3 to the 6.x library: positional file I/O, a faster B-tree cache, and an optional page cache and write-ahead journal. The database and index file formats are unchanged: 6.3 opens files written by 6.2 and earlier, and writes byte-identical files for the same operations. Every change in the source is marked with a "10/31/2026" comment (the strutil.cpp fix with "10/27/2026").
The library version in version.txt is 6.3 and the shared library version (SHAREDLIB_VERSION in env/linux.env) is 6.3, so the Linux shared library is built as libdatareel.so.6.3. The public interface only gains functions, but gxDatabase, gxBtree, BtreeCache and the file pointer types have new members, so programs must be recompiled against the 6.3 headers and relinked. Programs that compile the library sources directly must add the two new source files, gxdjrnl.cpp and gxdpcache.cpp, to their builds.
Always on
- Positional file I/O: reads and writes use pread()/pwrite() on Linux and ReadFile()/WriteFile() with an offset on Windows, so a seek costs no system call. The 32-bit database engine now also uses the 64-bit file pointer type (gxdfp64.h) on Linux and with MSVC; gxdtypes.h always includes gxdtyp64.h.
- The padding bytes in gxFileHeader, gxBlockHeader and gxBtreeHeader copies are zeroed, so the same operations always write the same bytes.
- BtreeCache finds cached nodes through a hash table instead of a linear search, and Flush() writes the dirty nodes but keeps them in the cache.
- gxBtree::FindNext() given the key it returned last, with the index unchanged, takes the next key from the same leaf with one compare instead of a search from the root.
- gxdFPTR64Allocate() writes zeros on Linux instead of calling posix_fallocate(), whose unwritten extents made each sync write file system metadata.
New, opt-in
A program that does not call these reads and writes its files as 6.2 did.
- gxDatabase::Sync(), SetSyncOnFlush() and WriteCount(): flush the file to disk (fdatasync()/fsync() or FlushFileBuffers()).
- gxDatabase::EnablePageCache(bytes, use_map = 0), gxdPageCache (gxdpcache.h): a cache of 4 KB file pages. With use_map = 1 pages not in the cache are read from a read-only memory map of the file (mmap() or MapViewOfFile()). Memory-mapped reads are on by default in DataReel 7.3 and off by default in 6.3.
- gxdJournal (gxdjrnl.h): a write-ahead journal for one or more gxDatabase and gxBtree files (and BtreeCache). Changes between Begin() and Commit() reach the files all or none, after a program crash or a power loss; Open() recovers committed transactions left in the journal. Write-through (the default) or write-back mode, gxdJournalReadLock for readers in other processes.
- gxdFPTR ReadAt(), WriteAt(), Sync(), Truncate(), Allocate(), Lock(), Unlock(), Map() and Unmap() functions.
Journal file access (6.3)
The journal holds copies of database pages until a checkpoint. In 6.3:
- A new journal file is created owner-only: mode 0600 on Linux, a protected DACL that gives only the current user access on Windows. An existing journal is made owner-only before it is used, and Open() fails if its access cannot be changed.
- A clean Close() removes the journal file. If it cannot be removed (on Windows while another process has it open for a gxdJournalReadLock) it is left empty.
- New functions gxdFPTRCreatePrivate()/gxdFPTRMakePrivate() and gxdFPTR64CreatePrivate()/gxdFPTR64MakePrivate().
Security fixes (from the DataReel 7.3 security scan)
Found in 7.3 by fuzzing, sanitizers and static analysis, and present in 6.2:
- Damaged block lengths: a length of zero made the block walks (TotalBlocks(), FindFirstObject(), FindNextObject()) loop forever, lengths shorter than a block header made them read the same bytes again and again, and a length past the end of the file could wrap the address back to an earlier block. A block shorter than its header or past the end of the file is now bad, and the walks only move forward.
- CalcChecksum() and the object checksum functions allocated and read up to the damaged length (with native types on 64-bit systems a block length is 64 bits). They are bounded by the real file size.
- Open() of a file that is not a database file left it open (a leaked file handle per failed open) and closing the object then wrote a database header into it. It is closed again without writing.
- WriteObjectChecksum() returned an uninitialised value when the file was not open.
- Journal recovery: page numbers and file sizes the file address type cannot hold end the replay, and pages past a file's committed size are not written.
- gxSSL::MakeRSAPrivateKey() and new LogFile files are owner-only (they got the umask permissions).
- gxConfig::ChangeConfigValue() only changes the line that starts with the setting name (it could rewrite another setting, a comment or a value holding the name), and names, values and comments with a line break are refused.
- db_debug no longer loops on damaged block lengths.
The 7.3 libFuzzer targets are in examples_database/fuzz (clang).
6.x security sweep (support code and 6.x-only code)
The DataReel 7.3.1 sweep fixes for the support code, and fixes found by a sweep of the 6.x-only code DataReel 7 removed (gcc -fanalyzer, ASan/UBSan runs of the examples, fcrypt and the Encrypted Password Database, and libFuzzer targets in examples_general/fuzz). Each fix has a test in examples_general/security_sweep, examples_general/support_security or examples_socket/comm_security.
- gxsBase64Encode(): bytes of 0x80 or more were a negative table index (non-ASCII text was encoded wrong), and the last group read up to 2 bytes past the input. ASCII input encodes as before.
- gxString: FindLast() with an empty pattern read far out of bounds; substrings (Mid/Left/Right), InsertAt(), DeleteAt(), SetLength(), ReplaceChar(), ConvertEscapeSeq() and operator<<(double) stay in their buffers. InsertAt() past the end now appends.
- strutil: bounded pattern searches, StringANCompare() digit buffers, 64-bit number conversions (LLWORDToString() of -5 printed -18446744073709551611).
- MemoryBuffer/MemoryBlock: no copies from null pointers, searches and inserts stay in bounds.
- DiskFileB::df_Read() returns df_EOF_ERROR with df_gcount() 0 when a read gets no bytes at the end of the file (it returned df_NO_ERROR and the full requested count). Reads that return data are unchanged. df_GetLine(), long names and text output of large numbers stay in their buffers; futils path, output name, chmod and mkdir fixes.
- gxConfig: whole-line name matches, numbers read with strtol (a value that does not fit reads as 0), lines longer than 1023 bytes read whole, the file rewritten through a temporary file and rename (mode and owner kept), names that are empty or hold the parameter ID refused.
- LogFile (UNIX): a symbolic link, FIFO or socket at the log name is refused (O_NOFOLLOW); new logs are owner-only.
- db_debug / gxDatabaseDebugManager: buffered block search, block lengths compared unsigned, Rebuild() refuses to write onto its input.
- Serial port: no O_ASYNC (the first incoming byte could stop the program with SIGIO), Recv()/Send() return -1 with scomm_TIMEOUT_ERROR instead of looping on 0-byte transfers, ReadBlock(buf, buf_size, gx) for blocks over 64 KB, error table and handle fixes.
- Telnet: RecvString() stored a whole 4096-byte read with no room check (remote overflow); it now stores at most bytes-1 characters. Sub-negotiation, option loops and TERM handling fixed; optional SetMaxTotalTime(). gxsTelnetClient has new members: recompile classes derived from it.
- Ping: replies are checked (length, type, id, sequence, source).
- Threads: a thread that could not be created is not joined or cancelled. Device cache of 0 buckets, null error messages.
6.3.1 (RELEASE_NOTES_6.3.1.txt) adds this work. NOT IN THE 6.3 BUILD: the networking part of the 7.3.1 sweep (sockets, TLS, gxStream with client certificates required by default, HTTP, URL, SMTP, POP3, FTP) and the rest of the 6.x-only module sweep (gxRDBMS, HTML/XML/RSS parsers, gxDatagram, printing). That work is on the WIP branches 6.3-wip-net-tls, 6.3-wip-net-http and 6.3-wip-legacy and is not finished. fcrypt and the Encrypted Password Database do not use that code.
Other changes
- strutil.cpp: StringANCompare() and the other string compares passed signed char values to isdigit() and tolower(), which is undefined for bytes above 127 on Windows. They now give the glibc order on every platform, so an index built on Linux is walked in the same order on Windows. The order of existing Linux indexes does not change. (From the DataReel copy bundled with fcrypt.)
Tests
- examples_database/journal: the DataReel 7 journal tests (same bytes with and without the cache and journal, commit, rollback, crash copies, torn journals, torn checkpoints, readers) and a 6.3 test of the journal file access and removal. "testprog 20 7 1" runs them with memory-mapped reads.
- examples_database/journal/crash_test.sh: kills a writer with kill -9 at random moments and checks that every commit it reported is in the files and no batch is half written.
- examples_database/infohog: an InfoHog/POD example.
- examples_database/damaged, examples_general/security_sweep, examples_general/support_security and examples_socket/comm_security: the security fixes above, each with a damaged or crafted input.
- examples_database/run_db_tests.sh and run_db_tests.bat build and run every database example and the journal tests.
How the changes were tested
On RHEL 10.2, 32-bit and 64-bit database engines:
- The library builds with no warnings, and all 64 example and utility programs build against it.
- The nine database examples, run against 6.2 and 6.3 builds (create, then reopen), write byte-identical files, and 6.3 reopening files created by 6.2 leaves the same bytes as 6.2 does.
- The journal tests pass with memory-mapped reads off and on, in both journal modes.
- crash_test.sh: 60 kill -9 rounds per engine, write-through and write-back, with and without a BtreeCache: no committed record lost, no partial batch.
DataReel Copyright (c) 2001-2026 DataReel Software Development
DataReel 6.2 Release Notes, 10/25/2026
DataReel version 6.2 (was 6.1)
DataReel 6.2 adds more fixes for damaged or crafted database and index files found by the security review of the Encrypted Password Database, a new gxDatabase::SetWriteHook() function, wxWidgets 3 header fixes and a CMake build. Every change in the source is marked with a "10/25/2026" comment.
The library version in version.txt is 6.2 and the shared library version (SHAREDLIB_VERSION in env/linux.env) is 6.2, so the Linux shared library is built as libdatareel.so.6.2. gxDatabase has two new members, so programs must be recompiled against the 6.2 headers and relinked.
Security fixes
- gxBtree search, insert and delete walks stop with gxDBASE_BADBLOCK_ERROR after gxBtreeMaxNodeReads (4096) node reads, so a node in a damaged or crafted index file that points back up the tree cannot make them loop forever. The BtreeCache variants are not changed.
- InfoHog Find(), CompareIndex() and RebuildIndexFile() no longer loop forever on a data file block length shorter than a block header, and skip objects that cannot be read instead of using the key member of a failed read.
New function
- gxDatabase::SetWriteHook() sets a function that is called after each successful Write(), so an application can tell its own changes to a file from changes made by others. The Encrypted Password Database uses it to update its database MAC.
Wxwidgets 3
- wx3incs.h: the include guard tested __GX_WX3NCS_HPP__ but defined __GX_WX3INCS_HPP__, so the header was never guarded.
- gxshtml.cpp: the wxWidgets 3.x code included wx2incs.h instead of wx3incs.h, and called wxYield() even when __GUI_THREAD_SAFE__ was not defined. wxYield() from a worker thread is not allowed in wxWidgets 3.
- "defined (__wxWIN201__) || (__wxWIN291__)" tested the value of __wxWIN291__ instead of whether it is defined. Both now use defined().
- The new __wxWIN3__ macro selects the wxWidgets 3.x code for any 3.x release (3.0 through 3.3). It is interchangeable with __wxWIN302__, so existing code is unchanged.
CMAKE build
- A CMakeLists.txt in the top-level directory builds the same objects as the makefiles into a static library (DataReel::datareel) on Linux and Windows, with options for SSL (OpenSSL, Schannel or none), console or wxWidgets message display, the 64-bit database engine and native types. See "BUILDING WITH CMAKE" in README.txt. The makefiles are unchanged.
How the changes were tested
- An index file whose node points to itself is rejected with an error instead of looping, and the database examples give the same results as with 6.1.
- On RHEL 10 the library builds with no warnings with the makefiles and with CMake, and the example and utility programs build against it.
Documentation
- Historical references to version 5 were reworded, the documentation footers read DataReel 6.2, and the Cluster Manager page describes DRCM 1.42.
DataReel Copyright (c) 2001-2026 DataReel Software Development
DataReel 6.1 Release Notes, 10/25/2026
DataReel version 6.1 (was 6.0)
DataReel 6.1 is a security fix release. It fixes memory safety bugs found by a security review of the Encrypted Password Database, which uses the DataReel database engine. Every change in the source is marked with a "10/25/2026" comment.
The library version in version.txt is 6.1 and the shared library version (SHAREDLIB_VERSION in env/linux.env) is 6.1, so the Linux shared library is built as libdatareel.so.6.1. There are no interface changes from 6.0. Programs must be recompiled and relinked.
Security fixes
- gxBtree::ReadNode() read key_size * key_count bytes into the fixed key_entries buffer of a node, using the key count stored in the index file. A count larger than the node can hold overflowed the heap. Node key counts below 0 or above the node capacity are now rejected with gxDBASE_BADBLOCK_ERROR.
- gxBtree::InitBtree() used the key size and node order stored in an existing index file without checking them. A stored key size that does not match the key type of the tree, or a node order out of range, is now rejected with gxDBASE_BAD_HEADER.
- InfoHog::Read() trusted the member count and member lengths stored in the data file. A member count of 0 or above InfoHogMaxMembers, member lengths larger than the file, and a key member (member 0) whose length is not sizeof(TYPE) are now rejected. Callers cast member 0 to TYPE, so a short key member was read past its buffer.
- InfoHog::GetMember(), GetMemberLen() and SetMember() checked index > num_members instead of index >= num_members, and accessed one element past the member array.
How the changes were tested
- Index files with a root node key count of 5000 and with a wrong key size in the B-tree header, which crashed programs built with 6.0 (heap corruption abort and segmentation fault), are rejected with an error by programs built with 6.1.
- Unchanged database and index files read the same as with 6.0.
Supported platforms
- Linux: Red Hat Enterprise Linux 10 (the default build platform), RHEL 9 and RHEL 8. RHEL 6 and 7 are no longer supported. Linux builds use the operating system's OpenSSL.
- Windows: Windows 11 and Windows Server 2022 and 2025, with Visual Studio 2022 or 2026. Older Windows releases are no longer supported. The Windows build is 64-bit by default; 32-bit builds are kept for legacy code only. Windows OpenSSL builds (USESSL=1) must use only an OpenSSL 3.5.x LTS release, see README_windows_openssl.txt. The default Windows SSL build uses the native Schannel API.
- The readmes, makefile and ENV file comments and the HTML documentation set were updated to match. docs/README_windows_setup.html was regenerated from README_windows_setup.txt.
- A stray prebuilt shared library binary was removed from the source tree.
DataReel Copyright (c) 2001-2026 DataReel Software Development
DataReel 6.0 Release Notes, 10/24/2026
DataReel version 6.0
DataReel 6.0 is the first major release in many years.
Version 6.0 fixes every item listed under "Known Items Left As Is" in CODE_REVIEW_FIXES.txt. Those items were held back in the code review release because they needed a new interface or would change existing files. Every change in the source is marked with a "10/24/2026" comment. The changes were made by Claude Code, Anthropic's AI coding assistant (https://claude.ai/code).
The library version in version.txt is 6.0 and the shared library version (SHAREDLIB_VERSION in env/linux.env) is 6.0, so the Linux shared library is built as libdatareel.so.6.0. Programs must be recompiled against the 6.0 headers. Some classes gained members and some function signatures changed (see Upgrading From Earlier Versions).
How the changes were tested
- The library and the OpenSSL library build with no warnings using GCC 13 with -Wall -Wextra, at -O0 and at -O2.
- The 39 database, general and thread example programs were built with AddressSanitizer and UndefinedBehaviorSanitizer and run with no reports.
- New test programs for each change pass against 6.0. The RDBMS, XML and thread pool tests fail against the previous release, which shows that they test the problems that were fixed. The glibc mutex problem was reproduced with a small C program: after a trylock that returns ENOTRECOVERABLE, an unlock crashes and a lock never returns.
Linked lists
- New gxList::DestroyArrayList() and gxListB::DestroyArrayList() free each item with delete[], for strings and other data allocated with new[]. DestroyList() still uses a scalar delete and is only for data allocated with a single object new.
- examples_general/doubly_linked_list uses DestroyArrayList().
Configuration manager
- gxConfig::Add(const gxString &) hid the virtual gxListB::Add(void *) (-Woverloaded-virtual). gxConfig now overrides Add(void *) as a private function that adds nothing and returns a null value, since every node in a configuration list must hold a gxString.
- New gxConfig::Add(const char *), so Add(char_buffer) stores the text as a string instead of picking the void pointer overload.
Thread pool
- thrPool::ClearPool() and the thrPool destructor used to delete every thread with a plain delete, even while it was still running. They now cancel running, suspended and waiting joinable threads and, under POSIX, wait for them to finish before deleting them.
- gxThread::DestroyThreadPool() and gxThread::DestroyThread() with check_state also wait for a canceled thread under POSIX. pthread_cancel() only sends a cancel request, so a canceled thread could still be running when its gxThread_t was deleted.
- New gxThreadAPIWrapper::apiStopThread() cancels a thread and waits for it.
- A canceled thread stops at its next cancellation point. A thread that never reaches one keeps these functions waiting. A canceled thread runs gxThread::ThreadCleanupHandler(), so the gxThread object must still exist when the pool is cleared. Detached threads cannot be canceled and are still deleted without being stopped.
Database file cache
- gxDBCacheNode::Bind() loaded a segment that was not in the cache with a read length of one byte. The cache node now remembers the length of its last CachedRead(), CachedWrite() or Bind(bytes) call and loads the whole node. With no length set, only a segment that is already cached is bound, and the node address is kept.
- New gxDBCacheNode::Bind(bytes), GetNodeLength() and SetNodeLength().
- gxDatabaseCache::ReleaseSegments() now returns the segment array and leaves the cache empty. It used to set only the array pointer to null, so the head and tail still pointed into the released array. The caller frees the returned array with delete[].
Relational database
- ALLOWDUP lookups by key: with duplicates allowed the block address is part of each B-tree key, so a search key with a block address of 0 never matched. FindRecord(), DeleteRecord() and the change functions could not find any record through an index. Find() now starts at the first key with the same CRC-32 value and reads each record with that value until one matches.
- AddRecord() no longer checks for an existing key when duplicates are allowed. The check always passed before, because the lookup always failed.
- BLOB fields in all-field keys: CreateKey() moved its write offset past a BLOB field but did not count it in the key length, so the fields after a BLOB were left out of the key. BLOB fields are now skipped without leaving a gap.
- File change: the all-field keys of tables with BLOB fields are different in 6.0. Rebuild the index files of those tables with RebuildIndex after upgrading. Index files of other tables do not change.
Xml parser
- Text mixed with child elements is kept in document order. It used to be dropped. Inside a parent, child or sub-element, each piece of text is stored as a node with an empty name and the text in its data member. Text between the parent elements of the root is stored in node_tree with the new node type gxsXML_TEXT_NODE and passed to Handle_Parent_Event() in SAX mode.
- Leading and trailing white space is removed from the text, and text that is only white space is not kept, so a document written and loaded again gives the same tree.
- The writer writes a node with no name as text.
- Code that walks a loaded tree will see the text nodes in documents with mixed content, and should skip nodes with an empty name if it only wants elements.
Rss feed writer
- New gxRSScloud structure with domain, port, path, registerprocedure and protocol members. gxRSSchannel::cloud is now a gxRSScloud (it was a gxString).
- The <cloud> element is written as an empty element with the five attributes the RSS 2.0 specification requires, when cloud.domain is set. It used to be written as element text, which is not valid RSS.
Thread helpers and glibc
- In glibc 2.39 a pthread_mutex_trylock() call that returns ENOTRECOVERABLE on a robust mutex leaves the mutex in a bad state: a later unlock crashes and a later lock never returns.
- gxMutex_t has a new not_recoverable member. It is set when gxThreadMutexLock() or gxThreadMutexTryLock() gets ENOTRECOVERABLE. The lock, try lock and unlock functions then return ENOTRECOVERABLE and store gxMUTEX_NOTRECOVERABLE_ERROR without calling glibc, and gxThreadMutexDestroy() skips its unlock call. The mutex can be destroyed and initialized again.
Compiler warnings
With -Wall -Wextra the previous library reported warnings at 117 places in the source. All are fixed:
- The private copy constructors and assignment operators used to disallow copying no longer name their unused parameter. The parameters of other functions that are not used are commented out, or marked with (void) where only WIN32 builds use them.
- "operator const int () const" is now "operator int () const", and gxDatabase::GetRevLetter() returns char.
- Casts to "const unsigned char" in htmldrv.cpp and ostrbase.cpp are now casts to unsigned char.
- HyperText::TableHeader() and TableData() take a const char *valign, and PostScriptDrv::SetDocumentName() keeps a const char pointer, so string literals can be passed without a cast.
- Signed and unsigned compares in gxdatagm.cpp, gxstream.cpp, scomserv.cpp and gxrdbhdr.cpp.
- gxBStree::Find() had an unused variable.
Other fixes
Found while testing the changes above:
- DiskFileB::df_copy() stored the file lengths in unsigned variables, so the tests for a futils_filelength() error could never be true.
- gxDatabase::ReadObjectChecksum() compared CRC values that were never set when the file was not open. It now returns 0. The optional CRC pointers are checked for null on every path.
- ASPrint() for int, long and double values formatted the number into a buffer the size of the field width, which overflowed for a narrow field. long values were truncated to int. A fixed buffer and snprintf() are used now.
- operator>>() for UString and UStringw read an uninitialized buffer when the input failed, for example at the end of the input. Found by AddressSanitizer in examples_general/string_class.
- MemoryBuffer::Clear(1) only set the length to zero, and Alloc(), Realloc(), Destroy() and the destructor freed memory without clearing it, so passwords and keys stayed in freed memory. Clear(1) and every free now overwrite the whole allocated buffer with zeros through the new MemoryBuffer::SecureZero(). Found in the fcrypt security review.
Windows and visual studio 2026
The nmake build files and the Windows code were reviewed and updated for Visual Studio 2026 (MSVC 14.50). VS 2022 is still supported.
Build files:
- winslib/msvc.env used the cdebug, cflags, cvarsmt, guilflags and guilibsmt macros from win32.mak, which is no longer part of the Windows SDK. Those macros were empty, so the static library and every program linked to it were built with no optimization in release builds and no debug information in debug builds. The flags are now set in msvc.env: /MT /O2 for release builds and /MTd /Z7 /Od for debug builds, with /W3 /EHsc /GR for both.
- The Windows system libraries are now listed in msvc.env. The OpenSSL builds also link ws2_32.lib, which the OpenSSL 3.x static libraries need.
- env/msvc.mak and env/msvc_dll.mak passed LINK_FLAGS, which was never set, to the linker. They now pass LINKER_FLAGS. winslib/project.mak passes /nologo to lib.exe.
- dll/msvc.env linked with /machine:I386, so the DLL could not be built with the x64 compiler. The linker now takes the target CPU from the object files. The /pdbtype:sept option, which the linker no longer supports, was removed.
- _CRT_SECURE_NO_WARNINGS, _CRT_NONSTDC_NO_WARNINGS and _WINSOCK_DEPRECATED_NO_WARNINGS are defined in MSVC_DEFMACS, so the C4996 deprecation warnings for the C string, POSIX and WinSock 1.1 functions do not hide other warnings. Comment out MSVC_DEFMACS to see them. _HAS_STD_BYTE=0 is also defined, so std::byte cannot conflict with the Windows byte type if the code is built with /std:c++17 or later.
ENV BAT files:
- New env/vs2026_vars.bat finds the VS 2026 install with vswhere.exe and calls vcvarsall.bat. It works with the Community, Professional, Enterprise, Build Tools and Insiders editions. The other BAT files called the Insiders path directly, which does not exist in a release install of VS 2026.
- The default Windows build is now 64-bit x64. env/msvc.bat and env/msvc64_vs2026.bat set up x64 builds, and env/msvc_vs2022.bat sets up x64 builds with VS 2022. env/msvc64_vs2026.bat called vcvarsamd64_x86.bat before, which builds 32-bit programs on a 64-bit host. For 32-bit x86 builds of legacy code use env/msvc32_vs2026.bat.
- The OpenSSL ENV files point to the openssl64 install by default.
Source:
- gxdtyp64.h used the old _int64 keyword. It now uses __int64.
- gxRandom::entropy_number() in gxssl.cpp and the WIN32 thread entry in thrapiw.cpp cast pointers to unsigned long and DWORD, which are 32 bits in 64-bit Windows builds. They cast through size_t now. The detach, priority, stack and thread_pool thread examples had the same cast.
- The futils directory functions and futils_GetDiskSpace() use the ANSI Windows functions (FindFirstFileA, FindNextFileA, GetDiskFreeSpaceA and GetDiskFreeSpaceExA). In _UNICODE builds the __VS2026__ code copied a wide file name with strcpy(), which kept only the first letter, and passed a wide string to GetDiskFreeSpaceExA. futils_readdir() did not set d_namlen in ANSI builds.
- futils_filelength() called CreateFile(TEXT(fname)), which does not compile with _UNICODE when the 64-bit integer option is used. It calls CreateFileA() now.
- futils_mode() discarded the result of tolower(), so files ending in .EXE or .COM in upper case were not marked as programs.
- gxdlcode.h defines __VS2026__ when _MSC_VER is 1950 (VS 2026) or higher, so the VS 2026 _UNICODE code is used without a -D__VS2026__ flag.
How these changes were tested:
- The library, the DLL, the utils and the examples were cross-compiled on Linux with the MinGW-w64 GCC 13 compilers for 32-bit and 64-bit Windows, with the MSVC defines from msvc.env, in ANSI and _UNICODE builds. All 64 programs link. The OpenSSL examples were not built.
- The 64-bit programs were run under Wine 9. The database, general and thread examples ran, the directory functions were checked in ANSI and _UNICODE builds, and the simple socket client and server exchanged data.
- The library was not built with the Microsoft compiler or nmake for this release. Build it with VS 2026 on Windows before you use it.
One library with ssl
- SSL is built into the library on every platform. There is no separate SSL library.
- Linux: "make" in the build directory builds libdatareel with OpenSSL. env/linux.env sets USE_OPEN_SSL to YES unless it is already set, and the example programs link with -lssl -lcrypto. The libdatareel_ssl library and build/makefile_ssl were removed. On a system without OpenSSL, build libdatareel and your programs with "make USE_OPEN_SSL=NO".
- Windows: the gxcode library uses the native Windows Schannel (SSPI) TLS API by default, so OpenSSL does not need to be built. Programs link with secur32.lib, crypt32.lib and ncrypt.lib, which come with the Windows SDK. msvc.env adds -D__USE_GX_SSL_EXTENSIONS__ and -D__USE_GX_SCHANNEL__. OpenSSL is still an option: build the library with msvc_ssl.mak and your programs with USESSL=1.
Windows schannel ssl
- New file src/gxsschan.cpp has the Schannel version of the gxSSL class. gxssl.cpp includes it when __USE_GX_SCHANNEL__ is defined. The gxSSL functions, error codes and messages are the same for both versions.
- Client side: TLS 1.2 and TLS 1.3 (where Windows supports it), SNI, and VerifyCert() with the Windows certificate chain engine. With SetCAList() the chain must end at a CA in the CA file. Without it the Windows trusted root store is used.
- Server side: InitCTX() loads PEM or DER cert and key files. RSA (PKCS#1 and PKCS#8) and EC keys are supported, and the key is imported into CNG for the life of the context. A .pfx or .p12 file with the key password also works. Encrypted PEM keys need a .pfx file.
- GetCTX() and GetSSL() return Schannel objects, so programs that call OpenSSL functions directly must use the OpenSSL build.
- MakeDHParms(), MakeRSAPrivateKey() and MakeCertReq() need OpenSSL and return an error in the Schannel build. LoadDHParms(), InitPRNG() and MakeRSAEphKey() do nothing because Schannel handles key exchange.
- New gxSSL functions for both versions: SetHostName() for SNI, GetPeerCertInfo() for the peer's subject and issuer, and CertVerifyErrorString() for VerifyCert() return codes. gxsHTTPClient sets the host name, so HTTPS requests to virtual hosted sites work with both versions.
- The ssl_verify_cert example uses the new functions and works with both versions. The https_client, http_client, ssl_server and ssl_verify_cert msvc.mak files no longer set USESSL=1.
- Tested by cross-compiling with MinGW-w64 for x86 and x64 and running under Wine 9: the client against openssl s_server, cert checks with a good and a bad host name, the server with a .pfx file against a Python ssl client, a 1 MB transfer, a read timeout, and the https_client example. Wine cannot import PEM keys into CNG, so the PEM server path and TLS 1.3 still need a test on Windows.
- Tested on Windows 11 (10.0.26200) with VS 2026 (cl 19.50) x64: the library, the DLL and all 61 examples and utils build with nmake. Cert verify, https_client and the ssl_server example (PEM key) pass with TLS 1.2 and TLS 1.3.
- MakeCertReq() signed certs with MD5, which Schannel rejects. It signs with SHA-256 now, and the ssl_server example cert was re-signed with SHA-256.
- The debug DLL link no longer uses /incremental:yes (LNK4224).
Upgrading from earlier versions
- Recompile every program against the 6.0 headers and link with the 6.0 library.
- gxRSSchannel::cloud is a gxRSScloud. Set cloud.domain, cloud.port, cloud.path, cloud.registerprocedure and cloud.protocol instead of assigning a string.
- gxDatabaseCache::ReleaseSegments() returns the segment array. Free it with delete[] when it is no longer used.
- gxConfig objects no longer accept untyped data through gxListB::Add(void *).
- Rebuild the index files of RDBMS tables that have BLOB fields and an all-field key ("PRI: COL NONE").
- Programs that walk gxsXML trees loaded from documents with mixed content should skip nodes with an empty name, or handle them as text.
- A thread pool is now cleared by stopping its running joinable threads. Threads must reach a cancellation point, and the gxThread object must still exist when the pool is cleared or deleted.
DataReel Copyright (c) 2001-2026 DataReel Software Development