Closed Bug 1790873 Opened 3 years ago Closed 1 year ago

Cannot use printf_stderr from within js/src/

Categories

(Firefox Build System :: General, defect, P3)

defect

Tracking

(firefox123 fixed)

RESOLVED FIXED
Tracking Status
firefox123 --- fixed

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(6 files)

I don't know if this is specific to js/src, fwiw.

When I #include "mozilla/glue/Debug.h" from within js/src/gc/Marking.cpp, the build fails because it can't find #include_next <io.h>. If I fix that, it fails because it doesn't know _fileno(), _dup(), or _fdopen() by their underscore prefixed names. If I fix that (or rather, hack around it on Linux), then it seems to work, though I'm very doubtful that my fixes are correct and will work cross-platform.

Assignee: nobody → sphink
Status: NEW → ASSIGNED
Blocks: 1794063
Attachment #9309274 - Attachment description: Bug 1790873: Copy printf_stderr into SpiderMonkey. r=tcampbell → Bug 1790873: Add js::DumpFmt as a convenient equivalent to printf_stderr. r=tcampbell
Attachment #9294709 - Attachment description: Bug 1790873 - Allow using printf_stderr() within js/src → Bug 1790873 - Move printf_stderr() to mozglue so it can be used within js/src
Severity: -- → S3
Priority: -- → P3
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/9c425d724b81 Add js::DumpFmt as a convenient equivalent to printf_stderr. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

Oops. I was waiting for Nika's feedback, but didn't realize this bug had been closed because of the js::DumpFmt patch landing.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Nika: sorry for the confusion, but I'd like some guidance before doing any more work on this bug. I hadn't realized this bug was closed. And having some solution here would be useful in tracking down a crash whose frequency has been climbing.

Flags: needinfo?(nika)
Keywords: leave-open

Commented on the bug - apologies I'm not very on top of comments without corresponding ni?s or review requests.

Flags: needinfo?(nika)

The leave-open keyword is there and there is no activity for 6 months.
:sfink, maybe it's time to close this bug?
For more information, please visit BugBot documentation.

Flags: needinfo?(sphink)
Status: REOPENED → ASSIGNED

The following patch is waiting for review from an inactive reviewer:

ID Title Author Reviewer Status
D166853 Bug 1790873 - Use stderr directly in printf_stderr rather than opening a separate file sfink nika: Back Jan 2, 2024

:sfink, could you please find another reviewer or abandon the patch if it is no longer relevant?

For more information, please visit BugBot documentation.

Flags: needinfo?(sphink)

:sfink, could you please find another reviewer or abandon the patch if it is no longer relevant?

Nope. Leave me alone bugbot, she's the right reviewer. It can wait.

Flags: needinfo?(sphink)
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/01ddb562d770 Send a full line at a time to printf_stderr in CompositorOGL.cpp r=jgilbert https://hg.mozilla.org/integration/autoland/rev/296f6da7b6ed Send a full line at a time to printf_stderr in nsUniscribeBreaker.cpp r=bobowen https://hg.mozilla.org/integration/autoland/rev/6934f2978802 Use stderr directly in printf_stderr rather than opening a separate file r=glandium,nika https://hg.mozilla.org/integration/autoland/rev/442a0de27b61 Move printf_stderr() to mozglue so it can be used within js/src r=glandium,nika

Backed out for causing Linux spidermonkey builds bustages in Printer.h.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/workspace/obj-spider/dist/include/js/Printer.h:343:8: error: virtual function 'put' has a different return type ('bool') than the function it overrides (which has return type 'void')

L.E. There are also these sm bustages on Windows.

And also build bustages on other platforms.

Flags: needinfo?(sphink)
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/10e398febafa Send a full line at a time to printf_stderr in CompositorOGL.cpp r=jgilbert https://hg.mozilla.org/integration/autoland/rev/cccf8c596465 Send a full line at a time to printf_stderr in nsUniscribeBreaker.cpp r=bobowen https://hg.mozilla.org/integration/autoland/rev/cd72b5ac2727 Use stderr directly in printf_stderr rather than opening a separate file r=glandium,nika https://hg.mozilla.org/integration/autoland/rev/07c9202e33b5 Move printf_stderr() to mozglue so it can be used within js/src r=glandium,nika
Target Milestone: 111 Branch → ---
Flags: needinfo?(sphink)
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df68bb60104c Send a full line at a time to printf_stderr in GLContext.cpp r=jgilbert
Status: ASSIGNED → RESOLVED
Closed: 3 years ago1 year ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: