[racket-dev] [plt] Push #23267: master branch updated

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Aug 16 13:52:58 EDT 2011

It's difficult to say more than that `free-identifier=?' could return
the wrong result if the internal representation of one identifier's
lexical context is just right. The representation difference has to do
with whether syntax-object operations internally lead to a list or a
vector of consecutive wraps, where the relevant wraps include a local
renaming and a module-level renaming.

At Tue, 16 Aug 2011 11:04:13 -0600, Jon Rafkind wrote:
> Oh sorry, I meant how did the bug manifest itself in racket programs.
> 
> On 08/16/2011 11:02 AM, Jay McCarthy wrote:
> > The C macro expanded into more than a single expression, but there was
> > no {} after the else, so the latter expressions always ran.
> >
> > This is a great example :)
> >
> > Jay
> >
> > On Tue, Aug 16, 2011 at 11:00 AM, Jon Rafkind <rafkind at cs.utah.edu> wrote:
> >> What was the bug? :)
> >>
> >> On 08/16/2011 10:43 AM, mflatt at racket-lang.org wrote:
> >>> mflatt has updated `master' from d05f138ed2 to 311d55b5cf.
> >>>   http://git.racket-lang.org/plt/d05f138ed2..311d55b5cf
> >>>
> >>> =====[ 1 Commits ]======================================================
> >>>
> >>> Directory summary:
> >>>  100.0% src/racket/src/
> >>>
> >>> ~~~~~~~~~~
> >>>
> >>> 311d55b Matthew Flatt <mflatt at racket-lang.org> 2011-08-16 10:27
> >>> :
> >>> | fix bug that affects `free-identifier=?'
> >>> |
> >>> | This bug is in the "amazing that it lurked for years" category,
> >>> | as well as the "stupid use of C preprocessor" category.
> >>> :
> >>>   M src/racket/src/syntax.c |    5 +++--
> >>>
> >>> =====[ Overall Diff ]===================================================
> >>>
> >>> src/racket/src/syntax.c
> >>> ~~~~~~~~~~~~~~~~~~~~~~~
> >>> --- OLD/src/racket/src/syntax.c
> >>> +++ NEW/src/racket/src/syntax.c
> >>> @@ -365,7 +365,7 @@ XFORM_NONGCING static MZ_INLINE void 
> DO_WRAP_POS_INC(Wrap_Pos *w)
> >>>  #define WRAP_POS_INIT_END(w) (w.l = scheme_null, w.a = NULL, w.is_limb = 
> 0, w.pos = 0)
> >>>  #define WRAP_POS_END_P(w) SCHEME_NULLP(w.l)
> >>>  #define WRAP_POS_FIRST(w) w.a
> >>> -#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb= 
> (w2).is_limb; w.pos = (w2).pos
> >>> +#define WRAP_POS_COPY(w, w2) w.l = (w2).l; w.a = (w2).a; w.is_limb = 
> (w2).is_limb; w.pos = (w2).pos
> >>>
> >>>  /* Walking backwards through one chunk: */
> >>>
> >>> @@ -3618,8 +3618,9 @@ static Scheme_Object *resolve_env(WRAP_POS *_wraps,
> >>>    if (_wraps) {
> >>>      WRAP_POS_COPY(wraps, *_wraps);
> >>>      WRAP_POS_INC(wraps);
> >>> -  } else
> >>> +  } else {
> >>>      WRAP_POS_INIT(wraps, ((Scheme_Stx *)a)->wraps);
> >>> +  }
> >>>
> >>>    while (1) {
> >>>      if (WRAP_POS_END_P(wraps)) {
> >> _________________________________________________
> >>  For list-related administrative tasks:
> >>  http://lists.racket-lang.org/listinfo/dev
> >>
> >
> >
> 
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/dev


Posted on the dev mailing list.