summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Devel::PPPort shouldn't unconditionally -Wdeclaration-after-statementNicholas Clark2021-10-131-1/+9
| | | | Add the flag for gcc for perl v5.34.4 and earlier.
* Introduce a "declaration after statement" into inline.hNicholas Clark2021-10-131-3/+1
| | | | | | | | | The core now permits some C99 code, so extensions need to ensure that any C compiler flags they add or change permit C99 code. This code is inlined by XS extensions in the core and on CPAN. The intent is that this commit should show up for any failure bisection, making it obvious what the cause is, and what the fix needs to be.
* Update README.win32 to the new C99/MSVC 12.0 requirementsNicholas Clark2021-10-131-165/+20
| | | | | | | | | | * Remove specific notes related to Microsoft Visual C++ 2005 Express Edition and earlier * Visual Studio 2013 is the only version that still has Express edition (in addition to Community), so simplify the text by only mentioning Community * Remove the reference to IA64, and mention x86_64 along with x86 * In the context of x86_64, clarify that mingw's binaries can run on both * Update the URL for mingw
* Note how best to confirm that other C99 features can be relied uponNicholas Clark2021-10-131-0/+20
| | | | | If C99 functionality can't be emulated on platforms which don't provide it, then one really needs to test whether MSVC and the VMS compiler support it.
* Update perlhack with details of the C99 features we can now useNicholas Clark2021-10-133-80/+197
| | | | Also update INSTALL to mention C99.
* cflags.sh should not add -std=c99 if -std=gnu99 is already setNicholas Clark2021-10-131-1/+5
| | | | | | | | | | | | Having both looks like it ought to cause the build to fail, as with -std=c99 second it will override any previous -std=gnu99, and some platforms need the former to both compile C99 code and have correct includes during Configure probing. However testing on those platforms without this change doesn't show any errors. So this change doesn't seem to strictly be necessary. But it does prevent our generated compiler command lines having contradictory flags, and hence looking daft.
* Test declarations after statement in Configure's C99 probe codeNicholas Clark2021-10-131-4/+11
| | | | | | | | | | Also ensure that the relevant failure error message is output even with Configure's -s flag, as we shouldn't stay silent for a message that causes Configure default to aborting. With these changes, Configure will fail the C99 probe test if passed -Accflags="-Werror=declaration-after-statement" or -Accflags="-Werror=long-long"
* Teach Configure and cflags.SH about C99Nicholas Clark2021-10-133-76/+78
| | | | | | Probe to see whether we need -std=gnu99 or -std=c99 to get C99 code to compile. In cflags.SH, remove code that added gcc warning flags that were compatible with C89 but are not compatible with C99.
* pp_match: remove is_utf8_string check, used by removed (v5.24) \C char classRichard Leach2021-10-131-1/+1
|
* Leave the checkout `fetch-depth` at its default (1) for most jobsNicholas Clark2021-10-121-16/+8
| | | | | | | The default is a shallow checkout. Keep the full checkout for the "sanity test" job so that it runs all the tests in t/porting. Add a comment explaining the reasoning.
* A CI test that manicheck reports no errors on a clean checkoutNicholas Clark2021-10-121-0/+3
| | | | | | Do this on the "minitest" job as that has no "manicheck" step yet, and the "minitest" job does not have a "matrix", so we only run this actual test once.
* A CI test that manicheck has no errors after `git clean -dxf`Nicholas Clark2021-10-121-0/+6
|
* Add CI tests for `make distclean` and Porting/manicheckNicholas Clark2021-10-121-0/+7
|
* manicheck now optionally exits non-zero if it finds problemsNicholas Clark2021-10-121-6/+32
| | | | | | | This will enable it to be used in a CI test. Refactor the code to avoid the temporary array @files by iterating over the lines of MANIFEST as they are read in.
* In manicheck be explicit that the code is stripping './'Nicholas Clark2021-10-121-2/+3
| | | | | | | | | | | | | | The regex had been written as /^../, which strictly was correct as the string passed would *always* start with './', but this wasn't clear. One had to stop and double check how File::Find::find() works, and what argument it was called with. And it's not exactly clear when the '.' in the regex text matches '.' and then '/', but the '/' in the regex is the delimiter. Given that the regex is being changed, move it later - previously the code was performing a substitution on the value of $File::Find::name before it knew that it needed it. (ie doing work for all directories.)
* Eliminate more uses of `XPVHV* xhv;` to cache `(XPVHV*)SvANY(hv)`Nicholas Clark2021-10-111-13/+7
| | | | | | | | | | | | | | | | Similar to commit 4b6b6165ecccd54b, Perl_hv_clear() should instead read HvMAX(hv) into a local variable. Most other remaining uses no longer saved repeated dereferences, so eliminate the verbosity and replace the explicit dereference with the normal macro (and in some cases delete the comment which echos the macro). In S_hv_free_entries() use HvTOTALKEYS(hv) directly. Whilst this is potentially performing the deference of SvANY(hv) more than once, the structure of the code is such that this will only happen on the last iteration of the loop, or on the unlikely event that the hash contained NULL values. (Such hashes are not legal in "Perl" space, but XS code can create them.)
* perldelta entry describing the HvAUX struct move to the HV bodyNicholas Clark2021-10-111-1/+20
| | | | | | None of this affects documented public XS interfaces. The only code changes are in hv.c and sv.c. As the rest of the core itself uses these macros but needed no changes, likely no code on CPAN will be affected either.
* Re-reading HvAUX(hv) is no longer necessaryNicholas Clark2021-10-111-12/+0
| | | | | | | Now that HvAUX(hv) is allocated as part of the HV's body, it no longer moves in memory if the hash is resized. Hence there is no need to update local copies of the pointer after any potential move, so remove the code that did this.
* Split the XPVHV body into two variants "normal" and "with aux"Nicholas Clark2021-10-116-8/+88
| | | | | | | | Default to the smaller body, and switch to the larger body if we need to allocate a C<struct xpvhv_aux> (eg need an iterator). This restores the previous small size optimisation for hashes used as objects.
* Change S_new_body to static inline, and use it instead of a macroNicholas Clark2021-10-111-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the macro new_body_inline() to new_body_from_arena(). The macro existed to provide an inline implementation for hot code paths, with a small function for the others. Now that we have proper inline functions, change the function to be inlined, and use it instead of the macro. There is no change to the code generated for the hot paths. This makes the source simpler. Yes, this will also inline the function in a couple of other places, but these days optimising compilers often do that anyway for small functions. Even if they aren't for this function (as was), the size of the function itself is comparable with the calling overheads, so it's not a massive penalty. Two if blocks now need to be placed inside #ifndef PURIFY/#endif guards because they now use the function S_new_body(), which is not defined with PURIFY. The code is actually unreachable - defining PURIFY causes all values for new_type_details->arena to be forced to 0 - hence the if was never true under PURIFY. Hence it could have been guarded the same way previously, but for (maybe false) improved readability was not. Previously there wasn't a compilation failure because the unreachable code was using a macro, not a static function, and the macro was always defined, even when not used. Really the macro's definition should have been inside #ifndef PURIFY, so fix this oversight - it is now only defined if it is needed. Retain the macro (with a new name), and split the parameters to the macro. This will make the next commit simpler.
* Move variables in Perl_sv_clear() to a tighter scope.Nicholas Clark2021-10-111-5/+3
| | | | | These three variables don't hold their values between iterations of the while loop, so can be declared within it, to make this obvious.
* Rename HE_SVSLOT to HE_ARENA_ROOT_IXNicholas Clark2021-10-115-17/+35
| | | | | | The longer name more accurately reflects what the constant refers to. Correct the comments describing how some arena roots are re-used.
* Inline S_hv_auxinit_internal() into S_hv_auxinit()Nicholas Clark2021-10-114-23/+11
| | | | The previous commit eliminated the only other use of S_hv_auxinit_internal().
* Delete the do_aux code from S_hsplit()Nicholas Clark2021-10-112-40/+0
| | | | | | | | This existed to handle automatically allocating an "aux" structure for larger hashes, to save a (large) reallocation if they needed to be iterated. Now that we no longer store the aux structure in the main hash array, we don't need to take this precaution.
* No need to set dest->xhv_rand in S_hsplit() called from hv_common()Nicholas Clark2021-10-111-6/+9
| | | | | | | | | | | | | | | | | | | | | Perl_hv_common() only calls S_hsplit() after inserting a new hash key, if the hash meets the "split" criteria. Inserting the new hash key has already set HvAUX(hv)->xhv_rand to PL_hash_rand_bits (if the hash has an aux struct), so no need to repeat the same assignment in S_hsplit() for this case. However, this code path in S_hsplit() can also be reached from Perl_hv_ksplit() for the case of assigning to `keys %hash` for a hash which has an aux struct. The call to `keys` resets the hash iterator (in LVALUE context as well as RVALUE context), but when the assignment changed the bucket size this also had the size effect of causing a new iteration order. It's not clear whether this really matters for security of the internal hash state, but as this behaviour is both observable and can easily be retained, it seems worthwhile adding the small amount of extra code needed to keep it. Hence this commit is (or is intended to be) a pure refactoring, without any observable behaviour change.
* Inline the xhv_aux struct in the main hash bodyNicholas Clark2021-10-113-13/+7
| | | | | For now, memory for this structure is always allocated, even though it isn't always flagged as being present.
* cpan/Encode: synch with CPAN 3.15Dan Kogai2021-10-103-16/+16
| | | | | | Per maintainer, this is a more complete fix for the problem addressed in Encode 3.13: memory leak on FB_CROAK. Certain problems with the sequencing of pull requests have been addressed.
* Whitespace only: reindent #if 0 blockHugo van der Sanden2021-10-101-7/+7
| | | | | Allow diff to spot that changes below here are in S_study_chunk rather than in 'Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n",'
* Merge branch 'perlbug-string-2' into bleadJames E Keenan2021-10-092-2/+2
|\
| * Better email address for Perl 5 PortersJames E Keenan2021-10-092-2/+2
|/
* We're Perl 5 PortersJames E Keenan2021-10-091-1/+1
|
* Retain original whitespace, per rjbs reviewJames E Keenan2021-10-091-1/+1
|
* Send bug reports to GitHubJames E Keenan2021-10-0910-28/+26
| | | | | Mail to 'perlbug@perl.org' now simply triggers a response redirecting sender there.
* Merge branch 'allocation-too-large-gh-17867' into bleadJames E Keenan2021-10-091-4/+0
|\
| * Remove documentation of previously removed warningJames E Keenan2021-10-091-4/+0
|/ | | | | Per https://github.com/Perl/perl5/issues/17867, the warning itself was removed in February 2013.
* perldelta: Fix grammarKarl Williamson2021-10-091-1/+1
|
* Remove NetWare supportDagfinn Ilmari Mannsåker2021-10-08131-19797/+141
| | | | The build has been broken since 2009.
* add OPpUSEINT op_private flag bitDavid Mitchell2021-10-076-144/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | The bitwise ops, such as a '<<', have an op_private flag that is set when compiled within the scope of 'use integer;'. Unfortunately, due to historical reasons, the defined flag that indicates this bit (bit 0) is HINT_INTEGER rather than an OPpfoo define. But HINT_INTEGER is supposed to represent a bit within PL_hints, not a bit within op_private. If someone reorganised the flags in PL_hints at some point, it would mess up bitwise ops. So this commit: 1) adds a new flag, OPpUSEINT, to indicate the bit within op_private. 2) Changes this flag's value from 0x1 to 0x4 to force it to be different than HINT_INTEGER - thus potentially flushing out any misuse of this flag anywhere (in core or XS code). 3) tells regen/op_private that the lower two bits of op_private in bitwise ops don't contain the argument count. They never did, but not specifying that in regen/op_private meant that the debugging code in op_free() never spotted the unknown bit 0 sometimes being set. 4) Also tell that debugging code to skip the test if the op is banned. This fixes a new fail in dist/Safe/t/safeops.t which was croaking about a banned op having an unrecognised op_private flag bit set before ck_bitop() had a chance to delete the arg count in op_private.
* Update HTTP-Tiny to CPAN version 0.078Chris 'BinGOs' Williams2021-10-0724-83/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [DELTA] 0.078 2021-08-02 09:24:03-04:00 America/New_York - No changes from 0.077-TRIAL. 0.077 2021-07-22 13:07:14-04:00 America/New_York (TRIAL RELEASE) [ADDED] - Added a `patch` helper method for the HTTP `PATCH` verb. - If the REQUEST_METHOD environment variable is set, then CGI_HTTP_PROXY replaces HTTP_PROXY. [FIXED] - Unsupported scheme errors early without giving an uninitialized value warning first. - Sends Content-Length: 0 on empty body PUT/POST. This is not in the spec, but some servers require this. - Allows optional status line reason, as clarified in RFC 7230. - Ignore SIGPIPE on reads as well as writes, as IO::Socket::SSL says that SSL reads can also send writes as a side effect. - Check if a server has closed a connection before preserving it for reuse. [DOCS] - Clarified that exceptions/errors result in 599 status codes. [PREREQS] - Optional IO::Socket::IP prereq must be at least version 0.32 to be used. This ensures correct timeout support.
* Update Digest to CPAN version 1.20Chris 'BinGOs' Williams2021-10-076-6/+6
| | | | | | | [DELTA] 1.20 Tue 2021-08-24 - Remove temp files during unit tests.
* Storable is 3.25 on CPANChris 'BinGOs' Williams2021-10-071-1/+1
|
* IO is 1.48 on CPANChris 'BinGOs' Williams2021-10-071-1/+1
|
* cpan/Encode: synch with CPAN 3.13Dan Kogai2021-10-076-527/+5
| | | | | | Address RT#139622. It fixes the memory leak when you set FB_CROAK. Usually that is not a problem because perl dies immediately after the error occurs but that is not the case when you wrap it in eval {}.
* Remove the last traces of the no longer existing cmd_l commandE. Choroba2021-10-071-4/+4
| | | | cmd_l was still mentioned in the documentation and comments.
* rsync perl5.git.perl.org has gone awayNicholas Clark2021-10-061-18/+0
| | | | Delete the section from perlhack.pod that mentioned it.
* bisect-runner.pl must first check that ext/List/Util/Util.xs existsNicholas Clark2021-10-051-2/+2
| | | | | | | | It's a hard error to attempt to patch a file that is not found. ext/List/Util/Util.xs was only added to perl *during* the 5.7.x track. Without this change bisect-runner.pl was unable to build some early revisions of 5.7.x
* bisect-runner.pl should patch SDBM_File for parallel builds.Nicholas Clark2021-10-051-0/+10
| | | | | | | | | | | The fix in commit 4d106cc5d8fd328d: For SDBM_File, stop EU::MM from generating its default subdirs rule. The default subdirs rule creates a race condition with the rule that Makefile.PL explicitly adds to generate libsdbm.a, which can cause parallel makes to fail. is needed for earlier perl versions to.
* bisect-runner.pl should add -Ilib for makedef.pl in Makefile.SHNicholas Clark2021-10-051-0/+12
| | | | | | | | | | | | | The fix from commit 72bbce3da5eeffde: miniperl also needs -Ilib for perl.exp on AIX etc is needed to avoid build failures during parallel makes when makedef.pl is run before all the toolchain modules have been copied into lib/ Specifically -Ilib on the command line to miniperl loads buildcustomize.pl which then sets @INC to include all the toolchain modules directly, whereas setting @INC to lib in a BEGIN block doesn't trigger this complete setup. makedef.pl uses constant, which is dual life and copied from dist/constant/
* Expose a public SAVESTRLEN() macroPaul "LeoNerd" Evans2021-10-053-32/+37
| | | | | | | This seems to have been forgotten in the public API, perhaps because it was added later. Fixes #19165
* Two minor Makefile.SH cleanupsNicholas Clark2021-10-041-2/+1
| | | | | | | | | | | | | | | | | | Use "$osname" instead of (bare) $osname in all case statements. This was the only one that was different. Delete PATH_SEP, which was never used. This was added in Nov 1995 as part of commit 4633a7c4bad06b47: 5.002 beta 1 with various other macros, and the comment "These variables will be used in a future version to make the make file more portable to non-unix systems." The other macros have been used, but not PATH_SEP. Curiously it also gets a different value if one (re)generates Makefile by running ./Makefile.SH, compared with a Makefile generated by Configure, because the variable that it is set from - $p_ - is not in config.sh