使用 valgrind 调试 R,提取 mts 对象的列会导致 valgrind 崩溃



我正在尝试使用 valgrind 调试我的 R 包,但我无法超过加载数据的时间点,因为 valgrind 在尝试提取多变量 mts 对象的单个时间序列对象时崩溃。我正在使用带有平台x86_64-redhat-linux-gnu(64位)的R 2.15.0。

简约的代码是这样的:

> data(Seatbelts)
> y<-Seatbelts[,"VanKilled"]

似乎碰撞是由于分配中未定义安全带的行数引起的,但是如果我使用命令 y<-安全带[1:192,"VanKill"],则生成的对象不再是时间序列对象。有没有一些聪明的方法可以解决这个问题?

这是瓦尔格林德给出的错误

vex amd64->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0xB 0xC0 0xC
==31160== valgrind: Unrecognised instruction at address 0x399fe26990.
==31160== Your program just tried to execute an instruction that Valgrind
==31160== did not recognise.  There are two possible reasons for this.
==31160== 1. Your program has a bug and erroneously jumped to a non-code
==31160==    location.  If you are running Memcheck and you just saw a
==31160==    warning about a bad jump, it's probably your program's fault.
==31160== 2. The instruction is legitimate but Valgrind doesn't handle it,
==31160==    i.e. it's Valgrind's fault.  If you think this is the case or
==31160==    you are not sure, please let us know and we'll try to fix it.
==31160== Either way, Valgrind will now raise a SIGILL signal which will
==31160== probably kill your program.
 *** caught illegal operation ***
address 0x399fe26990, cause 'illegal opcode'
Traceback:
 1: ts(y, start = start(x), frequency = frequency(x))
 2: `[.ts`(Seatbelts, , "VanKilled")
 3: Seatbelts[, "VanKilled"]
aborting ...

您的程序正在使用您的valgrind版本不支持的指令(ROUNDSD)。

首先要做的是确保您使用的是最新版本的 valgrind,理想情况下尝试 svn 版本,因为它支持该指令的某些(但不是全部)变体。

如果它仍然失败,那么你应该在valgrind错误跟踪器中报告它,尽管你可能会发现它已经被报告了。

最新更新