From 93926f75c6894e63f1c110cd7be291f28bed09dc Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Tue, 23 Feb 2016 21:09:59 +0000 Subject: [PATCH] No need to call VG_(am_find_nsegment) if the stack is found in the stack cache. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15807 --- coregrind/m_stacks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_stacks.c b/coregrind/m_stacks.c index aac5ebf7f0..56a564f6f0 100644 --- a/coregrind/m_stacks.c +++ b/coregrind/m_stacks.c @@ -270,13 +270,13 @@ void VG_(change_stack)(UWord id, Addr start, Addr end) void VG_(stack_limits)(Addr SP, Addr *start, Addr *end ) { Stack* stack = find_stack_by_addr(SP); - NSegment const *stackseg = VG_(am_find_nsegment) (SP); if (LIKELY(stack)) { *start = stack->start; *end = stack->end; } + NSegment const *stackseg = VG_(am_find_nsegment) (SP); /* SP is assumed to be in a RW segment or in the SkResvn segment of an extensible stack (normally, only the main thread has an extensible stack segment). -- 2.47.2