#4867: ghci displays negative floats incorrectly (was: Incorrect result from 
trig
functions)
-------------------------------+--------------------------------------------
    Reporter:  gwright         |        Owner:  gwright                    
        Type:  bug             |       Status:  new                        
    Priority:  high            |    Milestone:  7.0.2                      
   Component:  GHCi            |      Version:  7.0.1                      
    Keywords:                  |     Testcase:                             
   Blockedby:                  |   Difficulty:                             
          Os:  MacOS X         |     Blocking:                             
Architecture:  x86_64 (amd64)  |      Failure:  Incorrect result at runtime
-------------------------------+--------------------------------------------

Comment(by gwright):

 The memory images are aligned properly. This isn't surprising, since the
 linker is using `mmap` and `mmap` aligns on 16 byte boundaries, which is
 the most restrictive that the linker requires.

 I think the misalignment comes from the way I use the `relocateAddress`
 function. A perusal of my favorite bedtime reading, Apple's "ABI Mach-O
 File Format Reference", tells me that for non-external relocations, the
 `r_symbolnum` field of the `reloc` structure is used as index to the
 target section. (A potential gotcha is that the `r_symbolnum` field counts
 sections from 1 while the linker counts sections from 0. The code must
 have been written by a frustrated `FORTRAN` programmer.) I'm testing now
 what I think should be the correct relocation calculation using the target
 section information.

 I'll do a fresh pull, make a minimal patch and run the whole test suite
 once this works.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to