Segfaults while calling Rpc_methods from client.h

Norman Feske norman.feske at ...1...
Mon May 11 23:02:25 CEST 2015

Hi Aditya,

passing non-POD objects such as connected lists, maps, etc. as RPC
arguments is not supposed to work. The reason is that a pointer with a
meaning in one address space is meaningless in another address space.
Please refer to the Section 8.12 of the manual [1] and particularly
Section 8.12.2 for more details about the RPC mechanism.

To transfer bulk data from one component to another, you may need to
manually serialize your information to a shared memory buffer, to be
picked up on the receiving side. See section 3.6 for the various
approaches of inter-component communication.



On 05/11/2015 10:49 PM, Aditya Kousik wrote:
> Hello,
> Calling Rpc_<method>(args, ...) from Session_client causes segfault 11
> when I try to pass anything other than a default datatype. I'm trying to
> pass an object of std::string, and it prints the string inside the
> <method> just fine, but when I make the call<Rpc_method>(st), it breaks. 
> I tried working around this by creating a char* pointer instead. Print
> inside this method works and the rpc to session_component method also
> reaches, but whatever pointer I receive in the session_component is
> garbage data. How do I fix the RPC calls?
> Thanks,
> Aditya.

Dr.-Ing. Norman Feske
Genode Labs ·

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

More information about the users mailing list