]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge r9419 (make describe-block portable) from the DARWIN branch.
authorNicholas Nethercote <njn@valgrind.org>
Sun, 15 Mar 2009 23:59:13 +0000 (23:59 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sun, 15 Mar 2009 23:59:13 +0000 (23:59 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9420

memcheck/tests/describe-block.c
memcheck/tests/describe-block.stderr.exp

index 890db9a9b50ad0bfece21bab5ba826e8f52add80..1cbd3b16c582439fd44acbbf68f300e61201d326 100644 (file)
@@ -2,7 +2,9 @@
 
 int main()
 {
-       VALGRIND_CREATE_BLOCK(0x1000, 0x1000, "magic foople zone");
-       *(char *)0x1000 = 'x';
-       return 0;
+   char magic_foople_zone[0x1000];
+   VALGRIND_CREATE_BLOCK(magic_foople_zone, 0x1000, "magic foople zone");
+   VALGRIND_MAKE_MEM_NOACCESS(magic_foople_zone, 0x1000);
+   magic_foople_zone[0] = 'x';
+   return 0;
 }
index a66b106444fb483df12bbcc572dda82f5006a97c..619931e2b8399e3991720f9fa83d5a81a8d02ea0 100644 (file)
@@ -1,16 +1,8 @@
 
 Invalid write of size 1
-   at 0x........: main (describe-block.c:6)
+   at 0x........: main (describe-block.c:8)
  Address 0x........ is 0 bytes inside a magic foople zone of size 4,096 client-defined
-   at 0x........: main (describe-block.c:5)
-
-Process terminating with default action of signal 11 (SIGSEGV)
- Access not within mapped region at address 0x........
    at 0x........: main (describe-block.c:6)
- If you believe this happened as a result of a stack overflow in your
- program's main thread (unlikely but possible), you can try to increase
- the size of the main thread stack using the --main-stacksize= flag.
- The main thread stack size used in this run was ....
 
 ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
 malloc/free: in use at exit: ... bytes in ... blocks.