Commit fdc3bd8
committed
Warn instead of DIE when a repetition would exhaust RAM
For discussions on #23561.
perl -e 'use warnings; my $x = ($_) ? "A" x (2**62) : "Z"'
gives this on blead for me:
```
Out of memory!
panic: fold_constants JMPENV_PUSH returned 2 at -e line 1.
```
on the previous commit, it would die:
```
Unrealistically large string repetition value"
```
With this commit, it just warns:
```
Unrealistically large string repetition value at -e line 1.
```
but will blow up if the repetition OP does get executed:
```
Out of memory in perl:util:safesysrealloc
```1 parent 3725af9 commit fdc3bd8
2 files changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5025 | 5025 | | |
5026 | 5026 | | |
5027 | 5027 | | |
5028 | | - | |
| 5028 | + | |
5029 | 5029 | | |
5030 | 5030 | | |
5031 | 5031 | | |
5032 | 5032 | | |
5033 | | - | |
| 5033 | + | |
5034 | 5034 | | |
5035 | 5035 | | |
5036 | 5036 | | |
5037 | 5037 | | |
5038 | | - | |
5039 | | - | |
5040 | | - | |
5041 | | - | |
| 5038 | + | |
| 5039 | + | |
| 5040 | + | |
5042 | 5041 | | |
5043 | 5042 | | |
5044 | 5043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7387 | 7387 | | |
7388 | 7388 | | |
7389 | 7389 | | |
7390 | | - | |
| 7390 | + | |
7391 | 7391 | | |
7392 | 7392 | | |
7393 | 7393 | | |
| |||
0 commit comments