[Rd] [PATCH] Fix missing break

Steve Grubb sgrubb at redhat.com
Fri Jul 21 04:20:33 CEST 2017


On Thursday, July 20, 2017 7:41:00 PM EDT Duncan Murdoch wrote:
> Thanks for posting this series of patches.  Unfortunately, there's a
> good chance they'll get lost in all the traffic on R-devel.  If you
> don't hear that they've been fixed in the next couple of weeks, could
> you post them to bugs.r-project.org, and post future patches there as well?

That was my first inclination. But there is no way to create an account unlike 
most open source projects I work with. And I work with quite a lot.


> In examples like the one below, if you have R code that shows symptoms,
> it would really help in the bug report. 

I am hoping that we can look at the code as seasoned programmers and say yeah, 
that is a bug. I run the code through Coverity and have quite a lot of 
problems to tell you about. I run these 5 out as tests to see how this 
community works. I am new to this community but not necessarily R and just 
want to contribute back to something I am using. But believe me, I have a 
bunch more that seasoned programmers can eyeball and say yep - that's a bug.


> Otherwise, someone else will have to analyze the code to decide whether it's
> a bug or missing comment.  That takes time, and if there are no known
> symptoms, it's likely to be assigned a low priority.  The sad truth is that
> very few members of R Core are currently actively fixing bugs.

That's a shame. I'd be happy to give the scan to people in core so they can 
see what the lay of the land looks like. R works amazingly good. So much so I 
decided to dig deeper. I'd recommend to the core developers that they ask to 
get on Coverity's open source scan list.

https://scan.coverity.com/

It's free to open source projects like this. :-)

-Steve


> On 20/07/2017 5:02 PM, Steve Grubb wrote:
> > Hello,
> > 
> > There appears to be a break missing in the switch/case for the LISTSXP
> > case. If this is supposed to fall through, I'd suggest a comment so that
> > others know its by design.
> > 
> > Signed-off-by: Steve Grubb <sgrubb at redhat.com>
> > 
> > Index: src/main/builtin.c
> > ===================================================================
> > --- src/main/builtin.c	(revision 72935)
> > +++ src/main/builtin.c	(working copy)
> > @@ -888,6 +888,7 @@
> > 
> >  	    SETCAR(t, CAR(x));
> >  	    SET_TAG(t, TAG(x));
> >  	
> >  	}
> > 
> > +	break;
> > 
> >      case VECSXP:
> >  	for (i = 0; i < len; i++)
> >  	
> >  	    if (i < lenx) {
> > 
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list