[GHC] #7794: GHCi "Prelude.undefined" exceptions on ARM; ByteCodeItbls.mkJumpToAddr unimplemented

GHC ghc-devs at haskell.org
Tue Sep 10 19:25:27 CEST 2013


#7794: GHCi "Prelude.undefined" exceptions on ARM; ByteCodeItbls.mkJumpToAddr
unimplemented
-------------------------------+---------------------------
        Reporter:  cjwatson    |            Owner:
            Type:  bug         |           Status:  new
        Priority:  normal      |        Milestone:  7.8.1
       Component:  GHCi        |          Version:  7.6.2
      Resolution:              |         Keywords:
Operating System:  Linux       |     Architecture:  arm
 Type of failure:  GHCi crash  |       Difficulty:  Unknown
       Test Case:              |       Blocked By:
        Blocking:              |  Related Tickets:
-------------------------------+---------------------------

Comment (by cjwatson):

 Replying to [comment:4 RoboTux]:
 > Inlining the call of the cacheflush system call (the call behind
 {{{__clear_cache}}}) should work but it means the cache would be flush
 every time mkJumpToAddr is called. I don't know enough the context of the
 code generation but if that function is called several time after 1 code
 generation then it's suboptimal.

 It will be called every time one of the generated chunks of code is
 called, so I would expect it to be suboptimal, yes.  That in itself might
 be tolerable.

 Much more importantly, though, this patch misses the point of flushing the
 instruction cache.  The point is that we need to flush the cache in order
 for the processor to reliably read back the code that we just
 wrote out; flushing the cache in that very code is not a viable approach
 to that, because the cache-flushing code itself might not be read.  So I'm
 afraid I don't think this is going to work properly.  It might work some
 of the time, of course, depending on cache locality, but I can't see how
 it would work reliably.

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



More information about the ghc-tickets mailing list