[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [valgrind] [Bug 337794] memcheck: stack overflow segv message should show callstack
From:       Matthias Schwarzott <zzam () gentoo ! org>
Date:       2014-07-29 6:54:36
Message-ID: bug-337794-17878-Elg7QNzsGb () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=337794

--- Comment #2 from Matthias Schwarzott <zzam@gentoo.org> ---
Created attachment 88005
  --> https://bugs.kde.org/attachment.cgi?id=88005&action=edit
Show addrinfo when SEGV happens

This simple patch changes valgrind to print addrinfo (like gdbserver info
location) when SEGV happens.

There are a lot more possible improvements for stack problems.

Is it guaranteed that each stack is within its own mmap segment?

Ideas:
1. Show memory as below stack if it is not too far below the stack pointer (or
below and within the same segment).

2. Remember if stack segments are mapped (by using MAP_STACK that newer linux
versions have != 0).

3. Improve mprotect PROT_NONE handling. Currently it is a NO-OP (this is to not
lose undefined values in there). It could be changed to set the memory to not
addressible if no undefined values are there (so nothing is lost but mprotect
will be emulated better in lots of cases).

4. Do this per byte. (set not addressible if defined)
5. set all memory to not addressible but remember all undefined addresses in an
extra data-structure to restore on mprotect(PROT_RWX).

6. Do this mprotect handling only for stack segments.

7. Describe non-addressible memory in stack segments as stack redzones.

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic