Closed Bug 6507 Opened 26 years ago Closed 26 years ago

[PP]PR_fprintf(PR_GetSpecialFD(PR_StandardOutput), "foo") asserts on Mac

Categories

(NSPR :: NSPR, defect, P3)

PowerPC
Mac System 8.5
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfraser_bugs, Assigned: sdagley)

Details

Calling PR_fprintf to try to print to stdout or stderror asserts on Mac, and fails to print the error. This is happening from the macros in nsIAppShellComponentImpl.h. It seems that NSPR isn't hooked up to print out to the SIOUX console in Mac debug builds.
I remember seeing code in NSPR or elsewhere in Mozilla that overrides all the stdio functions with no-op stubs. I don't know why we did that. If we can use the SIOUX console, we should reevaluate whether we still want to stub out the stdio functions.
Assignee: gordon → sdagley
Steve, you're the Mac NSPR man now, right?
Status: NEW → ASSIGNED
Target Milestone: M7
Yep, that'd be me and I've run into this issue before but didn't track it very far. I'll add it to my M7 plate.
Summary: PR_fprintf(PR_GetSpecialFD(PR_StandardOutput), "foo") asserts on Mac → [PP]PR_fprintf(PR_GetSpecialFD(PR_StandardOutput), "foo") asserts on Mac
This stubbed out stdio code was to prevent attempts to write to stderr from trashing the System file (the file ref num for the system file is 2 which happens to == stderr). Obviously we need a better fix than stubbing out these calls with an assert and I'm looking in to it.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed. The stubbed out code has been replaced with code that does a puts() on the buffer when the file refnum is for stdout or stderr.
Target Milestone: M7 → ---
You need to log in before you can comment on or make changes to this bug.