DescriptionSubzero: Fix asm (non-ELF) output files.
In an earlier version of Subzero, the text output stream object was
stack-allocated within main. A later refactoring moved its allocation
into a helper function, but it was still being stack-allocated, which
was bad when the helper function returned.
This change allocates the object via "new", which fixes that problem,
but reveals another problem: the raw_ostream object for some reason
doesn't finish writing everything to disk and yielding a truncated
output file. This is solved in the style of the ELF streamer, by
using raw_fd_ostream instead.
BUG= none
R=kschimpf@google.com
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=620ad732db0def93eee3928f9ebebe88b279f63d
Patch Set 1 #
Messages
Total messages: 4 (1 generated)
|