Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another double symbol issue, this time with self_args via self.oobMessage #10

Closed
cscheid opened this issue Aug 24, 2013 · 2 comments
Closed

Comments

@cscheid
Copy link

cscheid commented Aug 24, 2013

In Rserv.c, send_oob_sexp expects self_args to be set before it can be called. Upon initialization, this is the address (in Rserve_prepare_child):

self_args was set! 0x105a2b718

Then, upon checking the value, in send_oob_sexp,

self_args will be read! 0x107c48b78

A test case that exercises this issue is available on the tests directory of the ocap-oob-rserve-issue branch of rserve-js:

$ git clone git@github.com:cscheid/rserve-js.git
$ cd rserve-js
$ git checkout ocap-oob-rserve-issues
$ cd tests
$ ./run_all_tests.sh

Here, this results in:

self_args was set! 0x108511718
INIT!
UP!
stored  function (x) {
            console.log("This is a cap!");
            return 20 + x;
        }  at  7251482012
huh?
[1] "7251482012"
attr(,"class")
[1] "javascript_function"
self_args will be read! 0x10a734b78
Error in Rserve:::self.oobMessage(list(s, ...)) :
  OOB commands can only be used from code evaluated inside an Rserve client instance

(the "self_args" bits are just extra printing stuff I added to rserve).

I'd try to fix this myself, but I don't really know how :(

@cscheid
Copy link
Author

cscheid commented Aug 24, 2013

Ok, random workaround succeeded:

require(Rserve)
self.oobMessage(...)

Will shut up now.

@cscheid cscheid closed this as completed Aug 24, 2013
@s-u
Copy link
Owner

s-u commented Aug 25, 2013

Same issue and it just demonstrates why having Rserve package for three purposes (standalone server, in-sessions server, client support) is a bad idea. All self.* commands should probably go into RSclient or a dedicated package ... Also the Rserve package should probably refuse to load the dylib if it's already inside an embedded Rserve ... that may solve most of the problems (I'll make that an issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants