FreeBSD Bugzilla – Attachment 145447 Details for
Bug 192468
[PATCH] editors/libreoffice: deadlocks to render EPS file using GS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Patch
patch.txt (text/plain), 2.03 KB, created by
hiroto.kagotani
on 2014-08-07 14:03:56 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
hiroto.kagotani
Created:
2014-08-07 14:03:56 UTC
Size:
2.03 KB
patch
obsolete
>diff -ruN ../libreoffice.orig/files/patch-filter__source__graphicfilter__ieps__ieps.cxx ./files/patch-filter__source__graphicfilter__ieps__ieps.cxx >--- ../libreoffice.orig/files/patch-filter__source__graphicfilter__ieps__ieps.cxx 1970-01-01 09:00:00.000000000 +0900 >+++ ./files/patch-filter__source__graphicfilter__ieps__ieps.cxx 2014-08-07 19:00:36.000000000 +0900 >@@ -0,0 +1,59 @@ >+--- filter/source/graphicfilter/ieps/ieps.cxx.orig 2014-06-12 17:25:19.000000000 +0900 >++++ filter/source/graphicfilter/ieps/ieps.cxx 2014-08-07 19:00:28.000000000 +0900 >+@@ -36,6 +36,7 @@ >+ #include <unotools/tempfile.hxx> >+ #include <osl/process.h> >+ #include <osl/file.hxx> >++#include <osl/thread.h> >+ >+ class FilterConfigItem; >+ >+@@ -245,6 +246,29 @@ >+ return bRet; >+ } >+ >++struct WriteData >++{ >++ oslFileHandle m_pFile; >++ const sal_uInt8 *m_pBuf; >++ sal_uInt32 m_nBytesToWrite; >++}; >++ >++extern "C" { >++ >++static void WriteFileInThread(void *wData) >++{ >++ WriteData *wdata; >++ sal_uInt64 nCount; >++ wdata = (WriteData *)wData; >++ osl_writeFile(wdata->m_pFile, wdata->m_pBuf, wdata->m_nBytesToWrite, &nCount); >++ // File must be closed here. >++ // Otherwise, the helper process may wait for the next input, >++ // then its stdout is not closed and osl_readFile() blocks. >++ if (wdata->m_pFile) osl_closeFile(wdata->m_pFile); >++} >++ >++} >++ >+ static bool RenderAsBMPThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, >+ Graphic &rGraphic, OUString &rProgName, rtl_uString *pArgs[], size_t nArgs) >+ { >+@@ -258,11 +282,15 @@ >+ if (eErr!=osl_Process_E_None) >+ return false; >+ >++ WriteData Data; >++ oslThread hThread; >++ Data.m_pFile = pIn; >++ Data.m_pBuf = pBuf; >++ Data.m_nBytesToWrite = nBytesRead; >++ hThread = osl_createThread(WriteFileInThread, &Data); >++ >+ bool bRet = false; >+ sal_uInt64 nCount; >+- osl_writeFile(pIn, pBuf, nBytesRead, &nCount); >+- if (pIn) osl_closeFile(pIn); >+- if (nCount == nBytesRead) >+ { >+ SvMemoryStream aMemStm; >+ sal_uInt8 aBuf[32000];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 192468
: 145447