Wed Jan 23 13:59:48 2013: Request 82916 was acted upon.
Transaction: Ticket created by SHUTTON
       Queue: PAR-Packer
     Subject: Terminating during unpack results in corrupted cache, failure on
 next start
   Broken in: 1.014
    Severity: (no value)
       Owner: Nobody
  Requestors: shut...@pobox.com
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=82916 >


If a compiled script is killed while writing out its archive, a 
partially-written cache file may result 
(often a short extraction of libperl.so, as that tends to be the largest file 
in the archive).  The 
present code in myldr/boot.c:extract_embedded_file() is willing to write a 
missing file, but not 
overwrite a partially-written file (one where the size in the archive differs 
from the size on the 
filesystem), resulting in an abort with a fatal "file exists" error.

The attached patch permits the loader to overwrite a corrupt file.  I added a 
warning to stderr to 
report this condition, but that may or may not be appropriate.  It was a useful 
diagnostic aid for 
my purposes.


Attachment: boot.c.diff
Description: Binary data

Reply via email to