]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Assert that the indirect function wrapper exists if we encounter a
authorTom Hughes <tom@compton.nu>
Mon, 16 Nov 2009 09:06:09 +0000 (09:06 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Nov 2009 09:06:09 +0000 (09:06 +0000)
redirection for an indirect function.

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

coregrind/m_redir.c

index 9eddc57b645c047e11147ae2f9b941789f143191..4dde33fe1f94b370a72bde975207e2827fe91b0f 100644 (file)
@@ -809,8 +809,10 @@ Addr VG_(redir_do_lookup) ( Addr orig, Bool* isWrap )
    vg_assert(r->to_addr != 0);
    if (isWrap)
       *isWrap = r->isWrap || r->isIFunc;
-   if (r->isIFunc)
+   if (r->isIFunc) {
+      vg_assert(iFuncWrapper);
       return iFuncWrapper;
+   }
    return r->to_addr;
 }