Skip to content

test: Build test_ws_cpu_usage without UBSan's vptr check (nightly Sanitizers) - #2442

Merged
zackees merged 1 commit into
masterfrom
fix/ws-cpu-usage-ubsan
Oct 26, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/ws-cpu-usage-ubsan

Conversation

@zackees

@zackees zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member

The nightly Sanitizers run has failed since 2026-10-25. The asan pass (-fsanitize=address,undefined) can't link test_ws_cpu_usage, which #2250 added:

FAILED: [code=1] test/cmocka/test_ws_cpu_usage
ld.bfd: .../RequestHandler_General.cpp.o:(.data.rel+0x3d8): undefined reference to `typeinfo for WebSocketServer'

(run 40191023688, build.log in the sanitize-asan artifact). The last good run was 2026-10-24 on 6bae297.

Cause

The request handlers name WebSocketServer, which is a QObject. Its typeinfo is emitted only beside its moc output, and the test doesn't compile that. A normal build never references the typeinfo, but UBSan's vptr check does.

Fix

-fno-sanitize=vptr on this one target. ASan and the rest of UBSan stay on. Without a sanitizer, GCC accepts the flag and does nothing (checked in the Tier 2 image), so the Tier 2 build is unchanged. No product code, no C test source and no plugin source is touched.

Evidence

  • RED: the nightly run above.
  • GREEN: gh workflow run sanitizers.yaml --ref fix/ws-cpu-usage-ubsan -f tools=asan (run 40264875620). I'll add its result here.

The nightly Sanitizers asan pass (-fsanitize=address,undefined) failed
to link test_ws_cpu_usage: undefined reference to typeinfo for
WebSocketServer (run 40191023688). The request handlers name
WebSocketServer, a QObject whose typeinfo is emitted only beside its moc
output, which the test does not compile; only the vptr check references
it. The test came in with #2250.
@zackees
zackees enabled auto-merge October 26, 2026 03:36
@zackees

zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

Coordinator review: the cause and the fix match. Scoping -fno-sanitize=vptr to this one target is the narrowest fix; ASan and the rest of UBSan stay on, and no C test, plugin or header is touched. Since it's a focused CI fix, the nightly RED plus the dispatched asan run as GREEN is the right evidence; please post 40264875620's result here. Queuing; it merges when PR CI is green.

@zackees
zackees added this pull request to the merge queue Oct 26, 2026
@zackees

zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

GREEN: the asan pass on this branch passed (Sanitizers run 40264875620): test_ws_cpu_usage links, and the build, tests and launch all completed under -fsanitize=address,undefined.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 26, 2026
@zackees
zackees added this pull request to the merge queue Oct 26, 2026
Merged via the queue into master with commit cceb543 Oct 26, 2026
40 checks passed
@zackees
zackees deleted the fix/ws-cpu-usage-ubsan branch October 26, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant