#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):

 Replying to [comment:18 simonmar]:
 > Looks like you're getting closer to nailing this one.  If you turn on
 linker debugging (`+RTS -Dl`) you should be able to see it resolving the
 relocation at that address, and that should give you enough information to
 map it to a source file.  Once you have the source file, you can look at
 the assembly and see what the relocation is supposed to be doing.

 Yes, turning on linker debugging is the plan.  I've needed to add some
 additional debug statements to find out what happens to the `__const`
 section of the `__TEXT` segment.  This is supposed to be non-relocatable
 static data, which by my reading of the documentation means loaded at a
 specified offset from the `__text` section.  One of two things is
 happening: in the statement that loads `$xmm7`,
 {{{
         movsd  0x281b7c(%rip),%xmm7
 }}}
 either the offset from the instruction pointer is wrong, or the expected
 data isn't at that location.  In the saved assembly files, I've found a
 number of places where `(-<double>)` is computed, and the sign bit mask
 seems always stored in the `__const` section of `__TEXT`.  If the data's
 in the wrong place, I'm guessing either an alignment bug or something
 really odd that puts it in the wrong section.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4867#comment:19>
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