Hello R developers,
'.../configure --enable-strict-barrier && make' eventually fails to
load tools.so due to an undefined reference to OBJECT().
Judging by the disassembly, the call surfaces in deparseRd(), close to
the beginning of the function:
if(!isString(e) || LENGTH(e) != 1)
error(_("'deparseRd' only supports deparsing character elements"));
e = STRING_ELT(e, 0);
return (TYPEOF(s) == INTSXP && !inherits(s, "factor"));
if(!isInteger(state) || LENGTH(state) != 5) error(_("bad state"));
if (OBJECT(s)) {
12828: 48 89 df mov %rbx,%rdi
1282b: e8 d0 19 ff ff call 4200 <OBJECT@plt>
12830: 85 c0 test %eax,%eax
12832: 0f 85 57 03 00 00 jne 12b8f <deparseRd+0x3df>
...
klass = getAttrib(s, R_ClassSymbol);
12b8f: 48 8b 05 ca 73 00 00 mov 0x73ca(%rip),%rax # R_ClassSymbol
12b96: 48 89 df mov %rbx,%rdi
12b99: 48 8b 30 mov (%rax),%rsi
12b9c: e8 3f 1b ff ff call 46e0 <Rf_getAttrib@plt>
Looking at the preprocessor output, I think that the call to OBJECT()
appears through the inlined function isInteger(), which calls inlined
function inherits(), which contains the call to OBJECT(), which is not
available to the 'tools' shared library due to being newly hidden.
Without strict barrier checking, OBJECT(s) gets expanded to
((s)->sxpinfo.obj), and all works well.
--
Best regards,
Ivan
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel