首页 > 解决方案 > Valgrind`不支持的arch_prctl选项`

问题描述

我有一个我知道有一些奇怪的内存问题的程序,所以我求助于 Valgrind。但是,我得到以下神秘的输出:

==32006== Memcheck, a memory error detector
==32006== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==32006== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==32006== Command: ./012
==32006== Parent PID: 29454
==32006== 

valgrind: the 'impossible' happened:
   Unsupported arch_prctl option

host stacktrace:
==32006==    at 0x580441BA: show_sched_status_wrk (m_libcassert.c:355)
==32006==    by 0x580442D4: report_and_quit (m_libcassert.c:426)
==32006==    by 0x58044517: panic (m_libcassert.c:502)
==32006==    by 0x58044517: vgPlain_core_panic_at (m_libcassert.c:507)
==32006==    by 0x5804454A: vgPlain_core_panic (m_libcassert.c:512)
==32006==    by 0x580DAE22: vgSysWrap_amd64_linux_sys_arch_prctl_before (syswrap-amd64-linux.c:286)
==32006==    by 0x580A0C23: vgPlain_client_syscall (syswrap-main.c:1857)
==32006==    by 0x5809D48A: handle_syscall (scheduler.c:1126)
==32006==    by 0x5809EBB6: vgPlain_scheduler (scheduler.c:1443)
==32006==    by 0x580AED50: thread_wrapper (syswrap-linux.c:103)
==32006==    by 0x580AED50: run_a_thread_NORETURN (syswrap-linux.c:156)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable (lwpid 32006)
==32006==    at 0x401A1C5: ??? (in /usr/lib/ld-2.28.so)
==32006==    by 0xBFEBFBFE: ???


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

我试图诊断的原始错误发生在我试图根据 a 中的值(而不是视线中的指针)将uint64_ts 插入 a时。std::setstd::vector

标签: c++segmentation-faultvalgrind

解决方案


尝试valgrind-git从 AUR 安装软件包,它可能会工作


推荐阅读