My bad, in fact we do.

Could you try with the attached patch? It shows the failing filename in the archive.


On 11/11/2016 17:18, Sylvain Henry wrote:

It seems like we don't bypass the special filename "/" (symbol lookup table) in rts/Linker.c

https://en.wikipedia.org/wiki/Ar_(Unix)#System_V_.28or_GNU.29_variant


On 11/11/2016 16:49, Ömer Sinan Ağacan wrote:
Ah, sorry, that line was truncated. I posted the output here: https://gist.githubusercontent.com/osa1/ea72655b8369099e84a67e0949adca7e/raw/9e72cbfb859cb839f1898af39a46ff0896237d15/gistfile1.txt

That line should be
+ghc-iserv.bin: internal loadArchive: GNU-variant filename offset not found 
while reading filename from 
`/home/omer/haskell/ghc/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.0.0.a'
+    (GHC version 8.1.20161107 for x86_64_unknown_linux)
+    Please report this as a GHC bug:http://www.haskell.org/ghc/reportabug

2016-11-11 0:52 GMT-05:00 Reid Barton <[email protected] <mailto:[email protected]>>:

    On Thu, Nov 10, 2016 at 11:12 PM, Ömer Sinan Ağacan
    <[email protected] <mailto:[email protected]>> wrote:
    > I'm trying to validate on a new system (not sure if related,
    but it has gcc
    > 6.2.1 and ld 2.27.0), and I'm having 177 unexpected failures,
    most (maybe
    > even
    > all) of them are similar to this one:
    >
    >     =====> T5976(ext-interp) 1 of 1 [0, 0, 0]
    >     cd "./th/T5976.run" && "/home/omer/haskell/ghc/inplace/test
    > spaces/ghc-stage2" -c T5976.hs -dcore-dno-debug-output
    -XTemplateHaskell
    > -package template-haskell -fexternal-interpreter -v0
    >     Actual stderr output differs from expected:
    >     --- ./th/T5976.run/T5976.stderr.normalised     2016-11-10
    > 23:01:39.351997560 -0500
    >     +++ ./th/T5976.run/T5976.comp.stderr.normalised 2016-11-10
    > 23:01:39.351997560 -0500
    >     @@ -1,7 +1,4 @@
    >     -
    >     -T5976.hs:1:1:
    >     -    Exception when trying to run compile-time code:
    >     -      bar
    >     -CallStack (from HasCallStack):
    >     -  error, called at T5976.hs:<line>:<column> in
    <package-id>:Main
    >     -    Code: error ((++) "foo " error "bar")
    >     +ghc-iserv.bin: internal loadArchive: GNU-variant filename
    offset not
    > found while reading filename f

    Did this line get truncated? It might help to have the rest of it.

    Regards,
    Reid Barton




_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs



_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

>From c3b4e28627b3e8a81d19648463280b3954bb518e Mon Sep 17 00:00:00 2001
From: Sylvain HENRY <[email protected]>
Date: Fri, 11 Nov 2016 17:37:12 +0100
Subject: [PATCH] Show failing filename

---
 rts/Linker.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index e46fc05..3a8fd53 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1540,7 +1540,10 @@ static HsInt loadArchive_ (pathchar *path)
                 thisFileNameSize = 0;
             }
             else {
-                barf("loadArchive: GNU-variant filename offset not found while reading filename from `%s'", path);
+                char tmp[17];
+                strncpy(tmp,fileName,16);
+                tmp[16] = '\0';
+                barf("loadArchive: invalid GNU-variant filename `%s' found while reading `%s'", tmp, path);
             }
         }
         /* Finally, the case where the filename field actually contains
-- 
2.10.2

_______________________________________________
ghc-devs mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to