lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 31 May 2010 23:07:38 +0200
From:	Pierre Tardy <tardyp@...il.com>
To:	Tom Zanussi <tzanussi@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] trace-event-python: give field dict to unhandled callback

> The if statement expands to:
>
> if (!handler)
>  if ( --(dict)->ob_refcnt != 0) ; else
> ( (*((PyObject*)(dict))->ob_type->tp_dealloc)((PyObject *)((PyObject
> *)(dict))));
>
yeah, in python2.6 at least,  Py_DECREF is protected by do{ } while(0)
#define Py_DECREF(op)                                   \
        do {                                            \
            if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA   \
                --((PyObject*)(op))->ob_refcnt != 0)    \
                    _Py_CHECK_REFCNT(op)                \
            else                                        \
                _Py_Dealloc((PyObject *)(op));          \
        } while (0)

>       if (!handler) {
>               Py_DECREF(dict);
>       }

See a simpler fix in my next email.

-- 
Pierre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