I’m trying to debug my R package with valgrind, but I cannot get past the point where I load make the data, as valgrind crashes when trying to extract a single time series object of a multivariate mts object. I’m using R 2.15.0 with platform x86_64-redhat-linux-gnu (64-bit).
Minimalistic code is like this:
> data(Seatbelts)
> y<-Seatbelts[,"VanKilled"]
It seems that the crash is caused by the fact that the rows of the Seatbelts are not defined in assignment, but if I use command y<-Seatbelts[1:192,”VanKilled”] the resulting object is not a time series object anymore. Is there some clever way to get around this?
This is the error given by valgrind
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 ...
Your program is using an instruction (ROUNDSD) that your version of valgrind doesn’t support.
The first thing to do is to make sure that you’re using the latest version of valgrind, and ideally to try the svn version as I that it supports some (but not all) variants of that instruction.
If it still fails then you should report it in the valgrind bug tracker, although you may find it’s already been reported.