Hi Steve, Am Donnerstag, den 29.03.2012, 18:09 +0100 schrieb Steve McIntyre: > There's a problem with libffi that has been recently fixed - see > > http://lists.debian.org/debian-arm/2012/03/msg00108.html > > for more information. So far, we only expect symptoms to show up on > armhf *but* it might be more widespread. Until recently, libffi didn't > support variadic functions properly. That's now been fixed in libffi, > but there's an extra API call necessary in places where variadics are > used. > > In the scan of the archive I've just done, it seems that the vast > majority of the packages I can find that may be affected (i.e. callers > of "ffi_prep_cif" are implemented in Haskell. What I assume I'm seeing > here is simply a consequence of Haskell core code being embedded by > the compiler at compile time, so it should be possible to fix the > issue in one place and simply rebuild the affected packages.
yes, that is correct. It will burn many watthours and heat up the athmosphere a bit, but otherwise this is no problem. When it is ready we can also see if there is a new GHC version coming up that would require a full rebuild anyways. > So, I've looked at the ghc source code in an attempt to find/check/fix > this issue where possible. What I've found is that Haskell source > means *very* little to me (*grin*), so I'm here to ask for help from > some more knowledgeable people. Could one of you help with: > > * checking the code to see if variadics are passed/used > * a patch to use ffi_prep_cif_var() where necessary > > please? I know little about libffi and what the actually issue is (I only skimmed the referenced mails). I believe, though, that to fix this issue you will only have to worry about the run time system of Haskell, implemented in C, and not touch any Haskell code. You can start here: $ fgrep -r ffi_prep_cif rts/|grep -v dist rts/Adjustor.c: r = ffi_prep_cif(cif, abi, n_args, result_type, arg_types); rts/Adjustor.c: if (r != FFI_OK) barf("ffi_prep_cif failed: %d", r); rts/win32/libHSffi.def: ffi_prep_cif rts/Linker.c: SymE_NeedsProto(ffi_prep_cif) Can you have another look at that part of the code and see if you feel comfortable with fixing it? Greetings, Joachim -- Joachim "nomeata" Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
signature.asc
Description: This is a digitally signed message part