bug-guix
[Top][All Lists]
Advanced

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

bug#43088: GNU Mailutils fails its test suite on aarch64


From: Pierre Langlois
Subject: bug#43088: GNU Mailutils fails its test suite on aarch64
Date: Sat, 12 Sep 2020 13:24:13 +0100
User-agent: mu4e 1.4.13; emacs 27.1

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: signature.asc
Description: PGP signature


reply via email to

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