[lkml]   [2018]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] perf script python: Fix dict reference counting

On Mon, Jul 09, 2018 at 01:59:50PM +0300, Janne Huttunen wrote:
> The dictionaries are attached to the parameter tuple that steals
> the references and takes care of releasing them when appropriate.
> The code should not decrement the reference counts explicitly.
> E.g. if libpython has been built with reference debugging enabled,
> the superfluous DECREFs will trigger this error when running perf
> script:
> Fatal Python error: Objects/tupleobject.c:238 object at
> 0x7f10f2041b40 has negative ref count -1
> Aborted (core dumped)
> If the reference debugging is not enabled, the superfluous DECREFs
> might cause the dict objects to be silently released while they are
> still in use. This may trigger various other assertions or just
> cause perf crashes and/or weird and unexpected data changes in the
> stored Python objects.
> Signed-off-by: Janne Huttunen <>

Acked-by: Namhyung Kim <>


 \ /
  Last update: 2018-07-11 10:15    [W:0.047 / U:1.468 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site