| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This has not been spotted because they have a dependency on $(plextract) which
in turn depends on $(dynamic_ext).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aka [rt.cpan.org #55767] segfault on sqrt(2) with bigrat
The problem seems to be in &Math::BigInt::objectify. It doesn’t try to
convert the number object into the right class if $upgrade is defined.
The attached patch changes it to make sure it belongs to the calling
class or to the $upgrade class.
Here is a ‘one’-liner to trigger the same bug without bigrat:
perl -Ilib -MMath::BigInt=upgrade,Math::BigFloat \
-MMath::BigFloat=upgrade,Math::BigMouse -le \
'@Math::BigMouse::ISA = Math::BigFloat; print sqrt Math::BigInt->new(2)'
|
|
|
|
|
| |
I'm considering that this becomes official with 5.14, so
'stable' is a bit in the future
|
|
|
|
| |
How do I strip blank space from the beginning/end of a string?
|
| |
|
|
|
|
| |
(and make it pass, too)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do it in scope only so die messages fall through when desired.
Previously, there was test code to make sure $@ was not modified when
maketext is called, but if the caller wraps maketext in an eval, then
it's going to be modified anyways to '' at the least. If the caller
does not wrap a maketext call in an eval and maketext dies, then hiding
the $@ simply confuses the person debugging as to what went wrong.
We do however backup/restore $@ so that it does not break any code that
looks might use $@ after a successful call to maketext.
eval {...}
$lm->maketext($@);
do_something_else($@);
In the above example, $@ would be the same when passed to do_something_else
|
|
|
|
|
| |
This patch makes -0.0 stringify as "0" (while leaving sprintf %g/%f
unchanged).
|
|
|
|
|
| |
The & | ^ operators now avoid turning on numericness of read-only
arguments.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The attached patch adds the conversion if the value of the SV
looks_like_number.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The former behaviour of map and grep was to never free any temps.
Thus for large lists (and even worse, nested maps), the tmps stack could
grow very large. For all cases expect list-context map, the fix is easy:
just do a FREETMPS at the end of each iteration.
The list-context map however, needs to accumulate a list of temporaries
over the course of the iterations, and finally return that list to the
caller (which is responsible for freeing them). We get round this by, at
the end of each iteration, directly manipulating the tmps stack to free
everything *except* the values to be returned. To make this efficient,
we splice in the returned tmp items at the base of the stack frame, move
PL_tmps_floor above them, then do a FREETMPS (so they may appear twice on
the temps stack, but initially only get freed once).
|
|
|
|
|
| |
New API function parse_stmtseq() parses a sequence of statements, up to
closing brace or EOF.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A recent discussion on Stackoverflow.com indicated to me that there is
some potential for confusion in the "Indirect Filehandles" section in
perlopentut.pod. See comments to
http://stackoverflow.com/questions/3661161/writing-a-macro-in-perl/3661239#36612
39
The attached patch is my attempt at clarifying that indirect
filehandles are closed when there are no more references to them
rather than simply when the end of the current lexical scope is
reached. I also added an example of returning such a filehandle from a
subroutine.
I am not sure if this is the best way to word it, so I would
appreciate feedback.
The patch is attached.
-- Sinan
|
| |
|
|
|
|
| |
Run `cd`, rather than `cmd /c cd`, in miniperl on Windows.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for all precision possible in NV
numeric.c, in the Perl_my_atof2 function, makes the following assumption:
/* There is no point in processing more significant digits
* than the NV can hold. Note that NV_DIG is a lower-bound value,
* while we need an upper-bound value. We add 2 to account for this;
* since it will have been conservative on both the first and last digit.
* For example a 32-bit mantissa with an exponent of 4 would have
* exact values in the set
* 4
* 8
* ..
* 17179869172
* 17179869176
* 17179869180
*
* where for the purposes of calculating NV_DIG we would have to discount
* both the first and last digit, since neither can hold all values from
* 0..9; but for calculating the value we must examine those two digits.
*/
#define MAX_SIG_DIGITS (NV_DIG+2)
Digits beyond MAX_SIG_DIGITS are ignored. In some systems and/or modes
(e.g., with/without using long doubles), this is not the case. One
example is IRIX when using long doubles, which are not fully IEEE
compliant; with it, while NV_DIG (the _minimum_ number of digits
usable) is 31 for long doubles used as NVs, long doubles can have up
to 34 digits of accuracy. (As well as IRIX with long doubles, other
machines using a mode in which NV is not IEEE compliant (e.g., as
found by the following from numeric.c:
#ifdef ((defined(VMS) && !defined(__IEEE_FP)) || defined(_UNICOS))
(although UNICOS does not by default use Perl's atof in any event) or
as noted in the hints files for DEC OSF with the old MIPS CC) may
benefit from a change to this.) I will attach a test program, example
set of problematic outputs, and experimental patch so others can
explore this on their systems. (With the patch and a
-Accflags='-DMAX_SIG_DIG_PLUS=3' (or
-Accflags='-DMAX_SIG_DIG_PLUS=4'), the test program was
successful. Different values of MAX_SIG_DIG_PLUS may need to be
experimented with, especially with different other Configure/compiler
flags (long doubles yes/no, optimization affecting floating point,
etcetera); 3 was the maximum that did any good on IRIX with long
doubles, but others may differ.) I have done some local testing (as in
the normal testsuite) of the patch and different -DMAX_SIG_DIG_PLUS
values, and will be doing more; it is possible that it would be best
to build in the test program into, say, numconvert.t. Patching
hints/irix_6.sh to use -DMAX_SIG_DIG_PLUS=3 if long doubles are in
use, or a define of MAX_SIG_DIG_PLUS to 3 if defined(IRIX) and long
doubles are in use, is also advisable; I have not included either in my patch
because I was unsure which was recommended practice.
|
|
|
|
|
|
|
|
| |
Suggested by Father Chrysostomos in:
[perl #77500] VMS::Filespec and PVLV globs
Affected routines are candelete_fromperl and rmscopy_from_perl.
|
|
|
|
|
| |
My original fix broke the 'goto redo_body' path. Not that
anything tests for this!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached text files contain patches to correct build problems on the
Stratus VOS (recently renamed "OpenVOS") operating system. I have tested
these changes on OpenVOS Release 17.0, which is the most-current
customer release. None of these changes should affect any other OS.
Makefile.SH: This patch removes the "miniperl" dependency of the "all"
target. On an operating system that does not require an executable
suffix, the miniperl$(EXE_EXT) dependency evaluates to "miniperl", too.
But on an operating system like VOS that does have an executable suffix,
miniperl$(EXE_EXT) evaluates to (in our case) "miniperl.pm" and the
"miniperl" target is unresolved.
ext/Socket/Socket.xs: Sadly, OpenVOS does not yet support IPv6. I edited
the code to allow for this case, while retaining IPv6 support for
operating systems that do support it.
|
|
|
|
|
| |
Add a test to ensure that S_refto returns a SVt_PVLV if the original
is a SVt_PVLV so that the lvalue-ness is preserved.
|
| |
|
|
|
|
| |
As previously written, a test was executed unnecessarily
|
|
|
|
| |
Remove code that duplicates regcurly()
|
| |
|
|
|
|
|
|
| |
eval_sv(sv,G_KEEPERR) is supposed to warn on errors, rather than
set $@; but in the particular case of compile-time errors it still
set $@ instead. See [perl ##3719].
|
|
|
|
|
|
| |
[perl #3719] eval_sv("some syntax err") cleared $@ and didn't return
a failure indication. This also affected eval_pv() which calls eval_sv().
Fix this and add lots of tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently we’ve been getting assertions from gv.t like this:
Assertion failed: (SvTYPE(sv) != SVTYPEMASK), function Perl_sv_clear, file sv.c, line 5783.
This only happens in non-threaded builds and with PERL_DESTRUCT_LEVEL
set to 2 (as in make test).
These started with 13be902 (lvalue-to-glob assignment), but only
because of the tests it added.
The real cause turns out to be f746176, which introduced
gv_try_downgrade.
If a subroutine contains an op that references a downgradable GV, then
gv_try_downgrade, if called on that GV during global destruction,
*might* leave dangling pointers elsewhere; where exactly I wot not.
Since memory-saving operations such as this downgrading are questiona-
ble anyway durng global destruction, skip it, at least for now.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
0.61 Sat Oct 2 11:41:29 2010
- U::C::Locale newly supports locales: hr, ig, sq.
- precomposites of e-dot-below, o-dot-below, o-tilde are tailored as well.
(affected locales: et, yo)
- Vietnamese (vi): added contractions for non-blocked decompositions
* base + dot-below + diacritical such as "a\x{323}\x{306} etc.
* base + tone + horn such as "o\x{300}\x{31B}" etc.
|
| |
|
|
|
|
|
|
|
| |
FD 1 is stdout, and the "<&1" redirect in the test sets the child to
read from its parent's stdout, on Linux (and presumably OS X) doesn't
let you read from stdout, but FreeBSD does, without the -e perl will
try to read its program from stdin, so provide one.
|
|
|
|
|
|
|
|
| |
This reverts commit 92adfbd49af0758bcc9a198cf2df2bd78c4176b9, which
removed a necessary assignment for the sake of consting.
In doing so, it allows subroutine redefinition to work properly again
in the debugger.
|
| |
|
|
|
|
|
|
| |
These were that longjmp calls could clobber certain variables.
Initializing the variables after the place that longjmp returns to
causes the warnings to disappear.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Change the example split output in a "Non-capturing groupings" example
from ('12','a','34','b','5') to ('12','a','34','a','5'). This way
it'll match the example code that goes along with it:
split /(a|b)+/, "12aba34ba5"
Reported-by: Antonio Bonifati <antonio.bonifati@gmail.com>
|
|
|
|
|
| |
Additionally, sort embed.h by public API, then core-or-ext, and finally core
only. This reduces the number of #if/#endif pairs in embed.h and proto.h
|
|
|
|
|
|
|
|
|
|
| |
The excluded routines are aliases, and while there are a lot of
aliases, most of them also exist in mathoms.c so there are actual
symbols to link against. These don't and aren't.
Before a4e744802906bbf8435494e7f5ab1823213b2448, there were quite
a few Perl_pp_xxx and Perl_ck_xxx symbols that were not getting
collected here.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 9de15fec376a8ff90a38fad0ff322c72c2995765 introduced /u, /d, and
/l regex modifiers. Unfortunately, I forgot to adequately account for
them in the space required for the stringification of the regex.
This patch figures out separately if the caret is needed, and if one of
these charset modifiers is needed, and allocates space accordingly.
I could not figure out a simple test case for this fix. valgrind
prior to this will show errors, and after this doesn't.
|
| |
|