Your message dated Sun, 28 Aug 2022 10:47:28 +0000
with message-id <e1osfpa-00fjs8...@fasolo.debian.org>
and subject line Bug#934081: fixed in esorex 3.13.1-1+deb10u1
has caused the Debian Bug report #934081,
regarding esorex: testsuite failures on armhf/riscv64 due to wrong usage of 
ffi_prep_cif
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
934081: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934081
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: esorex
Version: 3.13.2+dfsg-1
Severity: normal
Tags: upstream patch
User: debian-ri...@lists.debian.org
Usertags: riscv64

esorex fail to build from source on riscv64 due to two failures in the
testsuite:

| PASS: esorex_json_parse_errors1-test
| ../../admin/test-driver: line 107:  2130 Aborted                 "$@" > 
$log_file 2>&1
| FAIL: esorex_json-test
| PASS: esorex_json_parser-test
| PASS: esorex_json_parse_errors2-test
| PASS: esorex_json_parse_errors3-test
| ../../admin/test-driver: line 107:  2133 Aborted                 "$@" > 
$log_file 2>&1
| FAIL: esorex_json_internal-test
| PASS: esorex_json_parse_errors4-test
| PASS: esorex_python_errors1-test
| PASS: esorex_python_errors2-test
| PASS: esorex_python_errors4-test
| SKIP: esorex_python_recipe-test
| PASS: esorex_python-test
| PASS: esorex_python_errors3-test
| PASS: esorex_python_internal-test

A full build log is available there:
https://buildd.debian.org/status/fetch.php?pkg=esorex&arch=riscv64&ver=3.13.2%2Bdfsg-1&stamp=1564942941&raw=0

After some debugging I have found that libffi is called incorrectly in
src/er_json.c. The ffi_prep_cif() function is used to prepare a call to
cpl_parameter_new_enum(), however this function is a variadic function.
In that case depending on the architecture, the arguments, and their
order the ABI might be slightly different. That's why ffi_prep_cif_var
must be used instead for variadic functions. See the libffi manual for
more details:

http://www.chiark.greenend.org.uk/doc/libffi-dev/html/The-Basics.html

ffi_prep_cif_var() takes the number of fixed arguments, 4 in the case of
cpl_parameter_new_enum(), and the total number of arguments just like
ffi_prep_cif().

Therefore here is a small patch fixing the issue:

--- esorex-3.13.2+dfsg.orig/src/er_json.c
+++ esorex-3.13.2+dfsg/src/er_json.c
@@ -3714,8 +3714,8 @@ static cpl_parameter * json_to_parameter
                            || type == CPL_TYPE_STRING);
                     break;
             }
-            if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, nargs, &ffi_type_pointer,
-                             argtypes)
+            if (ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 4, nargs,
+                                 &ffi_type_pointer, argtypes)
                 == FFI_OK)
             {
                 ffi_call(&cif, (void (*)(void))&cpl_parameter_new_enum, &param,

With it the testsuite fully passes on riscv64, and I also see no
regression on amd64.

Regards,
Aurelien

--- End Message ---
--- Begin Message ---
Source: esorex
Source-Version: 3.13.1-1+deb10u1
Done: Adrian Bunk <b...@debian.org>

We believe that the bug you reported is fixed in the latest version of
esorex, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 934...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Adrian Bunk <b...@debian.org> (supplier of updated esorex package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 27 Aug 2022 20:50:28 +0300
Source: esorex
Architecture: source
Version: 3.13.1-1+deb10u1
Distribution: buster
Urgency: medium
Maintainer: Debian Astronomy Team 
<debian-astro-maintain...@lists.alioth.debian.org>
Changed-By: Adrian Bunk <b...@debian.org>
Closes: 893206 934081
Changes:
 esorex (3.13.1-1+deb10u1) buster; urgency=medium
 .
   * Non-maintainer upload.
   * Fix testsuite failures on armhf and ppc64el caused by incorrect
     libffi usage. (Closes: #934081)
   * Re-enable Python tests on armhf and ppc64el. (Closes: #893206)
Checksums-Sha1:
 3097c512e5d40c56384f87ae5427f0405abfe221 2103 esorex_3.13.1-1+deb10u1.dsc
 e5d51450ab333d6f227c62b2ecfefb79df411d17 70312 
esorex_3.13.1-1+deb10u1.debian.tar.xz
Checksums-Sha256:
 7024579ce72cfea29f65d4c6787586f60ec45b2d6c9c7eb7b6330dbc8d26ec83 2103 
esorex_3.13.1-1+deb10u1.dsc
 7cf8ab227706d328f9dc4d0cc2588464df6e9698c81c412c086e7dc2aad662ac 70312 
esorex_3.13.1-1+deb10u1.debian.tar.xz
Files:
 b0c4261c0a345fd46e1ddb653cf72573 2103 science optional 
esorex_3.13.1-1+deb10u1.dsc
 9d8c63900f0d55d7859536493d7459c8 70312 science optional 
esorex_3.13.1-1+deb10u1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEOvp1f6xuoR0v9F3wiNJCh6LYmLEFAmMKWzsACgkQiNJCh6LY
mLE2bQ//XmRRxATq805MXxYUxCvBnUSrXz+og6lC00qRRRr6SiFKIyODDT3BlR/F
esv4xkEcrfAtC5BeGEYkZlWNFB8z2y353B+LC7rczt/RYNCSH/xs2yD0BI7KNIDK
aI1v5sl0QZQ5M79ghlM110ujmn78200Qu5SOirzf1OsalM3w4QjN9xFC01glrGBP
6vhxZva8/5o2AoawX0Kqpp1TdTThibmcMENc1ckjjo/zGLTS7h1srZQ0PS1a/MBT
rjKDwu0VKMYn1t+2f7Nvep/08UUSN8KXezmZlAkYJ32SosCAsEKOBLErA7IpF7bX
ZxPXz6D/cPDyHx1hTumpIXbrDrUgsOfwM8ZfHHbxgtfr84YA+lVtdL51r65nP+hf
1JAz/ThCD2ea1LH8iCWEcLBCKJjQRwvc3yzuK1uejgr8gynwV6e4EpFTzwIg2fFF
A0oA+p2F7f16DMFmrkcsGkkiWPTrT/ck/PdzT+mfmdPLxQMuWDZaFrGDbPDOlluG
Ni74BECsTFeP6QRlkp01zfJTc4cjeSBQb6gOTYdshP6RzwDiivFLNBjUtqy66Kd6
YivO+XFNmVnP7rf5sYumvVwv1xN8zAyXtInFnS5sSEKi0kqkLNF6gzkxUdhwvuIx
RMry43u+54f1meJOfq+dQEB9TrQN+H1X/RQMImmfjiaPRxFScnk=
=yXcI
-----END PGP SIGNATURE-----

Attachment: pgpDdk3ta8Vm5.pgp
Description: PGP signature


--- End Message ---

Reply via email to