[Top][All Lists]

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

Re: GNU Guile 2.1.5 released (beta)

From: Matt Wette
Subject: Re: GNU Guile 2.1.5 released (beta)
Date: Sat, 10 Dec 2016 16:42:47 -0800

On Dec 10, 2016, at 9:11 AM, Daniel Llorens <address@hidden> wrote:
>>> Make check is failing on test-language, so I will be chasing that down.
> FWIW this is the only test that fails on 10.9.5 and the backtrace looks 
> identical too.

The problem appears in libguile/loader.c, alloc_aligned().  Check the value of 
“ret” I get after malloc and after the alignment.   I started looking at type 
size for uintptr_t vs char* but then got confused why guile is being compiled 
as x86_64, but my test programs are always x86


/* This function leaks the memory that it allocates.  */
static char*
alloc_aligned (size_t len, unsigned alignment)
  char *ret;

  if (alignment == 8)
      /* FIXME: Assert that we actually have an 8-byte-aligned malloc.  */
      ret = malloc (len);
#if defined(HAVE_SYS_MMAN_H) && defined(MMAP_ANONYMOUS)
  else if (alignment == SCM_PAGE_SIZE)
      ret = mmap (NULL, len, PROT_READ | PROT_WRITE, -1, 0);
      if (ret == MAP_FAILED)
      if (len + alignment < len)
        abort ();

      ret = malloc (len + alignment - 1);
      if (!ret)
        abort ();
      ret = (char *) ALIGN ((scm_t_uintptr) ret, alignment);

  return ret;

reply via email to

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