]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Actually call VG_(first_and_last_secondaries_look_plausible) and make
authorJulian Seward <jseward@acm.org>
Tue, 7 May 2002 23:45:03 +0000 (23:45 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 7 May 2002 23:45:03 +0000 (23:45 +0000)
assertions about the return value, rather than asserting the
non-NULL-ness of the function's address :) Classic beginner's mistake,
compounded by C's crappy (non-existent) type system, which allows me
to silently confuse Bool with Pointer-to-Function.  What a great
programming language.  Come back Haskell, all is forgiven.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@228

coregrind/vg_memory.c
vg_memory.c
vg_syscall_mem.c

index a6a2c5d92962bfd740a1b8c07d49ceb52db4108d..f39592a16ef499b914f1b9730f52a118189275c2 100644 (file)
@@ -539,7 +539,7 @@ static void set_address_range_perms ( Addr a, UInt len,
       -- this could happen with buggy syscall wrappers.  Today
       (2001-04-26) had precisely such a problem with
       __NR_setitimer. */
-   vg_assert(VG_(first_and_last_secondaries_look_plausible));
+   vg_assert(VG_(first_and_last_secondaries_look_plausible)());
    VGP_POPCC;
 }
 
@@ -2219,7 +2219,7 @@ void VG_(do_sanity_checks) ( Bool force_expensive )
 
       /* Check that nobody has spuriously claimed that the first or
          last 16 pages of memory have become accessible [...] */
-      vg_assert(VG_(first_and_last_secondaries_look_plausible));
+      vg_assert(VG_(first_and_last_secondaries_look_plausible)());
    }
 
    /* --- Now some more expensive checks. ---*/
index a6a2c5d92962bfd740a1b8c07d49ceb52db4108d..f39592a16ef499b914f1b9730f52a118189275c2 100644 (file)
@@ -539,7 +539,7 @@ static void set_address_range_perms ( Addr a, UInt len,
       -- this could happen with buggy syscall wrappers.  Today
       (2001-04-26) had precisely such a problem with
       __NR_setitimer. */
-   vg_assert(VG_(first_and_last_secondaries_look_plausible));
+   vg_assert(VG_(first_and_last_secondaries_look_plausible)());
    VGP_POPCC;
 }
 
@@ -2219,7 +2219,7 @@ void VG_(do_sanity_checks) ( Bool force_expensive )
 
       /* Check that nobody has spuriously claimed that the first or
          last 16 pages of memory have become accessible [...] */
-      vg_assert(VG_(first_and_last_secondaries_look_plausible));
+      vg_assert(VG_(first_and_last_secondaries_look_plausible)());
    }
 
    /* --- Now some more expensive checks. ---*/
index 3ef4904c550f0866082068629716f1d336e98fea..6a9826718834e55f6fa6b6419f4bf617fdb63c0e 100644 (file)
@@ -365,7 +365,7 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
 
    /* Since buggy syscall wrappers sometimes break this, we may as well 
       check ourselves. */
-   if (! VG_(first_and_last_secondaries_look_plausible))
+   if (! VG_(first_and_last_secondaries_look_plausible)())
       sane_before_call = False;
 
    /* the syscall no is in %eax.  For syscalls with <= 5 args,
@@ -2861,7 +2861,7 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
 
    /* { void zzzmemscan(void); zzzmemscan(); } */
 
-   if (! VG_(first_and_last_secondaries_look_plausible))
+   if (! VG_(first_and_last_secondaries_look_plausible)())
       sane_before_call = False;
 
    if (sane_before_call && (!sane_after_call)) {
@@ -2908,7 +2908,7 @@ void VG_(check_known_blocking_syscall) ( ThreadId tid,
    VGP_PUSHCC(VgpSyscall);
 
    if (res != NULL
-       && ! VG_(first_and_last_secondaries_look_plausible))
+       && ! VG_(first_and_last_secondaries_look_plausible)())
       sane_before_post = False;
 
    switch (syscallno) {
@@ -2965,7 +2965,7 @@ void VG_(check_known_blocking_syscall) ( ThreadId tid,
    }
 
    if (res != NULL) { /* only check after syscall */
-      if (! VG_(first_and_last_secondaries_look_plausible))
+      if (! VG_(first_and_last_secondaries_look_plausible)())
          sane_after_post = False;
 
       if (sane_before_post && (!sane_after_post)) {