Problem
DocxReader.read in v3.6.4 segfaults on a real Word document in a debug build. The same document reads fine in a release build, and fine in both modes at the PR #141 cluster head (the 3.7.0 candidate).
Reproduction
Document: a Chinese-government review form (REC-O-01-…docx, deeply nested tables). Debug binary:
$ macdoc docx apply manifest.json --input <doc> --output out.docx
exit=139 # SIGSEGV
0 swift_retain + 32 in libswiftCore.dylib
1 static DocxReader.read(from:wireTreeBackedViews:) + 24908
.build/checkouts/ooxml-swift/Sources/OOXMLSwift/IO/DocxReader.swift
2 Executor.apply(manifest:baselineURL:outputURL:warnHandler:) (docx-workflow-swift)
3 MacDoc.Docx.Apply.run()
Release build of the same commit: exit 0. That asymmetry is the signature of a stack overflow — debug frames are several times larger — which fits a recursive descent over a deeply nested document.
Not present at the 3.7.0 candidate
A minimal probe against the PR #141 cluster head (001e95a) reads the same file in both modes:
OK tree-backed: body children=7
OK detached: body children=7
So the reader/IO rework in the 3.7.0 cluster removes it. Whether that was deliberate or incidental is not established here — no test in the suite covers this document, so nothing would notice if it came back.
Why it stayed hidden
macdoc's dependency graph was frozen at v3.2.0 by a branch: "main" pin (macdoc#184). Catching the graph up to 3.6.4 is what surfaced this; before that, macdoc never ran any 3.6.x reader.
Suggested handling
Surfaced while implementing macdoc#184 (dependency catch-up). Refs PsychQuant/macdoc#184
Problem
DocxReader.readin v3.6.4 segfaults on a real Word document in a debug build. The same document reads fine in a release build, and fine in both modes at the PR #141 cluster head (the 3.7.0 candidate).Reproduction
Document: a Chinese-government review form (
REC-O-01-…docx, deeply nested tables). Debug binary:Release build of the same commit: exit 0. That asymmetry is the signature of a stack overflow — debug frames are several times larger — which fits a recursive descent over a deeply nested document.
Not present at the 3.7.0 candidate
A minimal probe against the PR #141 cluster head (
001e95a) reads the same file in both modes:So the reader/IO rework in the 3.7.0 cluster removes it. Whether that was deliberate or incidental is not established here — no test in the suite covers this document, so nothing would notice if it came back.
Why it stayed hidden
macdoc's dependency graph was frozen at v3.2.0 by a
branch: "main"pin (macdoc#184). Catching the graph up to 3.6.4 is what surfaced this; before that, macdoc never ran any 3.6.x reader.Suggested handling
PackageInspector.stripComments的<!--.*?-->對未閉合<!--呈二次退化——5 KB 的 .docx 讓檢查跑一分鐘(follow-up finding from che-word-mcp#199 verify) #138 gave comment stripping — rather than relying on frame size.Surfaced while implementing macdoc#184 (dependency catch-up). Refs PsychQuant/macdoc#184