diff test/malloc_wx/test_wx.c @ 251:3f7c69fadfc3

- regression fix for changing writable to executable memory for platforms where mmap has no MAP_ANON (usually older platforms, e.g. solaris 7)
author Tassilo Philipp
date Sun, 14 May 2017 02:26:21 +0200
parents 3999750fae28
children f5577f6bf97a
line wrap: on
line diff
--- a/test/malloc_wx/test_wx.c	Sun May 14 00:19:15 2017 +0200
+++ b/test/malloc_wx/test_wx.c	Sun May 14 02:26:21 2017 +0200
@@ -6,7 +6,7 @@
  Description: 
  License:
 
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 
+   Copyright (c) 2007-2017 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -37,8 +37,10 @@
   dcTest_initPlatform();
 
   err = dcAllocWX(23, &ptr);
-  if(!err) err = dcInitExecWX(ptr, 23);
-  if(!err) dcFreeWX(ptr, 23);
+  if(!err) {
+    err = dcInitExecWX(ptr, 23);
+    dcFreeWX(ptr, 23);
+  }
   printf("result: test_alloc_wx: %d\n", (!err) ? 1 : 0 );
 
   dcTest_deInitPlatform();