This newly added test triggers and breaks VC6 builds on all my win32
machines:
Making GTK
/famine/win32build/test/Pike/7.6/build/windows_xp-5.1.2600-i686/pike -DNOT_INSTALLED -DPRECOMPILED_SEARCH_MORE -m/famine/win32build/test/Pike/7.6/build/windows_xp-5.1.2600-i686/master.pike /famine/win32build/test/Pike/7.6/src/post_modules/GTK/new_build_pgtk.pike --source='/famine/win32build/test/Pike/7.6/src/post_modules/GTK/source/'\
/famine/win32build/test/Pike/7.6/src/post_modules/GTK/output/few.pike
W:\test\Pike\7.6\src\program.c:8075: Fatal error:
VirtualProtect failed, code 87 for:
VirtualProtect( 01331270, 0, PAGE_EXECUTE_READWRITE, &old_prot )
p->num_program: 0
sizeof( p->program[0] ): 1
No stack - no backtrace.
87 is AKA invalid parameter, and yes; a dwSize of 0 probably not
appreciated by VirtualProtect. I haven't digged any deeper in it. Is
make_program_executable() supposed to be handed programs without any
programs in?
Index: src/program.c
===================================================================
RCS file: /pike/data/cvsroot/Pike/7.6/src/program.c,v
retrieving revision 1.573
retrieving revision 1.574
diff -u -u -r1.573 -r1.574
--- src/program.c 4 Jul 2006 14:38:16 -0000 1.573
+++ src/program.c 5 Aug 2006 20:35:41 -0000 1.574
@@ -2,11 +2,11 @@
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
-|| $Id: program.c,v 1.573 2006/07/04 14:38:16 mast Exp $
+|| $Id: program.c,v 1.574 2006/08/05 20:35:41 mast Exp $
*/
#include "global.h"
-RCSID("$Id: program.c,v 1.573 2006/07/04 14:38:16 mast Exp $");
+RCSID("$Id: program.c,v 1.574 2006/08/05 20:35:41 mast Exp $");
#include "program.h"
#include "object.h"
#include "dynamic_buffer.h"
@@ -8069,8 +8069,10 @@
{
#ifdef _WIN32
DWORD old_prot;
- VirtualProtect((void *)p->program, p->num_program*sizeof(p->program[0]),
- PAGE_EXECUTE_READWRITE, &old_prot);
+ if (!VirtualProtect (p->program,
+ p->num_program * sizeof (p->program[0]),
+ PAGE_EXECUTE_READWRITE, &old_prot))
+ Pike_fatal ("VirtualProtect failed, code %d.\n", GetLastError());
#else /* _WIN32 */