Closed Bug 1350825 Opened 8 years ago Closed 8 years ago

Printf chops off output - bug in fwrite() call

Categories

(Core :: JavaScript Engine, enhancement, P1)

ARM
All
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

It looks like it prints partial lines, leaves out characters, whatever. For example: [Codegen# Emitting wasm code [Codegen 0333201c [Codegen 03332020 [Codegen 03332024 [Codegen 03332028 [Codegen# block0 ?:3840206052 [Codegen 1000 [Codegeninstruction WasmParameter [Codegeninstruction Integer [Codegen 0333202c [Codegeninstruction ShiftI:ursh [Codegen 03332030 [Codegeninstruction Integer [Codegen 03332034 [Codegeninstruction ModI [Codegen 03332038 [Codegen 0333203c [Codegen 03332040 [Codegen 03332044 [Codegen 03332048 [Codegen 0333204c Looks more like a generic printf problem than anything else.
This is an old bug that incorrectly checks the return value from fwrite() - depending on your point of view, it should compare to the number of objects written, namely 1, not the number of bytes written, n; or, it should reverse the arguments to fwrite so that it is n objects of size 1 each, and comparing to n is correct. The bug is presumably uncovered by the recent printf rewrite. Bug in vm/Printer.cpp:444.
Assignee: nobody → lhansen
Component: JavaScript Engine: JIT → JavaScript Engine
Priority: -- → P1
Summary: ARM disassembler utterly broken (printf broken?) → Printf chops off output - bug in fwrite() call
Change the order of arguments to fwrite, and label them. (Fingering nbp for a review since he wrote/ported the code but really would be nice to just land this asap, so anyone should feel free to jump in...)
Attachment #8851498 - Flags: review?(nicolas.b.pierron)
Attachment #8851498 - Flags: review?(nicolas.b.pierron) → review+
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/571ac5ec20ab get the order of arguments to fwrite right. r=nbp
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: