VG_(get_StackTrace_with_deltas) might peel extra glibc syscall
(cancel) frames. But if the backtrace failed, or only contains such
syscall frames then we should keep at least one (the initial frame will
always be there). Various routines expect n_ips of a Stacktrace to be
at least 1.
https://bugs.kde.org/show_bug.cgi?id=507188
506970 mmap needs an EBADF fd_allowed check
507033 Remove deprecated Iop_Clz32/64 and Iop_Ctz32/64
507173 s390x: Crash when constant folding is disabled
+507188 memcheck with track-fds=yes on x86 with popen: Assertion
507720 Review syscalls returning file descriptors (other platforms)
507721 Wire up illumos and Solaris mallinfo
507853 faccessat and faccessat2 should handle AT_FDCWD and absolute paths
Int i;
Int start = 0;
DiEpoch ep = VG_(current_DiEpoch)();
- for (i = 0; i < found; i++) {
+ /* We want to keep at least one frame. */
+ for (i = 0; i < found - 1; i++) {
/* This could be made a little more efficient by doing the lookups
for the symbols at glibc load time and check the address falls
inside the function symbol address range here. But given this