GNU bug report logs - #19366
Building Guile 1.8 with AddressSanitizer

Previous Next

Package: guile;

Reported by: Joshua Rogers <megamansec <at> gmail.com>

Date: Sat, 13 Dec 2014 12:57:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19366 in the body.
You can then email your comments to 19366 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#19366; Package guile. (Sat, 13 Dec 2014 12:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joshua Rogers <megamansec <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 13 Dec 2014 12:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joshua Rogers <megamansec <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: Guile
Date: Sat, 13 Dec 2014 23:56:06 +1100
[Message part 1 (text/plain, inline)]
Hi,

When compiling guile from the source with AddressSanitizer, Asan picks
up a bug:

cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc
continuations.doc debug.doc deprecation.doc deprecated.doc
discouraged.doc dynl.doc dynwind.doc environments.doc eq.doc error.doc
eval.doc evalext.doc extensions.doc feature.doc fluids.doc fports.doc
futures.doc gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc
gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc hooks.doc
i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc
macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc
options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc
properties.doc random.doc rdelim.doc read.doc root.doc rw.doc
scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc
stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc srfi-13.doc
srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc
throw.doc values.doc variable.doc vectors.doc version.doc vports.doc
weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc
socket.doc regex-posix.doc |
GUILE="/root/srcs/guile-1.8/guile-1.8-1.8.8+1/pre-inst-guile"
../scripts/snarf-check-and-output-texi          > guile-procedures.texi
|| { rm guile-procedures.texi; false; }
=================================================================
==51918== ERROR: AddressSanitizer: stack-buffer-underflow on address
0x7fff531555c0 at pc 0x2ac7bd9a92e8 bp 0x7fff53155330 sp 0x7fff53155328
READ of size 8 at 0x7fff531555c0 thread T0
    #0 0x2ac7bd9a92e7
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x1192e7)
    #1 0x2ac7bdb6541a
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x2d541a)
    #2 0x2ac7bd9a8467
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x118467)
    #3 0x2ac7bd9a4c60
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x114c60)
    #4 0x2ac7bd9a52d2
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x1152d2)
    #5 0x2ac7bdad020e
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x24020e)
    #6 0x2ac7bdb5de11
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x2cde11)
    #7 0x2ac7bda7b36b
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x1eb36b)
    #8 0x2ac7bda7b691
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x1eb691)
    #9 0x2ac7bda4eafd
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x1beafd)
    #10 0x2ac7bd9fc9c9
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x16c9c9)
    #11 0x2ac7bdb648bf
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x2d48bf)
    #12 0x2ac7bd9fc7b2
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/libguile.so.17.4.0+0x16c7b2)
    #13 0x400a47
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/lt-guile+0x400a47)
    #14 0x2ac7be0d1ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4)
    #15 0x400bad
(/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/lt-guile+0x400bad)
Address 0x7fff531555c0 is located at offset 0 in frame
<scm_i_init_guile> of T0's stack:
  This frame has 1 object(s):
    [32, 56) 'body_data'
HINT: this may be a false positive if your program uses some custom
stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
Shadow bytes around the buggy address:
  0x10006a622a60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
  0x10006a622a70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
  0x10006a622a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
  0x10006a622a90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
  0x10006a622aa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
=>0x10006a622ab0: 00 00 00 00 00 00 00 00[f1]f1 f1 f1 00 00 00 f4
  0x10006a622ac0: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
  0x10006a622ad0: 00 f4 f4 f4 00 00 00 00 00 00 00 00 00 00 00 00 
  0x10006a622ae0: f1 f1 f1 f1 00 00 00 00 f3 f3 f3 f3 00 00 00 00 
  0x10006a622af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 




Thanks,
-- 
-- Joshua Rogers <https://internot.info/>

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guile <at> gnu.org:
bug#19366; Package guile. (Sat, 13 Dec 2014 15:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 19366 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Joshua Rogers <megamansec <at> gmail.com>
Cc: 19366 <at> debbugs.gnu.org, request <at> debbugs.gnu.org
Subject: Re: bug#19366: Guile
Date: Sat, 13 Dec 2014 16:38:53 +0100
retitle 19366 Building Guile 1.8 with AddressSanitizer
thanks

Joshua Rogers <megamansec <at> gmail.com> skribis:

> When compiling guile from the source with AddressSanitizer, Asan picks
> up a bug:
>
> cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc
> continuations.doc debug.doc deprecation.doc deprecated.doc
> discouraged.doc dynl.doc dynwind.doc environments.doc eq.doc error.doc
> eval.doc evalext.doc extensions.doc feature.doc fluids.doc fports.doc
> futures.doc gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc
> gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc hooks.doc
> i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc
> macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc
> options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc
> properties.doc random.doc rdelim.doc read.doc root.doc rw.doc
> scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc
> stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc srfi-13.doc
> srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc
> throw.doc values.doc variable.doc vectors.doc version.doc vports.doc
> weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc
> socket.doc regex-posix.doc |
> GUILE="/root/srcs/guile-1.8/guile-1.8-1.8.8+1/pre-inst-guile"
> ../scripts/snarf-check-and-output-texi          > guile-procedures.texi
> || { rm guile-procedures.texi; false; }
> =================================================================
> ==51918== ERROR: AddressSanitizer: stack-buffer-underflow on address
> 0x7fff531555c0 at pc 0x2ac7bd9a92e8 bp 0x7fff53155330 sp 0x7fff53155328
> READ of size 8 at 0x7fff531555c0 thread T0

