[plt-dev] Re: [plt] Push #20286: master branch updated

From: Eli Barzilay (eli at barzilay.org)
Date: Sat May 22 06:47:44 EDT 2010

On May 21, jay at racket-lang.org wrote:
> 
> src/racket/gc/new_hblk.c
> ~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/src/racket/gc/new_hblk.c
> +++ NEW/src/racket/gc/new_hblk.c
> @@ -164,7 +164,8 @@ ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear, ptr_t list)
>     * put p (which is now head of list of objects in *h) as first
>     * pointer in the appropriate free list for this size.
>     */
> -      obj_link(h -> hb_body) = list;
> +	  word *tmp = (word *)h->hb_body;
> +      obj_link(tmp) = list;
>        return ((ptr_t)p);
>  }

It's not clear to me what this is trying to do, but this breaks on
windows.


> src/racket/gc/mark_rts.c
> ~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/src/racket/gc/mark_rts.c
> +++ NEW/src/racket/gc/mark_rts.c
> @@ -369,7 +369,8 @@ ptr_t GC_approx_sp(void)
>  #   ifdef _MSC_VER
>  #     pragma warning(disable:4172)
>  #   endif
> -    return((ptr_t)(&dummy));
> +	ptr_t addr = ((ptr_t)(&dummy));
> +    return addr;

This too.


> src/foreign/gcc/libffi/src/closures.c
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/src/foreign/gcc/libffi/src/closures.c
> +++ NEW/src/foreign/gcc/libffi/src/closures.c
> @@ -379,8 +379,12 @@ dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
>  	  close (execfd);
>  	  goto retry_open;
>  	}
> -      ftruncate (execfd, offset);
> -      return MFAIL;
> +	  if (ftruncate (execfd, offset)) {
> +		// FIXME: Should fail "even worse" because the truncate failed
> +		return MFAIL;
> +      } else {
> +	    return MFAIL;
> +	  } 

Now that I looked at this, it's not clear to me what you're trying to
get out of this -- you didn't change anything, and since this is C,
there's no real way to "fail worse" besides segfaulting unless you
rewrite more code an introduce new special return values etc.


> src/gracket/gracket.cxx
> ~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/src/gracket/gracket.cxx
> +++ NEW/src/gracket/gracket.cxx
> @@ -19,6 +19,7 @@
>  /* wx_motif, for wxTimer: */
>  #ifdef __GNUG__
>  # pragma implementation "wx_timer.h"
> +#pragma GCC diagnostic ignored "-Wwrite-strings"
>  #endif

I get tons of "warning: ignoring #pragma GCC diagnostic" in the build.
(I haven't looked at which platforms, but it's not a single one.)


> src/gracket/wxs/list.xci
> ~~~~~~~~~~~~~~~~~~~~~~~~
> --- OLD/src/gracket/wxs/list.xci
> +++ NEW/src/gracket/wxs/list.xci
>  [...]
> -static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)
> +MAYBE_UNUSED static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)

This (and many others) looks suspicious.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.