develooper Front page | perl.perl5.porters | Postings from March 2017

Re: [perl #131046] [PATCH] Carp: Do not crash when reading @DB::args

Thread Previous | Thread Next
From:
Zefram
Date:
March 25, 2017 21:39
Subject:
Re: [perl #131046] [PATCH] Carp: Do not crash when reading @DB::args
Message ID:
20170325213942.GA6453@fysh.org
via RT wrote:
>This patch safely iterates all elements of @DB::args array

It's not safe.  The underlying problem is stack refcounting, leading to
@DB::args pointing into freed memory.  Interpreting freed memory as SV
structures fundamentally cannot be made safe.  A patch like this would
avoid crashing in a few specific cases, where you're lucky enough that
the freed memory is still recognisable as freed, but this is neither
necessary nor sufficient in order to avoid crashing.

This manifestation of the stack refcounting problem can only be solved
by actually fixing stack refcounting.  In the meantime I'm disinclined
to apply any such inadequate bandaid.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About