[...]

> (/root/srcs/guile-1.8/guile-1.8-1.8.8+1/libguile/.libs/lt-guile+0x400bad)
> Address 0x7fff531555c0 is located at offset 0 in frame
> <scm_i_init_guile> of T0's stack:
>   This frame has 1 object(s):
>     [32, 56) 'body_data'
> HINT: this may be a false positive if your program uses some custom
> stack unwind mechanism or swapcontext
>       (longjmp and C++ exceptions *are* supported)

Because Guile 1.8 uses a custom garbage collector which scans the C
stack for references to heap-allocated objects, chances are that Asan
will view such accesses as suspicious, even though they are in fact
harmless.

However, Guile 1.8 is no longer maintained.

You could try running Asan on Guile 2.0, which has been the stable
series for a number of years.  Guile 2.0 uses the BDW GC (aka. libgc).
It may similarly raise false positives, but since libgc is widely used,
you might be able find feedback from people who have tried using Asan
with it.

HTH,
Ludo’.




Changed bug title to 'Building Guile 1.8 with AddressSanitizer' from 'Guile' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Sat, 13 Dec 2014 15:40:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-guile <at> gnu.org:
bug#19366; Package guile. (Sat, 13 Dec 2014 15:54:01 GMT) Full text and rfc822 format available.

Message #13 received at 19366 <at> debbugs.gnu.org (full text, mbox):

From: Joshua Rogers <megamansec <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 19366 <at> debbugs.gnu.org, request <at> debbugs.gnu.org
Subject: Re: bug#19366: Guile
Date: Sun, 14 Dec 2014 02:53:32 +1100
[Message part 1 (text/plain, inline)]
On 14/12/14 02:38, Ludovic Courtès wrote:
> However, Guile 1.8 is no longer maintained.
>
> You could try running Asan on Guile 2.0, which has been the stable
> series for a number of years.  Guile 2.0 uses the BDW GC (aka. libgc).
> It may similarly raise false positives, but since libgc is widely used,
> you might be able find feedback from people who have tried using Asan
> with it.
Hm, okay. 1.8 is the current version in the Ubuntu repo's, just fyi.

I'll compile the latest version.

Thanks,
-- 
-- Joshua Rogers <https://internot.info/>

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guile <at> gnu.org:
bug#19366; Package guile. (Sun, 14 Dec 2014 15:47:02 GMT) Full text and rfc822 format available.

Message #16 received at 19366 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Joshua Rogers <megamansec <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 19366 <at> debbugs.gnu.org,
 request <at> debbugs.gnu.org
Subject: Re: bug#19366: Guile
Date: Sun, 14 Dec 2014 10:44:07 -0500
Joshua Rogers <megamansec <at> gmail.com> writes:

> On 14/12/14 02:38, Ludovic Courtès wrote:
>> However, Guile 1.8 is no longer maintained.
>>
>> You could try running Asan on Guile 2.0, which has been the stable
>> series for a number of years.  Guile 2.0 uses the BDW GC (aka. libgc).
>> It may similarly raise false positives, but since libgc is widely used,
>> you might be able find feedback from people who have tried using Asan
>> with it.
> Hm, okay. 1.8 is the current version in the Ubuntu repo's, just fyi.

Ubuntu has had Guile 2.0 since Precise 12.04 LTS, but it has a different
package name: "guile-2.0".

     Regards,
       Mark




Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Wed, 22 Jun 2016 19:23:02 GMT) Full text and rfc822 format available.

Notification sent to Joshua Rogers <megamansec <at> gmail.com>:
bug acknowledged by developer. (Wed, 22 Jun 2016 19:23:02 GMT) Full text and rfc822 format available.

Message #21 received at 19366-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 19366-done <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>,
 Joshua Rogers <megamansec <at> gmail.com>, request <at> debbugs.gnu.org
Subject: Re: bug#19366: Guile
Date: Wed, 22 Jun 2016 21:22:39 +0200
Closing bug.  Joshua any reports of running ASAN on Guile 2.0.11 or
2.1.3 are very welcome; note that we switched to the BDW garbage
collector in the meantime; I don't know if there are best practices for
ASAN and BDW-GC.  See e.g.:

  https://lists.opendylan.org/pipermail/bdwgc/2016-January/006136.html

Regards,

Andy

On Sun 14 Dec 2014 16:44, Mark H Weaver <mhw <at> netris.org> writes:

> Joshua Rogers <megamansec <at> gmail.com> writes:
>
>> On 14/12/14 02:38, Ludovic Courtès wrote:
>>> However, Guile 1.8 is no longer maintained.
>>>
>>> You could try running Asan on Guile 2.0, which has been the stable
>>> series for a number of years.  Guile 2.0 uses the BDW GC (aka. libgc).
>>> It may similarly raise false positives, but since libgc is widely used,
>>> you might be able find feedback from people who have tried using Asan
>>> with it.
>> Hm, okay. 1.8 is the current version in the Ubuntu repo's, just fyi.
>
> Ubuntu has had Guile 2.0 since Precise 12.04 LTS, but it has a different
> package name: "guile-2.0".
>
>      Regards,
>        Mark




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 21 Jul 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.