#5899: RTS crash w/ strange closure type 603975781 on OS X 10.8
-----------------------------------------------------------+----------------
Reporter: dylukes | Owner:
Type: bug | Status: new
Priority: high | Milestone:
7.4.2
Component: Runtime System | Version:
7.4.1
Keywords: rts, strange closure, internal error, os x | Os:
MacOS X
Architecture: x86_64 (amd64) | Failure:
Runtime crash
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
-----------------------------------------------------------+----------------
Comment(by chak):
Replying to [comment:24 simonmar]:
> I'm a bit bemused at how the linker can get away with reordering code
within an object file. The behaviour seems to be inconsistent with the
man page for ld, which says
>
> The object files are loaded in the order in which they are
specified on
> the command line. The segments and the sections in those segments
will
> appear in the output file in the order they are encountered in the
object
> files being linked.
> [...]
> The use of the -order_file option will alter the layout rules
above, and
> move the symbols specified to start of their section.
>
> which doesn't explicitly say that code within a section will not be
reordered, but it strongly implies that.
But don't the `-no_order_inits` and `-no_order_data` options make it clear
that reordering within sections is happening?
In fact, can't we use `-order_file` to solve this problem once and for
all?
-order_file file
Alters the order in which functions and data are laid
out.
For each section in the output file, any symbol in that
sec-
tion that are specified in the order file file is moved
to
the start of its section and laid out in the same order
as in
the order file file. Order files are text files with one
symbol name per line. Lines starting with a # are
comments.
A symbol name may be optionally preceded with its object
file
leaf name and a colon (e.g. foo.o:_foo). This is useful
for
static functions/data that occur in multiple files. A
symbol
name may also be optionally preceded with the
architecture
(e.g. ppc:_foo or ppc:foo.o:_foo). This enables you to
have
one order file that works for multiple architectures.
Lit-
eral c-strings may be ordered by by quoting the string
(e.g.
"Hello, world\n") in the order file.
In fact, the man page makes it sound as if we can achieve TNTC without any
hacks using an order file on OS X.
Or am I missing something?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5899#comment:25>
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