|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Re: (PR#11281) Bug in R 2.7 for over long linesOn Sat, 2008-05-10 at 11:19 +0100, Prof Brian Ripley wrote:
> You will see the current code is different, and your 'fix' is not needed=20 > nor applies in R-devel. would be nice... > You failed to provide an example to reproduce the alleged bug, but the=20 well the bug was obvious, I told that I can trigger it and that the proposed fix fixed it - no need to provide an example. > issue does seem to be using lines beyond the documented line length. exactly. one can crash R with too long lines. > So it would have only affected people who did that .... or use auto-generated code like e.g. swig produces. > And generating a new report (PR#11438) was distinctly unfriendly. I did what I was told, reply and keep the PR#11281 in the subject. I am sensing another bug. > If after studing the R FAQ you have a reproducible example in a > current=20 > version of R (R-devel or R-patched), plus add it to *this* report > number. I don't intend to play with devel versions of R, I was just trying to get swig for R2.7 to work. Sorry that it triggered a bug in R. =EF=BB=BFI w= ill try R2.7.1 when it is released and report back. Soeren. ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: (PR#11281) Bug in R 2.7 for over long linesOn 5/10/2008 5:20 PM, bugreports@... wrote:
> On Sat, 2008-05-10 at 11:19 +0100, Prof Brian Ripley wrote: >> You will see the current code is different, and your 'fix' is not needed=20 >> nor applies in R-devel. > > would be nice... > >> You failed to provide an example to reproduce the alleged bug, but the=20 > > well the bug was obvious, I told that I can trigger it and that the > proposed fix fixed it - no need to provide an example. But it would be helpful to provide an example, so that we can test the fix. As Brian told you, your fix was no good: it was not against the current code. > >> issue does seem to be using lines beyond the documented line length. > > exactly. one can crash R with too long lines. Then the bug is also in your code, for sending lines that are too long. R shouldn't crash on user error, but "don't do that" is an appropriate response. > >> So it would have only affected people who did that .... > > or use auto-generated code like e.g. swig produces. Then swig should be modified to produce valid code. > >> And generating a new report (PR#11438) was distinctly unfriendly. > > I did what I was told, reply and keep the PR#11281 in the subject. I am > sensing another bug. > >> If after studing the R FAQ you have a reproducible example in a >> current=20 >> version of R (R-devel or R-patched), plus add it to *this* report >> number. > > I don't intend to play with devel versions of R, I was just trying to > get swig for R2.7 to work. Sorry that it triggered a bug in R. =EF=BB=BFI w= > ill > try R2.7.1 when it is released and report back. If you aren't interested in being helpful by testing fixes for your code, then I doubt if any of us are going to go out of our way to help you with your errors. Duncan Murdoch > > Soeren. > > ______________________________________________ > R-devel@... mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: (PR#11281) Bug in R 2.7 for over long linesOn Mon, 2008-05-12 at 08:39 -0400, Duncan Murdoch wrote:
> On 5/10/2008 5:20 PM, bugreports@... wrote: > > On Sat, 2008-05-10 at 11:19 +0100, Prof Brian Ripley wrote: > >> You will see the current code is different, and your 'fix' is not needed=20 > >> nor applies in R-devel. > > > > would be nice... > > > >> You failed to provide an example to reproduce the alleged bug, but the=20 > > > > well the bug was obvious, I told that I can trigger it and that the > > proposed fix fixed it - no need to provide an example. > > But it would be helpful to provide an example, so that we can test the > fix. As Brian told you, your fix was no good: it was not against the > current code. Well it was when I posted it 4 days after R 2.7.0 was released. And the bug was very obvious, I mean look at this (quoting from my original report): char *LongLine = (char *) malloc(nc); ... LongLine[nc] = '\0'; note that LongLine is only nc chars long, so the LongLine[nc]='\0' might be an out of bounds write. the fix would be to do char *LongLine = (char *) malloc(nc+1); Anyway an example that will crash R 2.7.0 is here http://nn7.de/debugging/Features.R . > >> issue does seem to be using lines beyond the documented line length. > > > > exactly. one can crash R with too long lines. > > Then the bug is also in your code, for sending lines that are too long. > R shouldn't crash on user error, but "don't do that" is an appropriate > response. I would just like to see this bug in R fixed. > >> So it would have only affected people who did that .... > > > > or use auto-generated code like e.g. swig produces. > > Then swig should be modified to produce valid code. Sure. That's what I am trying to achieve. [...] > > I don't intend to play with devel versions of R, I was just trying to > > get swig for R2.7 to work. Sorry that it triggered a bug in R. =EF=BB=BFI w= > > ill > > try R2.7.1 when it is released and report back. > > If you aren't interested in being helpful by testing fixes for your > code, then I doubt if any of us are going to go out of our way to help > you with your errors. I still don't understand what I could have possibly done wrong in my initial post (http://article.gmane.org/gmane.comp.lang.r.devel/16243/) to cause this meta-discussion. But to put things in the right light. There is no bug in my code (this time). But in R. And I did not ask for help - to the contrary: I've pointed out a trivial to fix bug in R 2.7.0 and showed how it could be fixed. The problem is that I am not really an R user, but just wanted to support the R community by porting shogun to R in the hope that it may be useful for some. To achieve this I am fixing bugs in the R swig interface generator and now also R. So the detour I am taking here is massive and I have not received any help (except from Dirk so far). So if possible lets stay focused on the bug: Dirk helped me to get the R from svn-trunk (it says R 2.8 at startup) to compile and voila, sourcing the code from above does not generate any crashes anymore. So the rewrite of gram.c fixes it I guess. Soeren ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
Re: (PR#11281) Bug in R 2.7 for over long lines>>>>> "SS" == Soeren Sonnenburg <r-ml@...>
>>>>> on Tue, 13 May 2008 08:17:23 +0200 writes: SS> On Mon, 2008-05-12 at 08:39 -0400, Duncan Murdoch wrote: >> On 5/10/2008 5:20 PM, bugreports@... wrote: > On Sat, >> 2008-05-10 at 11:19 +0100, Prof Brian Ripley wrote: >> >> You will see the current code is different, and your >> 'fix' is not needed=20 >> nor applies in R-devel. >> > >> > would be nice... >> > >> >> You failed to provide an example to reproduce the >> alleged bug, but the=20 >> > >> > well the bug was obvious, I told that I can trigger it >> and that the > proposed fix fixed it - no need to provide >> an example. >> >> But it would be helpful to provide an example, so that we >> can test the fix. As Brian told you, your fix was no >> good: it was not against the current code. SS> Well it was when I posted it 4 days after R 2.7.0 was SS> released. SS> And the bug was very obvious, I mean look at this SS> (quoting from my original report): SS> char *LongLine = (char *) malloc(nc); SS> ... SS> LongLine[nc] = '\0'; SS> note that LongLine is only nc chars long, so the LongLine[nc]='\0' might SS> be an out of bounds write. the fix would be to do SS> char *LongLine = (char *) malloc(nc+1); Yes, you are right about this (first part of your report). SS> Anyway an example that will crash R 2.7.0 is here SS> http://nn7.de/debugging/Features.R . >> >> issue does seem to be using lines beyond the >> documented line length. >> > >> > exactly. one can crash R with too long lines. >> >> Then the bug is also in your code, for sending lines that >> are too long. R shouldn't crash on user error, but >> "don't do that" is an appropriate response. SS> I would just like to see this bug in R fixed. >> >> So it would have only affected people who did that >> .... >> > >> > or use auto-generated code like e.g. swig produces. >> >> Then swig should be modified to produce valid code. SS> Sure. That's what I am trying to achieve. SS> [...] >> > I don't intend to play with devel versions of R, I was >> just trying to > get swig for R2.7 to work. Sorry that it >> triggered a bug in R. =EF=BB=BFI w= > ill > try R2.7.1 >> when it is released and report back. >> >> If you aren't interested in being helpful by testing >> fixes for your code, then I doubt if any of us are going >> to go out of our way to help you with your errors. SS> I still don't understand what I could have possibly SS> done wrong in my initial post SS> (http://article.gmane.org/gmane.comp.lang.r.devel/16243/) SS> to cause this meta-discussion. I think it was partly misunderstanding on both sides. The bug *was* indeed fixed only a couple of hours after your report : >> r45496 | ... | 2008-04-25 09:37:53 +0200 (Fri, 25 Apr 2008) | >> >> change long-standing out-by-one error for invalid input I agree it would have been kind if we had thanked you and had told you that the bug actually had been fixed. Sometimes this if forgotten because of busy "schedules" ... So let me give you late ** Thank you very much !! ** for the original bug report. Martin Maechler, ETH Zurich SS> But to put things in the right light. There is no bug in SS> my code (this time). But in R. And I did not ask for SS> help - to the contrary: I've pointed out a trivial to SS> fix bug in R 2.7.0 and showed how it could be fixed. SS> The problem is that I am not really an R user, but just SS> wanted to support the R community by porting shogun to R SS> in the hope that it may be useful for some. To achieve SS> this I am fixing bugs in the R swig interface generator SS> and now also R. So the detour I am taking here is SS> massive and I have not received any help (except from SS> Dirk so far). SS> So if possible lets stay focused on the bug: Dirk helped SS> me to get the R from svn-trunk (it says R 2.8 at SS> startup) to compile and voila, sourcing the code from SS> above does not generate any crashes anymore. So the SS> rewrite of gram.c fixes it I guess. SS> Soeren ______________________________________________ R-devel@... mailing list https://stat.ethz.ch/mailman/listinfo/r-devel |
|
|
|
|
|
|
| Free Forum Powered by Nabble | Forum Help |