[GHC] #11299: T5435_gcc_v fails on ARM

GHC ghc-devs at haskell.org
Sun Dec 27 15:22:10 UTC 2015


#11299: T5435_gcc_v fails on ARM
-------------------------------------+-------------------------------
        Reporter:  bgamari           |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Runtime System    |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:  arm
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------

Comment (by bgamari):

 I believe the issue here may be incomplete instruction cache flushing.
 With this patch,
 {{{#!patch
 diff --git a/rts/Linker.c b/rts/Linker.c
 index aadd8d4..1101dea 100644
 --- a/rts/Linker.c
 +++ b/rts/Linker.c
 @@ -2748,8 +2748,10 @@ static void
  ocFlushInstructionCache( ObjectCode *oc )
  {
      // Object code
 +    printf("Flushed %p - %p\n", oc->image, oc->image + oc->fileSize);
      __clear_cache(oc->image, oc->image + oc->fileSize);
      // Jump islands
 +    printf("Flushed %p - %p\n", oc->symbol_extras,
 &oc->symbol_extras[oc->n_symbol_extras]);
      __clear_cache(oc->symbol_extras,
 &oc->symbol_extras[oc->n_symbol_extras]);
  }

 @@ -5706,6 +5708,7 @@ static int ocRunInit_ELF( ObjectCode *oc )
           init_start = (init_t*)init_startC;
           init_end = (init_t*)(init_startC + shdr[i].sh_size);
           for (init = init_start; init < init_end; init++) {
 +            printf("init %p\n", init);
              (*init)(argc, argv, envv);
           }
        }
 }}}

 I see the following output on failure,
 {{{
 Flushed 0xb6ff7000 - 0xb6ff753c
 Flushed 0xb6ff6008 - 0xb6ff6138
 init 0xb6ff6190

 Program received signal SIGILL, Illegal instruction.
 0xb6ff7000 in ?? ()
 }}}
 Indeed it looks like the location with the initializer (0xb6ff6190) was
 never flushed.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11299#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list