Undefined CLONES array dereference aborts DBIx::Abstract test on both backends
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
Piste de recherche
Start by reproducing the failure with the upstream t/2-dbix-abstract.t from DBIx-Abstract-1.04, which fails at line 55 on the is( @{$dbh->{'CLONES'}}, 0, ...) assertion. The issue says the standalone expression does not reproduce it, so reduce the disconnect, reconnect and explicit DESTROY sequence before looking into the runtime. Done means the minimized case passes on both JVM and interpreter backends, and t/2-dbix-abstract.t completes all 27 tests.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
DBIx-Abstract-1.04 passes its complete upstream test suite under system Perl but aborts under PerlOnJava on both execution backends. The failure occurs at the CLONES count assertion after a DBIx::Abstract object has been disconnected, reconnected, and another wrapper around its DBI handle has been explicitly destroyed.
Reproduction
Run the upstream t/2-dbix-abstract.t test from distribution DBIx-Abstract-1.04 with Check::ISA-0.09, DBI, and DBD::SQLite available. After the first nine assertions pass, PerlOnJava reports:
Can't use an undefined value as an ARRAY reference at t/2-dbix-abstract.t line 55.
The failing assertion is:
is( @{$dbh->{'CLONES'}}, 0, "no clones yet");
Immediately before it, the test has disconnected and reconnected $dbh, created a second DBIx::Abstract object around $dbh->{'dbh'}, explicitly called $dbh2->DESTROY(), then verified that $dbh is still connected. The CLONES key is absent at this point. System Perl evaluates the array dereference in the is argument list as an empty list and the assertion passes; PerlOnJava aborts while evaluating that expression.
Evidence
- CPAN tester run
20261013-145839-84917, distributionDBIx-Abstract-1.04. - System Perl 5.42.2: full upstream suite passes, 27/27 tests.
Check::ISA-0.09also passes its available tests; its optionalasatest is skipped becauseasais not installed. - PerlOnJava 5.44.1, Java 24.0.2, macOS arm64: the archived JVM run fails at test 10. Re-running the focused upstream file with the archived executable reproduces the same failure on both JVM and interpreter backends.
DBIandDBD::SQLiteload successfully in PerlOnJava, and the first nine DBIx::Abstract assertions pass, ruling out missing DBI/SQLite prerequisites as the cause.- The standalone expression on a fresh hash does not reproduce the failure. The trigger requires the test's DBIx::Abstract connection/reconnect and explicit-destruction sequence.
- GitHub duplicate search found no issue for the
CLONESfailure or this array-dereference behavior. Issue #1419 concerns Valiemon test failures and is unrelated.
Root cause
The confirmed compatibility failure is in PerlOnJava's evaluation of the array dereference in this list-valued Test::More::is argument after the DBIx::Abstract lifecycle sequence. The missing CLONES field should contribute zero list elements, as it does under system Perl; instead, PerlOnJava treats it as an invalid array reference and throws before the assertion can run. The failure is shared by both execution backends, so the defect is in shared runtime semantics rather than backend-specific execution or DBIx::Abstract itself.
The minimal trigger has not yet been reduced below the upstream lifecycle sequence. Investigation should trace how the undefined CLONES hash value and its context are represented after the explicit DESTROY call, then identify why the array dereference is rejected here while ordinary cases pass.
Proposed fix
Correct the shared runtime's handling of an undefined hash-element value dereferenced as an array in list context so that it follows Perl's behavior and yields an empty list in this case. Preserve an integration regression covering the DBIx::Abstract disconnect/reconnect and explicit-DESTROY sequence, and add a smaller unit regression once the trigger is isolated. Validate the new unit test with system Perl first, then require the focused regression and upstream test to pass on both PerlOnJava backends.
Acceptance criteria
- A minimized test that passes with system Perl also passes on JVM and interpreter backends.
t/2-dbix-abstract.tcompletes all 27 tests on both PerlOnJava backends.- The standard-Perl oracle remains green for any new project-owned unit regression.
- Langage dominant
- Perl
- Étoiles
- 64
- Forks
- 7
- Merge moyen
- 5 h 25 min
- PR mergées (30 j)
- 213
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de fglock/PerlOnJava
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
fglock/PerlOnJava#1651 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fglock/PerlOnJava#1579 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port area:unicode bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
fglock/PerlOnJava#1341 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 45/100
fglock/PerlOnJava#1808 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port area:runtime bug
Difficulté 4/5 3-5 jours Accessibilité débutants 28/100
fglock/PerlOnJava#1802 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de fglock/PerlOnJava
Issues similaires
-
Add .gitattributes so share/skel keeps LF on a Windows git checkoutPeut-être pris @sadhana-s-codez l’a pris il y a 1 jour. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
PerlDancer/Dancer2#1854 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
major/MySQLTuner-perl#1007 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 69/100
bioconda/bioconda-recipes#70187 ·
Les mainteneurs répondent en général sous 2 jours