fix: CORE:: builtins, 32-bit <<, Image::BMP, Inline jcpan#747
Merged
Conversation
Honor CORE:: when resolving builtin prototypes so package subs like sub close () do not shadow CORE::close($fh) at compile time. Implement Perl-style widening for non-integer left shift when shift is 32..63 so 1<<32 sets ColorsUsed correctly in Image::BMP headers. Fixes ./jcpan -t Image::BMP. Generated with [Cursor](https://cursor.com/docs) Co-Authored-By: Cursor <cursoragent@cursor.com>
- Treat jar:PERL5LIB paths as stable absolutes in Internals::abs_path so
Inline::derive_minus_I never emits bare -I flags.
- Implement perlrun-style alternate shebang delegation for wrappers such as
inc/bin/testml-cpan (word-boundary perl/indir detection, skip self-exec,
spawn via PERLONJAVA_EXECUTABLE when the wrapper targets jperl).
- Preserve argv spelling when delegating so TestML path rewrites stay relative.
- In diagnostics.pm death_trap, detect eval context from "(eval N) line"
when caller lacks an (eval) frame under $SIG{__DIE__}.
Verified: make; ./jcpan -t Inline
Generated with [Cursor](https://cursor.com/docs)
Co-Authored-By: Cursor <cursoragent@cursor.com>
PerlOnJava reports ivsize=4; UV left shift must yield 0 when shift >= 32 (see perl5_t/t/op/bop.t). Drop BigInteger widening for default <<. Image::BMP used 1<<BitCount for ColorsUsed; on 32-bit IV that is wrong for 32 bpp. Vendor Image::BMP 1.26 with 2** for those cases and add a CPAN distropref + patch for Image-BMP-1.26 so jcpan installs get the same fix. Generated with [Cursor](https://cursor.com/docs) Co-Authored-By: Cursor <cursoragent@cursor.com>
b85b16e to
eada88a
Compare
The 32-bit IV fix stays in PerlOnJava/CpanPatches and distroprefs so jcpan installs apply it; no full module under src/main/perl/lib/. Generated with [Cursor](https://cursor.com/docs) 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
Image::BMPsub close ()vsCORE::close($fh)). Unit coverage:core_qualified_builtin_prototype.t.use integer<< keeps 32-bit UV semantics: shifts ≥ 32 yield 0 (ivsize=4;perl5_t/t/op/bop.tUV block). The prior widening (1<<32→ NV) was removed as inconsistent with this model.Image-BMP.yml+CpanPatches/Image-BMP-1.26/BMP.pm.patchandCPAN::Configbootstrap apply2**$bitswhere1<<$bitswould be wrong whenBitCountcan be 32. No bundledImage::BMPin the tree; users install from CPAN /jcpanas usual../jcpan -t Inlinepass (Internals::abs_path, shebang, etc.).Test plan
maketimeout 120 ./jperl perl5_t/t/op/bop.t(spot-check UV shift tests; other failures may be pre-existing)timeout 300 ./jcpan -t Image::BMP(after fresh install / patch apply)timeout 300 ./jcpan -t Inline