pytest/segfault: segfault with nameless element
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 12 Apr 2019 23:29:15 +0000 (11:29 +1200)
committerNoel Power <npower@samba.org>
Tue, 23 Apr 2019 18:00:13 +0000 (18:00 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
python/samba/tests/segfault.py
selftest/knownfail.d/python-segfaults

index 38dcb5c703611deeaec37df574826fb10ef99b55..b95c1ef5fa9ec79b35b4c7784235d7ceb73f7355 100644 (file)
@@ -124,3 +124,13 @@ class SegfaultTests(samba.tests.TestCase):
             registry.open_ldb('', credentials=42)
         except ldb.LdbError as e:
             print("failed with %s" % e)
             registry.open_ldb('', credentials=42)
         except ldb.LdbError as e:
             print("failed with %s" % e)
+
+    @segfault_detector
+    def test_ldb_add_nameless_element(self):
+        m = ldb.Message()
+        e = ldb.MessageElement('q')
+        try:
+            m.add(e)
+        except ldb.LdbError:
+            pass
+        str(m)
index c8331d941ef3745e8c980e56fb43e1f64ea956a1..bc2a71610a127a723193805f259cbe4ad0506ee0 100644 (file)
@@ -4,3 +4,4 @@ samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_hive_open_ldb
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_chunk_1
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__1
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__3
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_chunk_1
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__1
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__3
+samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_ldb_add_nameless_element