On Mon 07 Jan 2013 02:19:49 PM EST, Jakub Hrozek wrote:
On Mon, Jan 07, 2013 at 02:09:02PM -0500, Stephen Gallagher wrote:
One concern I expressed to Simo on IRC is that we'd have to be more
careful with long-lived requests such as resolving deep nested group
memberships, otherwise the parent context will grow out of control.
If SSS_FREE_MEM_CTX was used rigorously, then it would be much less of
an issue. Maybe we could write a small GCC plugin to issue a warning for
functions that call SSS_MEM_CTX but not SSS_FREE_MEM_CTX.
I'm not really familiar with GCC plugins, but can we model that to
detect whether a branch decision could allow it to exit without
calling SSS_FREE_MEM_CTX? I think some of the static analysis tools
like Coverity can do this, but I don't know if GCC itself can.
There is a plugin that tracks reference counts in Python plugins written
in C:
https://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html#reference-count-checking
I haven't seen its source code so I can't comment on how easy/hard it
is, but it seems doable.
Looks like it was written by Dave Malcolm. I'll talk with him and see
what his thoughts are on that. Thanks for the pointer.
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel