develooper Front page | perl.perl5.porters | Postings from August 2018

[perl #133422] static assert is failing on windows in PerlIO

karl williamson
August 3, 2018 15:44
[perl #133422] static assert is failing on windows in PerlIO
Message ID:
# New Ticket Created by  karl williamson 
# Please include the string:  [perl #133422]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from khw@khw-xps-8930.(none),
generated with the help of perlbug 1.41 running under perl 5.29.2.

In, for example,, we are getting

scalar.xs: In function 'PerlIOScalar_read':
   ..\..\lib\CORE/perl.h:3430:36: error: static assertion failed: 
"sizeof(long) >= sizeof(len)"
   ..\..\lib\CORE/perl.h:3446:52: note: in expansion of macro 
   scalar.xs:189:9: note: in expansion of macro 'STATIC_ASSERT_STMT'

The code in scalar.xs, is

	/* I assume that Off_t is at least as large as len (which
	 * seems safe) and that the size of the buffer in our SV is
	 * always less than half the size of the address space
	STATIC_ASSERT_STMT(sizeof(Off_t) >= sizeof(len));
	assert(len < ((~(STRLEN)0) >> 1));

all quoted lines are from

commit 63d073d27fe50d823f0e3c528ac62c9aa584704d
  Author: Tony Cook <>
  Date:	 Wed Dec 17 13:32:43 2014 +1100

      [perl #123443] avoid overflowing got into a negative number

Site configuration information for perl 5.29.2 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About