On Wed, Jun 24, 2009 at 11:28 AM, Rick McGuire<object.r...@gmail.com> wrote:
> Well, unfortunately, you're probably going to need to debug this > yourself, since I'm not seeing the problem. Rick, Okay, it took me almost a week, but I did debug it and just committed a fix. <grin> You'll need to review the fix, I'm not 100% sure it is the best way to fix it. Here's the root cause: Take for example this Rexx code: q = .RexxQueue~new('test') q~lineout('item1') q~lineout l = q~linein l = q~linein When the lineout() of the null string is done. We have this in RexxQueMethods.cpp rexx_add_queue() char buffer = 0; // buffer for an empty string CONSTRXSTRING rx_string; // rxstring to push RexxReturnCode rc; // queue return code if (queue_line == NULLOBJECT) /* no line given? */ { // just use a null string value MAKERXSTRING(rx_string, &buffer, 0); } On the API server side, the QueueItem is constructed using the address of buffer from the client side, the buffer variable in rexx_add_queue(). No memory on the server side is allocated because the length is 0. Then when the linein() from the queue for that empty string queue item is done, on the server side after sending the result back, freeMessageData() is called using the pointer to buffer, the buffer variable in rexx_add_queue(). On Linux freeing that invalid pointer either results in a segmentation fault, or glibc detects the invalid free(). Either scenario ends the rxapi process. Since rxapi is running as a daemon, you don't see this. But, when running the test suite as a normal user, the next test case that comes up that needs rxapi running will fail because rxapi is not running and can not be restarted. -- Mark Miesfeld > On Wed, Jun 24, 2009 at 2:26 PM, Mark Miesfeld<miesf...@gmail.com> wrote: >> On Wed, Jun 24, 2009 at 11:06 AM, Rick McGuire<object.r...@gmail.com> wrote: >> >>> I just rebuilt and ran a few tests and I'm not seeing the problem. I >>> normally see that problem on linux if I rebuild and just try to run >>> rexx. Since I'm not in root mode, it doesn't successfully launch >>> rxapi and all queue operations give that sort of failure. ------------------------------------------------------------------------------ _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel