]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
rollback revision 15807, find segment is to be called anyway
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 23 Feb 2016 21:12:38 +0000 (21:12 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 23 Feb 2016 21:12:38 +0000 (21:12 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15808

coregrind/m_stacks.c

index 56a564f6f09138e5a155395975363cf97c30d6d3..aac5ebf7f0f5b35f392c6156b7ce336f60f90c8c 100644 (file)
@@ -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).