chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Fix list->queue data corruption issue


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Fix list->queue data corruption issue
Date: Thu, 3 Oct 2013 09:44:55 +0200
User-agent: Mutt/1.4.2.3i

On Wed, Oct 02, 2013 at 08:11:58PM -0400, John Cowan wrote:
> Peter Bex scripsit:
> 
> > When run with paranoid CHICKEN, it tells us nicely where it's going
> > wrong: the list->queue procedure uses the low-level structure constructor
> > ##sys#make-structure with 3 arguments: the structure type, the list and
> > the list tail.  Unfortunately, make-queue calls ##sys#make-structure
> > with 4 arguments: the structure type, the list, the list tail and the
> > queue's length.  
> 
> Insert rant here about the use of unsafe procedures from Scheme code
> for the sake of tiny and probably imaginary efficiency improvements.

That's bullshit.  In the general case, the performance improvements of
unsafe code are measurable.  Now that we have the scrutinizer, it might
be worth attempting to eliminate those calls that we know the scrutinizer
already understands and can optimize.

Of course, in this particular case I'd agree ##sys#make-structure is
completely gratuitous and should probably go away.  I'd prefer to change
such things in a separate step if we decide to do so (which is a whole
other discussion).  As it is, this patch fixes a real issue.

> We SHOULD NOT do this.  Indeed, it would be a Good Thing to have
> some code that checks for calls on unsafe procedures and reports them
> unless a comment is present saying that someone has verified that
> this unsafe call is required.

CHICKEN is about avoiding bullshit overhead and bureaucracy, so that
would actually be a Bad Thing in this project.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]