ICU-12734 Adjust ICUMemCheck.pl for deletion of the Layout Engine.
X-SVN-Rev: 39338
This commit is contained in:
parent
a2e5325ea3
commit
6994b1a557
@ -7,33 +7,27 @@
|
|||||||
# ***********************************************************************
|
# ***********************************************************************
|
||||||
#
|
#
|
||||||
# This perl script checks for correct memory function usage in ICU library code.
|
# This perl script checks for correct memory function usage in ICU library code.
|
||||||
# It works with Linux builds of ICU using gcc.
|
# It works with Linux builds of ICU using clang or gcc.
|
||||||
#
|
#
|
||||||
# To run it,
|
# To run it,
|
||||||
# 1. Build ICU
|
# 1. Build ICU
|
||||||
# 2. cd icu/source
|
# 2. cd icu/source
|
||||||
# 3. perl ICUMemCheck.pl
|
# 3. perl tools/memcheck/ICUMemCheck.pl
|
||||||
#
|
#
|
||||||
# All object files containing direct references to C or C++ runtime library memory
|
# All object files containing direct references to C or C++ runtime library memory
|
||||||
# functions will be listed in the output.
|
# functions will be listed in the output.
|
||||||
#
|
#
|
||||||
# For ICU 3.6, the expected output is
|
# For ICU 58, the expected output is
|
||||||
# common/uniset.o U operator delete(void*)
|
# common/uniset.o U operator delete(void*)
|
||||||
# common/unifilt.o U operator delete(void*)
|
# common/unifilt.o U operator delete(void*)
|
||||||
# common/cmemory.o U malloc
|
# common/cmemory.o U malloc
|
||||||
# common/cmemory.o U free
|
# common/cmemory.o U free
|
||||||
# i18n/strrepl.o U operator delete(void*)
|
# i18n/strrepl.o U operator delete(void*)
|
||||||
# layout/LEFontInstance.o U operator delete(void*)
|
|
||||||
# layout/LEGlyphStorage.o U operator delete(void*)
|
|
||||||
# layout/LayoutEngine.o U operator delete(void*)
|
|
||||||
#
|
#
|
||||||
# cmemory.c Expected failures from uprv_malloc, uprv_free implementation.
|
# cmemory.c Expected failures from uprv_malloc, uprv_free implementation.
|
||||||
# uniset.cpp Fails because of SymbolTable::~SymbolTable()
|
# uniset.cpp Fails because of SymbolTable::~SymbolTable()
|
||||||
# unifilt.cpp Fails because of UnicodeMatcher::~UnicodeMatcher()
|
# unifilt.cpp Fails because of UnicodeMatcher::~UnicodeMatcher()
|
||||||
# strrepl.cpp Fails because of UnicodeReplacer::~UnicodeReplacer()
|
# strrepl.cpp Fails because of UnicodeReplacer::~UnicodeReplacer()
|
||||||
# LayoutEngine.cpp Fails because of LEGlyphFilter::~LEGlyphFilter()
|
|
||||||
# LEGlyphStorage.cpp Fails because of LEInsertionCallback::~LEInsertionCallback()
|
|
||||||
# LEFontInstance.cpp Fails because of LECharMapper::~LECharMapper
|
|
||||||
#
|
#
|
||||||
# To verify that no additional problems exist in the .cpp files, #ifdef out the
|
# To verify that no additional problems exist in the .cpp files, #ifdef out the
|
||||||
# offending destructors, rebuild icu, and re-run the tool. The problems should
|
# offending destructors, rebuild icu, and re-run the tool. The problems should
|
||||||
@ -45,7 +39,7 @@
|
|||||||
# in the destructors will never be called because stand-alone instances of
|
# in the destructors will never be called because stand-alone instances of
|
||||||
# the classes cannot exist.
|
# the classes cannot exist.
|
||||||
#
|
#
|
||||||
$fileNames = `find common i18n layout io -name "*.o" -print`;
|
$fileNames = `find common i18n io -name "*.o" -print`;
|
||||||
foreach $f (split('\n', $fileNames)) {
|
foreach $f (split('\n', $fileNames)) {
|
||||||
$symbols = `nm -u -C $f`;
|
$symbols = `nm -u -C $f`;
|
||||||
if ($symbols =~ /U +operator delete\(void\*\)/) {
|
if ($symbols =~ /U +operator delete\(void\*\)/) {
|
||||||
@ -63,7 +57,7 @@ foreach $f (split('\n', $fileNames)) {
|
|||||||
if ($symbols =~ /U +malloc.*/) {
|
if ($symbols =~ /U +malloc.*/) {
|
||||||
print "$f $&\n";
|
print "$f $&\n";
|
||||||
}
|
}
|
||||||
if ($symbols =~ /U +free.*/) {
|
if ($symbols =~ /(?m:U +free$)/) {
|
||||||
print "$f $&\n";
|
print "$f $&\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user