Fix register_dynamic_libraries on Windows 10
authorNaoyuki Sawa <sawa_naoyuki-1@yahoo.co.jp>
Wed, 2 May 2018 04:10:23 +0000 (13:10 +0900)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 3 May 2018 07:02:15 +0000 (10:02 +0300)
commit19bf43c604522a24d74783e51d3e8661e5ef4bc6
treef6a10febd406ba7f66444e495db74cb8a109a1f0
parentb76c7a02ab8393d2602351ef61908aa5d32d44d9
Fix register_dynamic_libraries on Windows 10

Issue #219 (bdwgc).

In the past (Windows XP, Windows 7, and older Windows 10), VirtualQuery
always returned PAGE_READWRITE for the data section.
In the April 2018 Update of Windows 10, it seems that PAGE_WRITECOPY
is returned sometimes (thus causing GC_register_dynamic_libraries not
to call GC_cond_add_roots for the section).

* dyn_load.c [MSWIN32 || MSWINCE || CYGWIN32]
(GC_register_dynamic_libraries): Call GC_cond_add_roots()
also for PAGE_EXECUTE_WRITECOPY and PAGE_WRITECOPY pages.
dyn_load.c