Skip to content

Revert "Attempt to remove deprecated sv_locking/unlocking" #23475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2025

Conversation

khwilliamson
Copy link
Contributor

This reverts commit 3afafdb.

It turns out that Perl_sv_nounlocking() is the mechanism that is used to make sure mathoms.c gets loaded, as the comments in the reverted commit say, but which I had not noticed.

Without this function being in mathoms.c, some build configurations will not load mathoms, leaving other functions in mathoms.c undefined, as happened with the two issues this fixes.

This commit could be reinstated if another method is created to force mathoms to be loaded;

This fixes #23473
This fixes #23474

  • This set of changes requires a perldelta entry, and it is included.

This reverts commit 3afafdb.

It turns out that Perl_sv_nounlocking() is the mechanism that is used to
make sure mathoms.c gets loaded, as the comments in the reverted commit
say, but which I had not noticed.

Without this function being in mathoms.c, some build configurations will
not load mathoms, leaving other functions in mathoms.c undefined, as
happened with the two issues this fixes.

This commit could be reinstated if another method is created to force
mathoms to be loaded;

This fixes Perl#23473
This fixes Perl#23474
Copy link
Contributor

@jkeenan jkeenan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this p.r. is applied, the deprecations are clearly indicated in the respective modules' build-time warnings.

Unicode::UTF8

In file included from UTF8.xs:6:
ppport.h:4594: warning: "WIDEST_UTYPE" redefined
 4594 | #  define WIDEST_UTYPE U64TYPE
      | 
In file included from /home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/lib/perl5/5.43.2/x86_64-linux/CORE/perl.h:3297,
                 from UTF8.xs:3:
/home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/lib/perl5/5.43.2/x86_64-linux/CORE/handy.h:1417: note: this is the location of the previous definition
 1417 | #define WIDEST_UTYPE PERL_UINTMAX_T
      | 
UTF8.xs: In function ‘xs_utf8_encode_replace’:
UTF8.xs:329:9: warning: ‘Perl_utf8n_to_uvuni’ is deprecated [-Wdeprecated-declarations]
  329 |         v = utf8n_to_uvuni(src, len, &skip, (UTF8_ALLOW_ANYUV|UTF8_CHECK_ONLY) & ~UTF8_ALLOW_LONG);
      |         ^
In file included from /home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/lib/perl5/5.43.2/x86_64-linux/CORE/perl.h:6162:
/home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/lib/perl5/5.43.2/x86_64-linux/CORE/proto.h:6136:1: note: declared here
 6136 | Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
      | ^~~~~~~~~~~~~~~~~~~
rm -f blib/arch/auto/Unicode/UTF8/UTF8.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector-strong  UTF8.o  -o blib/arch/auto/Unicode/UTF8/UTF8.so  \
      \
  
chmod 755 blib/arch/auto/Unicode/UTF8/UTF8.so
  CHANSEN/Unicode-UTF8-0.62.tar.gz
  /usr/bin/make -- OK

JSON::XS

cc -c   -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"4.03\" -DXS_VERSION=\"4.03\" -fPIC "-I/home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/lib/perl5/5.43.2/x86_64-linux/CORE"   XS.c
XS.xs: In function ‘decode_utf8’:
XS.xs:207:5: warning: ‘Perl_utf8n_to_uvuni’ is deprecated [-Wdeprecated-declarations]
  207 |     return utf8n_to_uvuni (s, len, clen, UTF8_CHECK_ONLY);
      |     ^~~~~~
In file included from /home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/lib/perl5/5.43.2/x86_64-linux/CORE/perl.h:6162,
                 from XS.xs:2:
/home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/lib/perl5/5.43.2/x86_64-linux/CORE/proto.h:6136:1: note: declared here
 6136 | Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
      | ^~~~~~~~~~~~~~~~~~~
rm -f blib/arch/auto/JSON/XS/XS.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector-strong  XS.o  -o blib/arch/auto/JSON/XS/XS.so  \
      \
  
chmod 755 blib/arch/auto/JSON/XS/XS.so
cp bin/json_xs blib/script/json_xs
"/home/jkeenan/testing/gh-23475-khwilliamson-revert_unlocking-20250725/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/json_xs
  MLEHMANN/JSON-XS-4.03.tar.gz
  /usr/bin/make -- OK

@khwilliamson khwilliamson merged commit f3a5b2b into Perl:blead Jul 26, 2025
34 checks passed
@khwilliamson khwilliamson deleted the revert_unlocking branch July 26, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BBC: Blead Breaks Unicode::UTF8 BBC: Blead Breaks JSON::XS
2 participants