Displaying 1 result from an estimated 1 matches for "inline_cfunction_raw_bug".
2013 Feb 01
1
Problem using raw vectors with inline cfunction
...r (i = 0; i < l; ++i) Rprintf("%i, ", (int)raw[i]);
for (i = 0; i < l; ++i) raw[i] = i*10;
'
, convention=".C", language='C', verbose=TRUE
)
tt <- as.raw(1:10)
testRaw(tt, length(tt))
When I execute it:
$ R --vanilla --quiet < work/inline_cfunction_raw_bug.R
sizeof(raw[0])=1
192, 216, 223, 0, 0, 0, 0, 0, 224, 214,
*** caught segfault ***
address (nil), cause 'unknown'
Traceback:
1: .Primitive(".C")(<pointer: 0x7eff8bd605c0>, raw =
as.character(raw), len = as.integer(len))
2: testRaw(tt, length(tt))
aborting ...
Segmen...