Ticket #296 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

I/O buffering failure on x86-64

Reported by: Infinoid Owned by:
Priority: normal Milestone:
Component: none Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

r36488 seems to have uncovered a bug in parrot's I/O. The pbc_to_exe tool fails to output the entire .c file before closing it and invoking gcc on it; it writes exactly 8192 bytes of data. This results in a failure during normal build when it tries to generate the "parrot_config" tool.

Pmichaud++ pointed out that the PIR code that does this generation is fairly simple, the whole code block is contained in a simple here-doc ( http://nopaste.snit.ch/15549).

Here's what the strace output looks like:

28143 open("parrot_config.c", O_WRONLY) = 3
28143 creat("parrot_config.c", 0644)    = 4
28143 close(4)                          = 0
28143 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
28143 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff45ac10f0) = -1 ENOTTY (Inappropriate ioctl for device)
28143 write(3, "#include \"parrot/parrot.h\"[SNIP]    if (!PackFile_unpac", 8192) = 8192
28143 fsync(3)                          = 0
28143 fsync(3)                          = 0
28143 fsync(3)                          = 0
28143 close(3)                          = 0

From #parrot, it sounds like this happens on x86-64 (linux and freebsd) but not x86 (linux and darwin). It is reproducible by PerlJam++, rg++ and myself.

Change History

Changed 6 years ago by Infinoid

  • status changed from new to closed
  • resolution set to fixed

Fixed in r36516.

Note: See TracTickets for help on using tickets.