Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title RPC (XDR) porting to QNX problem
Ref. No. QNX.000004405
Category(ies) Development
Issue I'm trying to port an application that uses xdr to QNX.  Unfortunately, it keeps crashing in the xdr system calls.  Here is a sample that demonstrates the problem.

#include <rpc/xdr.h>
#include <stdio.h>

int main (int argc, char *argv[])
{
    XDR xdrs;
    int i;
    char xdrBuffer[2048];
  xdrmem_create(&xdrs,xdrBuffer,2048,XDR_ENCODE);
    xdr_setpos(&xdrs,0);
    return(0);
}

It compiles with: cc -g -5r -o testxdr -lclib -lmath387r -lsocket3r -lrpc3r xdrtest.c

It proceeds to crash in the xdr_setpos call with a memory fault.

This code runs on several other operating systems that support XDR.


Solution You were making a select call with a timout value that was creating a proxy but never deleting it.  This eventually filled up the process space.