Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-29 Thread Alan Post
On Thu, Sep 29, 2011 at 12:28:07PM +0200, Christian Kellermann wrote: > Ok, we can signal the error this way. We should also investigate > the compatibility of this -D_FILE_OFFSET_BITS=64 stuff. > I basically run all of my C code with this magic flag. I believe it changes the type of off_t and s

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-29 Thread Christian Kellermann
* felix winkelmann [110929 12:15]: > >> > > >> > I am not quite sure I understand this correctly. Catch the error > >> > and if it is an overflow, redo it with a flonum? I am not sure if > >> > this is even possible since the internal check is against whether > >> > you are a 32-bit application a

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-29 Thread Felix
>> > >> > I am not quite sure I understand this correctly. Catch the error >> > and if it is an overflow, redo it with a flonum? I am not sure if >> > this is even possible since the internal check is against whether >> > you are a 32-bit application and your off_t datatype is large enough >> > to

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-29 Thread Christian Kellermann
* felix winkelmann [110929 11:05]: > From: Christian Kellermann > Subject: Re: [Chicken-hackers] [PATCH] proposed bugfix for #706 > Date: Thu, 29 Sep 2011 09:25:21 +0200 > > > * felix winkelmann [110929 > > 03:18]: > >> I would suggest simply to detect th

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-29 Thread Felix
From: Christian Kellermann Subject: Re: [Chicken-hackers] [PATCH] proposed bugfix for #706 Date: Thu, 29 Sep 2011 09:25:21 +0200 > * felix winkelmann [110929 03:18]: >> I would suggest simply to detect the error in C_file_info_2, and act >> accordingly (by calling whatever stupid

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-29 Thread Christian Kellermann
* Alan Post [110928 22:49]: > On Wed, Sep 28, 2011 at 10:10:14PM +0200, Christian Kellermann wrote: > I now notice that barf says "stat" on an OOM error. Excuse my > nitpicking, but should that be "access"? It should. To complete this patch if only for the archives, I have attached an updated ve

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-29 Thread Christian Kellermann
* felix winkelmann [110929 03:18]: > I would suggest simply to detect the error in C_file_info_2, and act > accordingly (by calling whatever stupid POSIX API that has to be used > for this, probably incompatible with the way stupid Windows does it, > and all the stupid crap programmers have to put

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-28 Thread Felix
From: Christian Kellermann Subject: [Chicken-hackers] [PATCH] proposed bugfix for #706 Date: Wed, 28 Sep 2011 17:46:04 +0200 > attached is a patch as a proposed fix for bug Ã#706. > > This will need some discussion as I am not sure what I am doing here :) > I would suggest simp

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-28 Thread Alan Post
On Wed, Sep 28, 2011 at 10:10:14PM +0200, Christian Kellermann wrote: > * Alan Post [110928 19:32]: > > I can't see buffer2 being deallocated. Is there a free() missing > > here? > > Thanks Alan, I have missed this indeed. As this is only for the > situations where the name of the file exceeds o

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-28 Thread Christian Kellermann
* Alan Post [110928 19:32]: > I can't see buffer2 being deallocated. Is there a free() missing > here? Thanks Alan, I have missed this indeed. As this is only for the situations where the name of the file exceeds our famous buffer, this would just have sometimes leaked memory, hence we also only

Re: [Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-28 Thread Alan Post
I can't see buffer2 being deallocated. Is there a free() missing here? -Alan On Wed, Sep 28, 2011 at 05:46:04PM +0200, Christian Kellermann wrote: > Hi, > > attached is a patch as a proposed fix for bug Ã#706. > > This will need some discussion as I am not sure what I am doing here :) > > Fir

[Chicken-hackers] [PATCH] proposed bugfix for #706

2011-09-28 Thread Christian Kellermann
Hi, attached is a patch as a proposed fix for bug Ã#706. This will need some discussion as I am not sure what I am doing here :) First of all it introduces: 1. A new primitive C_file_exists that will use access to check wether we could access a file 2. Reroutes the file-exists? procedure to us