From: Matt Wette <matt.wette@gmail.com>
To: guile-devel@gnu.org
Cc: Andy Wingo <wingo@pobox.com>, Daniel Llorens <daniel.llorens@bluewin.ch>
Subject: Re: GNU Guile 2.1.5 released (beta)
Date: Thu, 29 Dec 2016 11:38:40 -0800 [thread overview]
Message-ID: <B54059FB-A21A-4A89-BA3A-F86FA13FAF8F@gmail.com> (raw)
In-Reply-To: <B3947F3A-BBCF-4CE8-A278-F295ED504F90@gmail.com>
> On Dec 10, 2016, at 4:42 PM, Matt Wette <matt.wette@gmail.com> wrote:
>
> On Dec 10, 2016, at 9:11 AM, Daniel Llorens <daniel.llorens@bluewin.ch> 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
>
> alignment=4096
>
> /* 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)
> SCM_SYSERROR;
> }
> #endif
> else
> {
> if (len + alignment < len)
> abort ();
>
> ret = malloc (len + alignment - 1);
> ret=0x0000000104000000
> if (!ret)
> abort ();
> ret = (char *) ALIGN ((scm_t_uintptr) ret, alignment);
> ret=0x0000000004000000
> }
>
> return ret;
> }
I posted a fix for this but wanted to respond in this thread. I added “(scm_t_uintptr)” cast before the argument “alignment” to ALIGN. Also, should MMAP_ANONYMOUS be HAVE_MAP_ANONYMOUS ???
next prev parent reply other threads:[~2016-12-29 19:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.109.1481389218.15985.guile-devel@gnu.org>
2016-12-10 17:11 ` GNU Guile 2.1.5 released (beta) Daniel Llorens
2016-12-11 0:42 ` Matt Wette
2016-12-29 19:38 ` Matt Wette [this message]
2016-12-07 19:55 Andy Wingo
2016-12-09 15:28 ` Matt Wette
2016-12-09 17:25 ` Christopher Allan Webber
2016-12-10 13:16 ` Matt Wette
2016-12-11 14:52 ` Matt Wette
2016-12-11 15:42 ` Matt Wette
2017-01-08 22:50 ` Andy Wingo
2016-12-11 15:17 ` Matt Wette
2016-12-12 13:45 ` Matt Wette
2016-12-12 20:46 ` Matt Wette
2016-12-13 1:24 ` dsmich
2016-12-13 21:26 ` Freja Nordsiek
2016-12-16 13:50 ` Matt Wette
2016-12-16 14:05 ` Matt Wette
2016-12-17 2:03 ` Christopher Allan Webber
2016-12-17 3:07 ` Matt Wette
2016-12-11 20:35 ` Matt Wette
2016-12-12 1:25 ` Matt Wette
2016-12-12 11:14 ` tomas
2017-01-08 22:54 ` Andy Wingo
2017-01-09 0:13 ` Matt Wette
2016-12-20 15:00 ` Matt Wette
2016-12-20 22:58 ` Matt Wette
2017-01-08 23:01 ` Andy Wingo
2017-01-08 23:28 ` Matt Wette
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B54059FB-A21A-4A89-BA3A-F86FA13FAF8F@gmail.com \
--to=matt.wette@gmail.com \
--cc=daniel.llorens@bluewin.ch \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).