]> granicus.if.org Git - gc/commit
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>
Tue, 23 May 2017 22:31:07 +0000 (01:31 +0300)
commitfbc0be170f446a315009d04c6945dc2938c85205
treecf730a87d10992c27d323c1b2d730b5d66da13ad
parenta38688ff8b4a2be1e0a7aa4935ee1ae57ea12a53
Workaround 'array compared to 0', 'untrusted loop bound' false defects
(Cherry-pick commit 36038e1 from 'master' branch.)

* 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