fix: overloaded / and % under use integer (Date::ISO8601)#729
Merged
Conversation
Perl keeps overload semantics for blessed operands even inside integer scopes. integerDivide and integerModulus previously coerced via getLong(), stripping Math::BigInt/Math::BigRat results and breaking Date::ISO8601 (and similar). Generated with [Cursor](https://cursor.com/docs) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
2a37f60 to
3083d8a
Compare
…d PID Parallel runs globbed /tmp/perl_test_* and matched on test_file, which could associate the wrong child output under load — logs showed phantom failures (exec.t incomplete TAP, unrelated comp regressions). Write each child's summary to /tmp/perl_test_runner_RESULT_<PID>; parent reads exactly that path when waitpid reap fires. Generated with [Cursor](https://cursor.com/docs) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Under
use integer, binary/and%still dispatch overloaded methods when either operand is a blessed overloaded object (for exampleMath::BigInt). The JVM backend skipped overload for the integer-specific helpers and coerced operands with native integer conversion, which stripped BigInt/BigRat results and broke modules such as Date::ISO8601.Parallel
perl_test_runner.plpreviously globbed/tmp/perl_test_*to find each child’s JSON summary; under load that could associate the wrong TAP with the wrong.t, producing bogus regressions in saved logs (for exampleop/exec.tincomplete, spuriouscomp/failures). That madecompare_test_logs.pldeltas unreliable for merge gating.Changes
Runtime —
MathOperators:integerDivide,integerDivideWarn, andintegerModuluscallOverloadContext.tryTwoArgumentOverloadwhen either side is overloaded, matching non-integerdivide/modulusbefore falling back to IV arithmetic.dev/tools/perl_test_runner.pl: Each child writes results to/tmp/perl_test_runner_result_<PID>; the parent reads that path for the reaped PID (no shared glob scan).Verification
maketimeout 600 ./jcpan -t Date::ISO8601(PASS)perl dev/tools/perl_test_runner.pl --jobs 10 perl5_t/t/comp perl5_t/t/op/exec.t—bproto.t,filter_exception.t,exec.treport full pass counts after the harness fixNote: PR 731 duplicates the harness commit only; merge this PR (
#729) first and close#731when appropriate.