Commit 033a494
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 033a494
1 file changed
+5
-6
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 | | |
| |||
0 commit comments