Skip to content

gcc-ASAN tests job is permanently red: test-Concordance.R:433 asserts an installed help database the container does not build #179

Description

@ms609

The gcc-ASAN / AddressSanitizer tests job has been failing on every
branch since test-Concordance.R:433 landed:

Error ('test-Concordance.R:433:3'): Concordance functions document NaN for
uninformative pairs (#110)
Error in `tools::Rd_db("TreeSearch")`: installed help of package
'TreeSearch' is corrupt

Seen on 31193721419
(feature/consistency-fixes) and
31210334799
(feature/ub-class-audit), on branches that touch neither Rd files nor
roxygen. Both runs are otherwise clean: [ FAIL 1 | WARN 0 | SKIP 18 ],
and the one failure is this.

Cause

The r-hub gcc-asan container installs the package without building a help
database, so tools::Rd_db() has nothing to read. The test asserts against
how the local environment happens to be installed, not against anything
the package promises — the same trap as
.AGENTS/memory/'s "a test can pass for the wrong reason" note, in the
mirror-image direction: here it fails for the wrong reason.

Why it matters more than one red check

gcc-ASAN is the only leg that runs UBSan, and UBSan is the only
detector for one half of the degenerate-container UB class — a null
.data() reaching a nonnull parameter is invisible to hardened
libstdc++ and to plain builds (see #177). A permanently-red ASan leg
trains readers to skim past it, which is how that class went unwatched
before.

Suggested fix

Skip the docstring check when no help database is installed, rather than
asserting one exists:

skip_if(length(tools::Rd_db("TreeSearch")) == 0, "No installed help database")

wrapped so the error itself is caught, or gate the whole test on
skip_on_cran() plus a requireNamespace-style guard for the Rd db.

Reopening condition

Any ASan run whose only failure is an environment assumption rather than a
sanitizer report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreInfrastructure / process work, not a red-team findingsev:medP2: wrong on edge input / search quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions