# New Ticket Created by Pip Cet # Please include the string: [perl #133072] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=133072 > I just came across the following problem on blead: S_init_main_stash contains the code: PL_curstash = PL_defstash = (HV *)SvREFCNT_inc_simple_NN(newHV()); SvREFCNT_inc_simple_NN is defined as: #define SvREFCNT_inc_simple_NN(sv) (++(SvREFCNT(sv)),MUTABLE_SV(sv)) That evaluates its argument twice, which breaks with side effects. So newHV() is called twice, one of the new HVs gets refcount 2 and gets leaked, the other gets refcount 1 and gets stored in two places. I suspect this is low-priority, but there might be a way to actually destroy the stash while it is still stored in PL_defstash, in which case it's a user-visible bug.Thread Next