unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Langlois <pierre.langlois@gmx.com>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 43088@debbugs.gnu.org
Subject: bug#43088: GNU Mailutils fails its test suite on aarch64
Date: Sat, 12 Sep 2020 13:24:13 +0100	[thread overview]
Message-ID: <87wo0z6v4i.fsf@gmx.com> (raw)
In-Reply-To: <87tuwmlrwu.fsf@nckx>

[-- Attachment #1: Type: text/plain, Size: 4009 bytes --]

Hi Tobias,

Tobias Geerinckx-Rice via Bug reports for GNU Guix writes:

> Guix,
>
> ‘readmsg’ from mailutils@3.10 segfaults on aarch64, blocking 
> ‘emacs’
> and ‘emacs-no-x’, but not ‘emacs-minimal’.
>
> --- ./readmsg/tests/testsuite.dir/4/testsuite.log
>     ---------------------------
>
> #                             -*- compilation -*-
> 4. hdr.at:17: testing readmsg -h ...
> ./hdr.at:17:
> MAIL=$abs_top_srcdir/testsuite/spool/mbox1
> FOLDER=$MAIL
> export MAIL FOLDER
> readmsg --no-site --no-user readmsg -h SOMETHING
> --- /dev/null   2020-08-25 23:01:26.064000000 +0000
> +++
> /tmp/guix-build-mailutils-3.10.drv-0/mailutils-3.10/readmsg/tests/testsuite.dir/at-groups/4/stderr 
> 2020-08-
> 27 15:25:42.447733149 +0000
> @@ -0,0 +1 @@
> +/tmp/guix-build-mailutils-3.10.drv-0/mailutils-3.10/readmsg/tests/testsuite.dir/at-groups/4/test-source:
> line 2
> 1: 30506 Segmentation fault      readmsg --no-site --no-user readmsg -h
> SOMETHING
> --- -   2020-08-27 15:25:42.455592145 +0000
> +++
> /tmp/guix-build-mailutils-3.10.drv-0/mailutils-3.10/readmsg/tests/testsuite.dir/at-groups/4/stdout 
> 2020-08-
> 27 15:25:42.451733151 +0000
> @@ -1,17 +1,2 @@
> From bar@dontmailme.org  Fri Dec 28 23:28:09 2001
> -Received: (from bar@dontmailme.org)
> -       by dontmailme.org id fERKR9N16790
> -       for foobar@nonexistent.net; Fri, 28 Dec 2001 22:18:08         +0200
> -Date: Fri, 28 Dec 2001 23:28:08 +0200
> -From: Bar <bar@dontmailme.org>
> -To: Foo Bar <foobar@nonexistent.net>
> -Message-Id: <200112232808.fERKR9N16790@dontmailme.org>
> -Subject: Re: Jabberwocky
> -
> -It seems very pretty, but it's *rather* hard to understand!'
> -Somehow it seems to fill my head with ideas -- only I don't
> -exactly know what they are!  However, SOMEBODY killed SOMETHING:
> -that's clear, at any rate...
> -
> -
>
> ./hdr.at:17: exit code was 139, expected 0
> 4. hdr.at:17: 4. readmsg -h (hdr.at:17): FAILED (hdr.at:17)

I've been hit by this as well so I thought I'd look into it today, and I
think I found the problem! I just sent an email upstream to
bug-mailutils@gnu.org about it.

Essentially, we have a `weedc' variable that's not initialized, and on
aarch64 it gets initialized with `0xffff'. See
https://git.savannah.gnu.org/cgit/mailutils.git/tree/readmsg/readmsg.c#n469

Here's the reproducer I just sent upstream:

```
$ export MAIL=/tmp/guix-build-mailutils-3.10.drv-0/mailutils-3.10/testsuite/spool/mbox1
$ export FOLDER=/tmp/guix-build-mailutils-3.10.drv-0/mailutils-3.10/testsuite/spool/mbox1
$ ... edit readmsg script so that `gdb --args' is prepended
$ /tmp/guix-build-mailutils-3.10.drv-0/mailutils-3.10/readmsg/readmsg --no-site --no-user readmsg -h SOMETHING
...
(gdb) start
Temporary breakpoint 2 at 0x4034c8: file readmsg.c, line 463.
Starting program: /tmp/guix-build-mailutils-3.10.drv-0/mailutils-3.10/readmsg/.libs/readmsg --no-site --no-user readmsg -h SOMETHING
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libthread_db.so.1".

Temporary breakpoint 2, main (argc=6, argv=0xffffffffeb58) at readmsg.c:463
463       int *set = NULL;
(gdb) p weedc
$4 = 65535
(gdb) watch weedc
Hardware watchpoint 3: weedc
(gdb) c
Continuing.
From bar@dontmailme.org  Fri Dec 28 23:28:09 2001

Program received signal SIGSEGV, Segmentation fault.
0x00000000004030a0 in print_header (message=0x470f90, unix_header=1, weedc=65535, weedv=0x4042c8 <__libc_csu_init>) at readmsg.c:353
353                   if (weedv[j][0] == '!')
(gdb) p j
$5 = 0
(gdb) p weedv[j][0]
Cannot access memory at address 0x910003fda9bc7bfd
(gdb) up
#1  0x0000000000403a2c in main (argc=2, argv=0xffffffffeb78) at readmsg.c:580
580             print_header (msg, unix_header, weedc, weedv);
(gdb) p weedc
$6 = 65535
(gdb) 
```

The test suite all passes if we initialize `int weedc = 0'!

Thanks,
Pierre

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]

  reply	other threads:[~2020-09-12 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 15:19 bug#43088: GNU Mailutils fails its test suite on aarch64 Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-09-12 12:24 ` Pierre Langlois [this message]
2020-09-13 12:20   ` Pierre Langlois
2020-09-16 16:41     ` Ludovic Courtès
2020-09-16 19:03       ` Pierre Langlois

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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo0z6v4i.fsf@gmx.com \
    --to=pierre.langlois@gmx.com \
    --cc=43088@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).