Bug 390498 - Valgrind reports errors without full backtrace on arm64
Summary: Valgrind reports errors without full backtrace on arm64
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.13.0
Platform: Android Linux
: NOR minor
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-15 10:08 UTC by Reuben Thomas
Modified: 2018-08-06 09:37 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Thomas 2018-02-15 10:08:00 UTC
(Slightly surprised I didn't find anything about this by searching Bugzilla, so apologies if I've overlooked an existing bug.)

I get two main sorts of error:

==3230== 8 bytes in 1 blocks are definitely lost in loss record 1 of 5
==3230==    at 0x4A23B44: operator new(unsigned long) (in /data/data/com.termux/files/usr/lib/valgrind/vgpreload_memcheck-arm64-linux.so)

and:

==3374== Source and destination overlap in memcpy(0x4a20b20, 0x4a20b20, 80)
==3374==    at 0x4957724: memcpy (in /data/data/com.termux/files/usr/lib/valgrind/vgpreload_memcheck-arm64-linux.so)

As you can see, I'm using valgind in Termux, and indeed with the stock Termux package, in case that helps.
Comment 1 Reuben Thomas 2018-02-15 10:23:05 UTC
I'm sorry, I think I've misunderstood the logs: it's not reporting leaks etc. in vgpreload_memcheck-arm64-linux.so, it's that I would expect a further backtrace, but there isn't anything other than the lines I showed above. Still something odd going on…
Comment 2 Reuben Thomas 2018-02-15 10:25:26 UTC
I mean, specifically, no callers are listed (no "by" lines).
Comment 3 Tom Hughes 2018-02-15 10:43:08 UTC
That probably means you have stripped all the unwind information from vgpreload_memcheck-arm64-linux.so so valgrind is unable to unwind the stack to the next function.
Comment 4 Reuben Thomas 2018-02-15 10:46:55 UTC
As I said, it's a stock build. So looks like a problem with the Termux build, I'll investigate that. Thanks!
Comment 5 Reuben Thomas 2018-02-15 14:50:44 UTC
I've filed https://github.com/termux/termux-packages/issues/2148
Comment 6 Julian Seward 2018-08-06 08:42:25 UTC
(In reply to rrt from comment #5)
> I've filed https://github.com/termux/termux-packages/issues/2148

Hi!  I fixed some debuginfo reading stuff for arm64-linux recently
(within the past month) so it might be worth you trying the git
trunk, to see if this still happens.
Comment 7 Reuben Thomas 2018-08-06 09:37:28 UTC
Sorry, I didn't say that a rebuild fixed it; a Termux script (termux-elf-cleaner) used to remove some supposedly unneeded stuff from ELF binaries was found to be the culprit.