Workaround 'array compared to 0', 'untrusted loop bound' false defects
authorIvan Maidanski <ivmai@mail.ru>
Mon, 22 May 2017 22:01:08 +0000 (01:01 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 22 May 2017 22:01:08 +0000 (01:01 +0300)
commit36038e102f52380413c91c2c2205441c0661b6aa
treeb32bd56eb2e236a73eefcab600372356596b9076
parente2f72bd4450977c4ca7dadc28fef9efd6ff9bff1
Workaround 'array compared to 0', 'untrusted loop bound' false defects

* dyn_load.c [SOLARISDL && !USE_PROC_FOR_LIBRARIES]
(GC_FirstDLOpenedLinkMap): Wrap access to dynStructureAddr (which value
obtained from a weak symbol) into COVERT_DATAFLOW() in comparison to 0.
* dyn_load.c [HAVE_DL_ITERATE_PHDR && !DL_ITERATE_PHDR_STRONG]
(GC_register_main_static_data): Wrap access to dl_iterate_phdr weak
symbol into COVERT_DATAFLOW() in comparison to 0.
* dyn_load.c [HAVE_DL_ITERATE_PHDR] (GC_FirstDLOpenedLinkMap): Wrap
access to _DYNAMIC weak symbol into COVERT_DATAFLOW() in comparison to 0.
* include/private/gc_priv.h (TRUSTED_STRING): Pass the argument through
COVERT_DATAFLOW.
* include/private/gcconfig.h (COVERT_DATAFLOW): New macro.
* os_dep.c [SEARCH_FOR_DATA_START] (GC_init_linux_data_start): Wrap
access to __data_start and GC_data_start into COVERT_DATAFLOW() in
comparison to 0.
* tests/disclaim_bench.c: Update comment for include gc_priv.h.
* tests/disclaim_bench.c (main): Pass the integer value obtained from
command-line argument (and which is used as a loop boundary) through
COVERT_DATAFLOW().
* tests/test_cpp.cc (main): Likewise.
dyn_load.c
include/private/gc_priv.h
include/private/gcconfig.h
os_dep.c
tests/disclaim_bench.c
tests/test_cpp.cc