Ticket #710 (closed bug: fixed)
IO - On Win32, huge strings printed by Parrot do not appear in the console output.
| Reported by: | Util | Owned by: | whiteknight |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Version: | trunk |
| Severity: | medium | Keywords: | IO Win32 WriteFile |
| Cc: | Language: | ||
| Patch status: | Platform: | win32 |
Description
On r39029, the following PASM code should print a multi-line string of 1MB total length, followed by the numerical value of 1MB (1048576).
set I1, 16384 # fails when >= 832 repeat S0, "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE\n", I1 print S0 length I0, S0 say I0 end
When run in a command prompt window on Win32, the long string does not appear. Instead, only the length prints. Redirecting to a file causes all the output to show up correctly. Running the test on non-Win32 also causes all the output to show up correctly.
NotFound found that a call to the Win32 API "WriteFile" was failing with errorcode 8 [ERROR_NOT_ENOUGH_MEMORY].
In src/io/win32.c, sub Parrot_io_write_win32 calls WriteFile(), and fails silently on error. It is marked with FIXME. Fixing this will keep the failure from being silent, but will not resolve the failure by itself.
