View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000294 | luatex | luatex bug | public | 2009-11-09 12:37 | 2009-12-18 11:07 |
Reporter | Hans Hagen | Assigned To | Taco | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
OS | Win32 | ||||
Target Version | 0.47.0 | Fixed in Version | 0.47.0 | ||
Summary | 0000294: corrupt pdf file due to no check for inclusion change | ||||
Description | As a side effect of delayed inclusion, a corrupt pdf file can be generated when a pdf file with the same name but different content is included. (example test sent to hartmut) So, we need a guard i.e. test for file change (timestamp/size) or so. | ||||
Tags | No tags attached. | ||||
|
The underlying problem here is (I think) that Windows is perfectly willing to accept other applications overwriting a file that you have already opened for reading. Adding an explicit lock inside xpdf should fix that, via Index: source/libs/xpdf/xpdf-3.02/xpdf/PDFDoc.cc =================================================================== --- source/libs/xpdf/xpdf-3.02/xpdf/PDFDoc.cc (revision 3187) +++ source/libs/xpdf/xpdf-3.02/xpdf/PDFDoc.cc (working copy) @@ -18,6 +18,8 @@ #include <string.h> #ifdef WIN32 # include <windows.h> +# include <io.h> +# include <sys/locking.h> #endif #include "GString.h" #include "config.h" @@ -127,6 +129,8 @@ errCode = errOpenFile; return; } + /* block other processes from messing with the file */ + _locking(_fileno(file), _LK_LOCK, 0xFFFFFFFFL); // create stream obj.initNull(); |
|
Revision #3200 acquires an exclusive lock on the pdf file under win32 |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-11-09 12:37 | Hans Hagen | New Issue | |
2009-11-09 12:37 | Hans Hagen | Status | new => assigned |
2009-11-09 12:37 | Hans Hagen | Assigned To | => hhenkel |
2009-11-18 12:13 | Taco | Relationship added | related to 0000282 |
2009-11-30 17:29 | Taco | Note Added: 0000356 | |
2009-11-30 17:58 | Taco | OS | => Win32 |
2009-11-30 17:59 | Taco | Status | assigned => resolved |
2009-11-30 17:59 | Taco | Resolution | open => fixed |
2009-11-30 17:59 | Taco | Note Added: 0000357 | |
2009-12-02 14:35 | Taco | Assigned To | hhenkel => Taco |
2009-12-02 14:35 | Taco | Target Version | => 0.50.0 |
2009-12-18 11:06 | Taco | Target Version | 0.50.0 => 0.47.0 |
2009-12-18 11:06 | Taco | Fixed in Version | => 0.47.0 |
2009-12-18 11:07 | Taco | Status | resolved => closed |