The Samba-Bugzilla – Attachment 6183 Details for
Bug 7902
Memory problems in pidl python bindings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
example script
pidl-python-bug-01.py (text/plain), 1.42 KB, created by
Stefan Metzmacher
on 2011-01-06 07:37:39 UTC
(
hide
)
Description:
example script
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2011-01-06 07:37:39 UTC
Size:
1.42 KB
patch
obsolete
>#!/usr/bin/python >print "import start" >from samba.dcerpc import drsblobs >print "import 2" >from samba.ndr import ndr_unpack, ndr_pack, ndr_print >print "import done" >import talloc >def test1(): > i=0 > talloc.enable_null_tracking() > talloc.report_full() > > saltstr = "salt" > > print "here: %s" % (i) > talloc.report_full() > print "here: %s" % (i) > i=i+1 > > krb = drsblobs.package_PrimaryKerberosBlob() > > print "here: %s" % (i) > talloc.report_full() > print "here: %s" % (i) > i=i+1 > > krb.version = 3 > > print "here: %s" % (i) > talloc.report_full() > print "here: %s" % (i) > i=i+1 > > print ndr_print(krb) > > print "here: %s" % (i) > talloc.report_full() > print "here: %s" % (i) > i=i+1 > > # this seems to generate temporary python objects for ctr and ctr.salt > # but they're gone in the following > # talloc.report_full() > # > # adding talloc_report_full(NULL, stdout); > # add the end of > # py_package_PrimaryKerberosString_set_string() > # demonstrates that. > # > # you need this: > # rm bin/default/librpc/gen_ndr/py_drsblobs*.o > # rm bin/default/source4/librpc/python-dcerpc-drsblobs.so > # > krb.ctr.salt.string = saltstr > > print "here: %s" % (i) > talloc.report_full() > print "here: %s" % (i) > i=i+1 > > # this generates valgrind errors, as we have > # references to the deallocated ctr and ctr.salt and ctr.salt.string > # objects > print ndr_print(krb) > > print "here: %s" % (i) > talloc.report_full() > print "here: %s" % (i) > i=i+1 > > return > >if __name__ == '__main__': > test1() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7902
: 6183 |
6184
|
6185