aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackProtector.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2016-06-07 18:16:39 +0000
committerGreg Clayton <gclayton@apple.com>2016-06-07 18:16:39 +0000
commitc11e249bfdf406dc609048ca88af406007426630 (patch)
treea03a1ec9dd9bbb1c9f066da2b95aee6214621e50 /llvm/lib/CodeGen/StackProtector.cpp
parent1f88b12272b2a59cfbec68dce325dffb6d450196 (diff)
downloadllvm-c11e249bfdf406dc609048ca88af406007426630.zip
llvm-c11e249bfdf406dc609048ca88af406007426630.tar.gz
llvm-c11e249bfdf406dc609048ca88af406007426630.tar.bz2
LLDB is leaking memory in Editline.cpp on MacOSX.
When USE_SETUPTERM_WORKAROUND is enabled, we were calling setupterm() multiple times and leaking memory on each subsequent call. This is now fixed by calling setupterm() once in the constructor and tracking if we have already setup a terminal for a file descriptor. Calls to "el_set (m_editline, EL_ADDFN, ..." were leaking memory. If we switch over to call el_wset with wide strings when LLDB_EDITLINE_USE_WCHAR is set, then we no longer leak memory each time we construct a new Editline object. The calls to "el_set (m_editline, EL_ADDFN, ..." were changed over to call "el_wset (m_editline, EL_ADDFN, ...". Note that when LLDB_EDITLINE_USE_WCHAR is not defined, then el_wset is #define'ed to el_set. All strings are wrapped in EditLineConstString which will use wide strings when needed, and normal C strings when LLDB_EDITLINE_USE_WCHAR is not defined. <rdar://problem/26677627> llvm-svn: 272036
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
0 files changed, 0 insertions, 0 deletions