Closed Bug 5451 Opened 26 years ago Closed 25 years ago

Big file reads and writes are broken on NT.

Categories

(NSPR :: NSPR, defect, P1)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: larryh)

Details

In the NT implementation of NSPR, PR_Read and PR_Write don't work right on big files. This is because we are not setting the OffsetHigh field of the OVERLAPPED structure, so OffsetHigh always has the value of 0. The reason we didn't notice this problem before is probably that PR_Read and PR_Write are wrong in the same way, so if a test (e.g., bigfile.c) uses PR_Read and PR_Write, data written to the wrong offset by PR_Write can still be read back correctly by PR_Read. I wrote two tests that use PR_Write with Win32 ReadFile or Win32 WriteFile with PR_Read, and was able to verify this bug with a file offset 0x100000000.
Status: NEW → ASSIGNED
The two test programs are checked in: bigfile2.c and bigfile3.c. They still need more work.
NSPR now has its own Bugzilla product. Moving this bug to the NSPR product.
phillip gone, removing him from qa contact, sorry for spam
Priority: P3 → P1
re-assign to larryh@netscape.com
Assignee: wtc → larryh
Status: ASSIGNED → NEW
Changed ntio.c to use the OffsetHigh member of the overlapped buffer. new revision: 3.20.4.4; previous revision: 3.20.4.3
Fixed. Changes reviewed by wtc.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.