SEGV in "Subroutine redefined" warning
authorDavid Mitchell <[email protected]>
Thu, 7 Jul 2016 16:03:29 +0000 (17:03 +0100)
committerDavid Mitchell <[email protected]>
Thu, 7 Jul 2016 16:06:58 +0000 (17:06 +0100)
commitfc0fe26a7d286480c1bb25f57e469ece575bb68d
tree35f349bbd88314d4787bc546fdb43831ee1d1a6e
parent6fe82bd6d07db28c9792126ff851a29fe013401c
SEGV in "Subroutine redefined" warning

RT #128257

The following SEGVed:

    sub P::f{}
    undef *P::;
    *P::f =sub{};

due to the code which generates the "Subroutine STASH::NAME redefined"
warning assuming that the GV always has a stash. Make it so that if it
hasn't, the message changes to  "Subroutine NAME redefined" rather than
just crashing.
sv.c
t/lib/warnings/sv