talloc-2.1.12 issues with library destructor
Andreas Schneider
asn at samba.org
Mon Mar 26 16:00:59 UTC 2018
On Monday, 26 March 2018 16:06:26 CEST Ralph Böhme wrote:
> Hi Andreas,
>
> On Mon, Mar 26, 2018 at 03:01:56PM +0200, Andreas Schneider via samba-
technical wrote:
> > destructors are normally executed after the program returns from main() or
> > after exit() is called. talloc tries to clean up its null context memory
> > and you have obviously a talloc destructor defined for your kcm_data
> > talloc context!
> >
> > I don't thinks this is an issue in talloc, but sssd should cleanup the
> > memory in orderly_shutdown() before it calls exit()!
>
> while I agree that we should work on deprecating and later removing
> talloc_autofree, it's currently used and the recent change in commit
> 41b6810ba01f44537f470c806adb8686e1a39c48 in talloc which was aimed at fixing
> long standing Samba bug 7587 seems to cause this regression.
>
> We could try throwing destructor priorizy INT_MAX at the problem hoping
> noone else uses such a high value.
Ah, now I got it, however it is the reverse:
+/* The initialization priority for entities for which no explicit
+ initialization priority has been specified. */
+#define DEFAULT_INIT_PRIORITY 65535
+
+/* The maximum allowed initialization priority. */
+#define MAX_INIT_PRIORITY 65535
+
+/* The largest priority value reserved for use by system runtime
+ libraries. */
+#define MAX_RESERVED_INIT_PRIORITY 100
So you need to set it to 101.
Andreas
--
Andreas Schneider GPG-ID: CC014E3D
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list