fix(adt): never let a blank date throw across the C ABI - #139
Merged
FiveTechSoft merged 1 commit intoJul 29, 2026
Conversation
Writing an ADT record whose date or timestamp column is blank killed the
process. A blank date is 8 spaces -- what AdsSetJulian(0) and an empty date
field produce -- which passes the size() >= 8 guard and then reaches
std::stoi(" "). That throws std::invalid_argument, and the exception
escapes through the ENTRYPOINT into the caller's C stack: not a recoverable
5xxx, a dead process.
Copying any table with a single blank date was enough to trigger it, so a
Harbour COPY TO of a real-world table with an unfilled date column took the
application down with it.
Date and timestamp now parse defensively and store the ADT blank-date marker
(0) when the field carries no value, which is what a reader expects to find
there.
Found while migrating a 148-column ERP table; verified with a headless Harbour
program driving the real rddads, where the same COPY TO now completes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
FiveTechSoft
added a commit
that referenced
this pull request
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Writing an ADT record whose date or timestamp column is blank kills the process.
A blank date is 8 spaces — what
AdsSetJulian(0)and an empty date field produce. It passes thesize() >= 8guard and reachesstd::stoi(" "), which throwsstd::invalid_argument. The exception then escapes through theENTRYPOINTinto the caller's C stack: not a recoverable 5xxx error, a dead process.Copying any table containing a single blank date is enough to trigger it, so a Harbour
COPY TOof a real table with an unfilled date column takes the application down with it.Date and timestamp now parse defensively and store the ADT blank-date marker (0) when the field carries no value, which is what a conforming reader expects to find there.
Found while migrating a 148-column ERP table. Verified with a headless Harbour program driving the real
rddads, where the sameCOPY TOnow completes.Suite: 1207/1225 — identical to
origin/mainon this machine (18 pre-existing failures, same files, confirmed over two runs).