malloc assertion failure on ARM64
Trying to run the basic usage sample from the README fails with a malloc assertion error.
The sample is linked against a version of benchmark which as built on the same system. (a96ff12)
The tests run without failure.
Environment
- Linux version 4.4.38-tegra
- gcc version 4.8.5
- Arch and hwcaps: ARM64, LittleEndian, baseline
- Page sizes currently 4096, max supported 65536
Error message
Benchmark: malloc.c:2394: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Valgrind output
[Step 4/4] ==26587== 1 errors in context 1 of 6:
[12:44:01] [Step 4/4] ==26587== Invalid read of size 8
[12:44:01] [Step 4/4] ==26587== at 0x40E1C4: benchmark::internal::BenchmarkFamilies::FindBenchmarks(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<benchmark::internal::Benchmark::Instance, std::allocator<benchmark::internal::Benchmark::Instance> >*, std::ostream*) (in /home/nvidia/BuildAgentInstall/work/8678e4dc1a0f932e/Benchmark/Benchmark)
[12:44:01] [Step 4/4] ==26587== by 0x406BBF: benchmark::RunSpecifiedBenchmarks(benchmark::BenchmarkReporter*, benchmark::BenchmarkReporter*) (in /home/nvidia/BuildAgentInstall/work/8678e4dc1a0f932e/Benchmark/Benchmark)
[12:44:01] [Step 4/4] ==26587== by 0x40542B: main (Benchmark.cpp:18)
[12:44:01] [Step 4/4] ==26587== Address 0x4c62d30 is 0 bytes after a block of size 176 alloc'd
[12:44:01] [Step 4/4] ==26587== at 0x4845108: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-arm64-linux.so)
[12:44:01] [Step 4/4] ==26587==
Can you share your code?
Doing the naive thing (building and installing benchmark, copying the sample to a main.cc, compiling) runs fine on my machine, though it is x86_64.
Also, unless i'm missing something, travis doesn't support arm64 so we may be missing something there.
Hi MichaelMauderer, have you solved this problem, i.e.,malloc assertion failure on ARM64
No sorry, I never had a chance to further look into this.
On Thu, 19 Apr 2018, 13:57 renjie130, [email protected] wrote:
Hi MichaelMauderer, have you solved this problem, i.e.,malloc assertion failure on ARM64
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/benchmark/issues/450#issuecomment-382724319, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXNwu8uHUo3-ovH4iUAtwJLHFHexCQXks5tqIm2gaJpZM4PokwN .
Thank you
Hello MichaelMauderer, Any luck or insights with respect to this issue?
I suspect this should be closed. Without having at least the source sample, not much to be done..
I'm reasonably sure that it also was a version mismatch just like in https://github.com/google/benchmark/issues/751 Regardless, without repro steps, this is unactionable.