You're right. I've found the bug, and fixed it. Tested on OSOL
2008.11, 2009.06 and OSX 10.5.7
getcwd(NULL,0) doesn't conform to POSIX.1. The correct would be to use
MAXPATHLEN (from sys/param.h) -- but as I do not have a Linux box
available, I chose BUFSIZE (2048) as a simpler solution. It's usually
bigger than maxpath - which is usually 1024 anyway, and it gets freed
immediately after so I think it should be a pretty safe fix.
See:
http://github.com/oc/jruby/commit/372471fe4c66e245299c14298efb48e921359a73oc
On Fri, Jun 12, 2009 at 9:56 PM, Chris Evans<
evans.chris@...> wrote:
> Great, that worked.
>
> Unfortunately, jruby core dumps when I try to use it:(
>
> $ ./jruby --ng-server &
> [1] 29950
> NGServer started on all interfaces, port 2113.
>
> $ ./jruby --ng -e "puts 1"
> java.io.EOFException
> Segmentation Fault (core dumped)
> at java.io.DataInputStream.readFully(DataInputStream.java:178)
> at java.io.DataInputStream.readFully(DataInputStream.java:152)
> at com.martiansoftware.nailgun.NGSession.run(Unknown Source)
>
> --
> Chris
>
> On Fri, Jun 12, 2009 at 3:34 PM, Ole Christian Rynning<
oc@...> wrote:
>> Try for instance adding this to your Makefile:
>>
>> ngsolaris: src/c/ng.c
>> ${CC} ${CFLAGS} -lsocket -lnsl -o ng src/c/ng.c
>>
>>> make ngsolaris
>>
>> oc
>>
>> On Fri, Jun 12, 2009 at 9:29 PM, Ole Christian Rynning<
oc@...> wrote:
>>> You need -lsocket -lnsl on Solaris...
>>>
>>> oc
>>>
>>> On Fri, Jun 12, 2009 at 8:11 PM, Chris Evans<
evans.chris@...> wrote:
>>>> I'm trying to get nailgun running under jruby 1.3, but I can't get it
>>>> to compile on Solaris. Has anybody had any luck, or can point me to a
>>>> compiled binary? I tried using a binary I compiled on linux, but that
>>>> didn't work.
>>>>
>>>> This is the message I get when running "make":
>>>>
>>>> Building ng client. To build a Windows binary, type 'make ng.exe'
>>>> gcc -Wall -pedantic -s -O3 -o ng src/c/ng.c
>>>> Undefined first referenced
>>>> symbol in file
>>>> recv /var/tmp//ccYFECtY.o
>>>> send /var/tmp//ccYFECtY.o
>>>> gethostbyname /var/tmp//ccYFECtY.o
>>>> socket /var/tmp//ccYFECtY.o
>>>> connect /var/tmp//ccYFECtY.o
>>>> ld: fatal: Symbol referencing errors. No output written to ng
>>>> collect2: ld returned 1 exit status
>>>> make: *** [ng] Error 1
>>>>
>>>> --
>>>> Chris
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>
http://xircles.codehaus.org/manage_email>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>
http://xircles.codehaus.org/manage_email>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>
http://xircles.codehaus.org/manage_email>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email