This code was sufficiently out-of-date to trip assertions in miniperl,
breaking the build (with -Accflags=-DUSE_BROKEN_PAD_RESET).
We can’t SvPADTMP_off on just anything, because it asserts that the
thing is !SvPADMY.
So check that it has no name first. A pad entry without a name is an
operator target (or an unallocated entry).
The build is still broken, but it gets a bit further.
if (!TAINTING_get) { /* Can't mix tainted and non-tainted temporaries. */
I32 po;
for (po = AvMAX(PL_comppad); po > PL_padix_floor; po--) {
- if (PL_curpad[po] && !SvIMMORTAL(PL_curpad[po]))
+ if (PL_curpad[po] && !SvIMMORTAL(PL_curpad[po])
+ && ( PadnamelistMAX(PL_comppad_name) < po
+ || !PadnamelistARRAY(PL_comppad_name)[po]
+ || !PadnameLEN(PadnamelistARRAY(PL_comppad_name)[po]) ))
SvPADTMP_off(PL_curpad[po]);
}
PL_padix = PL_padix_floor;