Discussion:
Valgrind: r16221 - /trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
(too old to reply)
s***@valgrind.org
2017-02-08 08:27:36 UTC
Permalink
Raw Message
Author: sewardj
Date: Wed Feb 8 08:27:34 2017
New Revision: 16221

Log:
am_munmap_both_wrk: safely initialise out-param for all return paths.
Silences what I think is a false complaint from gcc at -O3.

Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c

Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Wed Feb 8 08:27:34 2017
@@ -2773,6 +2773,9 @@
Bool d;
SysRes sres;

+ /* Be safe with this regardless of return path. */
+ *need_discard = False;
+
if (!VG_IS_PAGE_ALIGNED(start))
goto eINVAL;

Loading...