Issue 8143 - SegV in ~LDAPCtrl()
Summary: SegV in ~LDAPCtrl()
Status: UNCONFIRMED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: contrib (show other issues)
Version: 2.4.40
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-14 09:19 UTC by jianying.luo@alcatel-lucent.com
Modified: 2022-04-11 19:14 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jianying.luo@alcatel-lucent.com 2015-05-14 09:19:29 UTC
Full_Name: Jianying Luo
Version: 2.4.40
OS: RHEL 2.6.32-504.12.2.el6.x86_64
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (135.245.8.3)


Hi,
From the 2.4.40 changelog, I saw 
   "Fixed ldapc++ memory leak in Async connection (ITS#7806)".

The code change is at
openldap-2.4.40/contrib/ldapc++/src/LDAPAsynConnection.cpp


-Del- 46 LPAsysynConnection::~LDAPAsynConnection(){}
+Add+ 46 LDAPAsynConnection::~LDAPAsynConnection(){
+Add+ 47 unbind();
+Add+ 48 delete m_constr;
+Add+ 49 }

But this caused a segV

#0  0x00c40a79 in __gnu_cxx::__exchange_and_add(int volatile*, int) () from
/usr/lib/libstdc++.so.6
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.149.el6_6.5.i686 libgcc-4.4.7-11.el6.i686
libstdc++-4.4.7-11.el6.i686
(gdb) bt
#0  0x00c40a79 in __gnu_cxx::__exchange_and_add(int volatile*, int) (9 9 from
/usr/lib/libstdc++.so.6
#1  0x005e05c1 in 
::~LDAPCtrl() () from /opt/LU3P/lib/libldapcpp.so.0
#2  0x005e0c7f in LDAPControlSet::~LDAPControlSet() () from
/opt/LU3P/lib/libldapcpp.so.0
#3  0x005e02a3 in LDAPConstraints::~LDAPConstraints() () from
/opt/LU3P/lib/libldapcpp.so.0
#4  0x005da82f in LDAPAsynConnection::~LDAPAsynConnection() () from
/opt/LU3P/lib/libldapcpp.so.0
#5  0x005dfa98 in LDAPConnection::~LDAPConnection() () from
/opt/LU3P/lib/libldapcpp.so.0
#6  0x005dfac2 in LDAPConnection::~LDAPConnection() () from
/opt/LU3P/lib/libldapcpp.so.0
#7  0x0805e189 in CpmLDAPOper::~CpmLDAPOper (this=0x82fc630, __in_chrg=<value
optimized out>)
    at ../../../../../../glob/src/cpm_daemon/CpmLDAPOper.cpp:54
#8  0x0806486a in CpmMonMain::ReadFeatureOption (this=0x82fa228, force=1 '\001')
at ../../../../../../glob/src/cpm_daemon/CpmMonMain.cpp:332
#9  0x08065c8c in CpmMonMain::CheckState (this=0x82fa228) at
../../../../../../glob/src/cpm_daemon/CpmMonMain.cpp:473
#10 0x08065ec0 in CpmMonMain::LoopWork (this=0x82fa228) at
../../../../../../glob/src/cpm_daemon/CpmMonMain.cpp:256
#11 0x0805348a in CpmMainBase::Run (this=0x82fa228, argc=1, argv=0xffcbe944) at
../../../../../../glob/src/cpm_daemon/CpmMainBase.cpp:156
#12 0x0806435d in main (argc=1, argv=0xffcbe944) at
../..F.F../../../../glob/src/cpm_daemon/CpmMonMain.cpp:517
(gdb) q



Thanks,
Jianying
Comment 1 Quanah Gibson-Mount 2017-04-12 16:48:50 UTC
moved from Incoming to Software Bugs
Comment 2 Quanah Gibson-Mount 2021-07-07 16:02:56 UTC
patches to fix welcome