CI: FastC primitive comparison synthetic-token memo reuse emits an unrelated mixed-sign helper (GCC ASan)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
Start with the failing test test_fastc_plain_primitive_comparisons_preserve_mixed_sign_helpers_and_reject_complex_shapes in vlib/v/gen/fastc/primitive_comparison_test.v around line 101, then read fastc_comparison_memo_key in vlib/v/gen/fastc/fastc.v and the memo reset in expr.v. Done means the test passes under GCC ASan without changing its assertions, by resetting the memo between synthetic cases or using a fresh Parser per case.
Written by the indexing model from the issue text.
Description
Executed historical failure
- Master
593657221cd2ef2063d41979a7b827e8cb12ecd5, GCC AddressSanitizer shard 3, completed 2026-11-22 21:55:59 UTC after 498 other tests passed and 172 skipped. vlib/v/gen/fastc/primitive_comparison_test.v:101failstest_fastc_plain_primitive_comparisons_preserve_mixed_sign_helpers_and_reject_complex_shapesforf == a(f: f64,a: int). Expectedrender_special_expression(...) == none, but gotv_fastc_us_eq((u64)(wide), (i64)(a)), from a different previous case, not a float comparison.
Investigation and likely root
fastc_comparison_memo_keyinvlib/v/gen/fastc/fastc.v:1812–1830keys only by token-array data pointer, count and tag. The renderer memo is cleared byread_expression_with_continuation_modeinexpr.v:238–252at each production top-level expression.- The test creates and frees multiple independent synthetic token arrays while reusing the same
Parserand directly callingrender_special_expression; that bypasses the production memo reset and can reuse a freed token buffer's address. The stalewidesource in the actual output strongly confirms a cross-case memo hit. - Current master
44bbfa43did not change these functions; no evidence that the normal expression reader produces the same wrong result. Check test and production separately.
Repair / validation
Reset comparison/type memo between independently synthesized test expressions, or use a fresh Parser per case, without changing any assertion; retain coverage for real recursive subranges while one expression lives. Test old-vs-new with GCC ASan and unsuppressed Clang ASan plus ./v self, formatting, focused FastC/primitive comparison suite. Inspect any actual runtime numeric comparisons before touching implementation. Source-based diagnosis only; corrected V native run has not happened.
Normalized root: R395, investigating; first/last observed 2026-11-22 21:55 UTC; failing SHA predates current task merge. An old red job alone does not establish introduction.
[!NOTE]
You can use the 👍 reaction to increase the issue's priority for developers.Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
- Dominant language
- V
- Stars
- 38.1k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 682
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vlang/v
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sagemathinc/sagebrush#1683 ·
Maintainers usually reply within 1 day
-
bot-triaged module: aotinductor module: compile-time module: inductor module: performance module: rocm oncall: export oncall: pt2 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
baseballyama/rsvelte#5235 ·
Maintainers usually reply within 1 day
-
lang-core: member access on a component instance reads its internal fields instead of giving nullOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
midspiral/LemmaScript#355 · 1 comment ·
Maintainers usually reply within 1 day