Add portable replacement tests for excluded XS::APItest bigmem stack tests
还没有人认领这个 Issue。
评估
调研方向
The issue requires adding new tests to src/test/resources/unit. First, examine the excluded upstream tests perl5_t/t/bigmem/stack.t and perl5_t/t/bigmem/stack_over.t to understand the portable behaviors they represent. Then, design new Perl-level tests that validate list-context propagation, argument counts, list operations, and bounded stack behavior without XS::APItest. Ensure tests pass under system Perl, the JVM backend, and the interpreter backend. The acceptance criteria include running within CI limits and documenting the exclusions.
由索引模型根据 Issue 内容生成。
描述
Summary
Add PerlOnJava-owned replacement coverage for the portable behavior represented
by the Perl core tests:
perl5_t/t/bigmem/stack.tperl5_t/t/bigmem/stack_over.t
Those upstream tests are now excluded from dev/tools/perl_test_runner.pl
because they require the native XS::APItest extension and directly test
Perl 5 C-level value-stack/MARK implementation details. They also require
multi-gigabyte allocations that are unsuitable for the PerlOnJava test suite.
The exclusion is intentional, but it must not remove all coverage of the
observable list, argument-stack, and bounded overflow behavior that is
portable across Perl implementations.
Current upstream-test classification
bigmem/stack.t depends on XS::APItest functions including wide_marks,
xs_items, eval_sv, and call_sv, and creates arrays with indices beyond
0x8000_0000. It exercises native mark-stack offsets, XS argument counts,
large list operations, split, repeat, tie, and related C implementation paths.
bigmem/stack_over.t also depends on XS::APItest and specifically checks
32-bit MARK behavior on a 64-bit native Perl build while allocating an array
with a 2-billion-element index.
These implementation-specific assertions cannot be ported verbatim to the
JVM or interpreter backend.
Proposed replacement coverage
Add focused tests under src/test/resources/unit for Perl-level behavior that
does not depend on XS, native pointers, or enormous allocations. At minimum,
cover:
- List-context propagation through nested calls and expressions.
- Correct item counts for bounded list construction, list assignment, and
list-returning functions. - List slicing and negative indexes after a list-producing call.
split,join,grep, and repetition with bounded inputs.- Argument counts observed by ordinary Perl subs through
@_, including
nested calls and calls returning multiple values. evalandrequirepaths that occur while a list/argument stack is active.- Bounded recursive or deeply nested calls that verify the runtime reports a
controlled stack/resource failure rather than hanging or corrupting values.
Use sizes large enough to expose indexing and context bugs but small enough for
ordinary CI machines. Do not reproduce the 2-billion-element allocation or the
60/17 GB memory requirements.
Test requirements
- Validate every new Perl-level test with system Perl first.
- Require success on both JVM and interpreter backends.
- Keep the tests deterministic and independent of
XS::APItest. - Do not weaken or modify the upstream Perl core tests.
- Preserve the runner exclusions for the two native-only upstream files.
- Add comments documenting which native
XS::APItestassertions are
intentionally not represented by the portable replacements.
Acceptance criteria
- A project-owned test suite covers the portable semantics listed above.
- The suite passes under system Perl, PerlOnJava JVM, and PerlOnJava
interpreter execution. - The tests run within normal CI memory and time limits.
- The compatibility documentation or test-runner notes explain why the two
upstream XS tests remain excluded.
- 主要语言
- Perl
- 星标
- 64
- 派生
- 6
- 平均合并
- 5 小时 38 分钟
- 30 天内合并 PR
- 170
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
area:cpan-port area:unicode bug
难度 2/5 1-3 小时 新手友好度 88/100
fglock/PerlOnJava#1341 ·
-
area:backend area:runtime bug
难度 4/5 3-5 天 新手友好度 45/100
fglock/PerlOnJava#1511 ·
-
area:backend area:cpan-port bug
难度 4/5 3-5 天 新手友好度 45/100
fglock/PerlOnJava#1508 · 1 条评论 ·
-
area:cpan-port area:platform enhancement
难度 5/5 一周以上 新手友好度 30/100
fglock/PerlOnJava#1507 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
fglock/PerlOnJava#1506 ·
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
documentation Needs Triage
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
trizen/youtube-viewer#456 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
connectivity 未关闭
难度 1/5 1 小时以内 新手友好度 80/100
-
Common US ingredient names are not recognized, so about 12.4k US products miss an allergen warning 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
openfoodfacts/openfoodfacts-server#14657 · 4 条评论 ·