Bug 487744 - [PATCH] Valgrind coredumps greater than 4GB are unusable and GDB does not interpret them
Summary: [PATCH] Valgrind coredumps greater than 4GB are unusable and GDB does not int...
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.23.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-29 14:07 UTC by chandru.dav@gmail.com
Modified: 2024-05-29 14:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Patch to fix offset overflow (1.08 KB, text/plain)
2024-05-29 14:07 UTC, chandru.dav@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chandru.dav@gmail.com 2024-05-29 14:07:18 UTC
Created attachment 169938 [details]
Patch to fix offset overflow

SUMMARY
    When Valgrind coredumps exceed 4GB, an overflow occurs while computing
    the offset, leading to the corruption of previously written valid
    sections.

STEPS TO REPRODUCE
1.  Run a large binary whose coredump is expected to exceed 4GB in valgrind.
eg: /usr/bin/valgrind --tool=memcheck --track-fds=yes --run-libc-freeres=no --log-file=/valgrind.log --fair-sched=yes --num-callers=20 --leak-check=full --error-limit=no --show-reachable=yes /usr/bin/large_binary
2. Trigger a coredump by sending a kill signal to the valgrind (kill -11 <pid>)
3. Try and examine the resulting coredump generated, using GDB.

OBSERVED RESULT
GDB is not able to load the shared libraries and the backtrace is not shown properly

EXPECTED RESULT
The coredump under GDB should give clear stack traces.

SOFTWARE/OS VERSIONS
Linux