From: Michal H. <ms...@gm...> - 2010-04-26 17:18:50
|
On Mon, Apr 19, 2010 at 11:50:18PM +0200, Michal Hocko wrote: > On Mon, Apr 19, 2010 at 09:20:33PM +0000, Jozef Misutka wrote: > > > On Sun, Apr 18, 2010 at 10:26:09PM +0000, Jozef Misutka wrote: > > >> Update of /cvsroot/pdfedit/pdfedit/src/xpdf/xpdf > > >> In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv17731 > > >> > > >> Modified Files: > > >> SplashOutputDev.cc > > >> Log Message: > > >> > > >> added null checks (otherwise crash on win32 test pdf file) > > > > > > This doesn't sound like a fix to me. How this can possibly happen? Is it > > > just a bad code usage or a bug in the code? > > > > > > I don't like the change because it papers over maybe a real bug. > > > Please revert the change and file a bug with the test pdf attached. > > > Maybe we will find out that the crash is not windows specific. > > > > I do not think that reverting a potential fix is better than having > > something working in the cvs. > > This is a plain hack. There are more places where the variable is used > and they are not checked. So you have basically turned off code paths > which happened to crash rather than checked out why that code crashed. So > I think that we should revert the change and properly find out the > reason. I can help with that if I am able to reproduce (could you send > the document?) What's up with this bug? Is it possible that it was caused by vitual methods mass caused by const cleanup? > > > It is easier to comment out a fix than to add it. > > But this doesn't help us to figure out what the problem is. > > > > > i will properly file the issue later. > > Why not now? Can you report it with the document attached to it? > > > > > > > jozef > > > > > > > >> > > >> Index: SplashOutputDev.cc > > >> =================================================================== > > >> RCS file: /cvsroot/pdfedit/pdfedit/src/xpdf/xpdf/SplashOutputDev.cc,v > > >> retrieving revision 1.6 > > >> retrieving revision 1.7 > > >> diff -u -d -r1.6 -r1.7 > > >> --- SplashOutputDev.cc 11 Sep 2009 12:02:56 -0000 1.6 > > >> +++ SplashOutputDev.cc 18 Apr 2010 22:26:06 -0000 1.7 > > >> @@ -2553,6 +2553,8 @@ > > >> const double *ctm; > > >> > > >> // restore state > > >> + if (!transpGroupStack) > > >> + return; > > >> delete splash; > > > > > > This is a potential memory leak! > > > > > >> bitmap = transpGroupStack->origBitmap; > > >> splash = transpGroupStack->origSplash; > > >> @@ -2567,6 +2569,8 @@ > > >> GBool isolated; > > >> int tx, ty; > > >> > > >> + if (!transpGroupStack) > > >> + return; > > >> tx = transpGroupStack->tx; > > >> ty = transpGroupStack->ty; > > >> tBitmap = transpGroupStack->tBitmap; > > > > > > -- > > > Michal Hocko > > > > > > ------------------------------------------------------------------------------ > > > Download Intel? Parallel Studio Eval > > > Try the new software tools for yourself. Speed compiling, find bugs > > > proactively, and fine-tune applications for parallel performance. > > > See why Intel Parallel Studio got high marks during beta. > > > http://p.sf.net/sfu/intel-sw-dev > > > _______________________________________________ > > > Pdfedit-devel mailing list > > > Pdf...@li... > > > https://lists.sourceforge.net/lists/listinfo/pdfedit-devel > > > > _________________________________________________________________ > > The New Busy is not the old busy. Search, chat and e-mail from your inbox. > > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3 > > -- > Michal Hocko > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Pdfedit-devel mailing list > Pdf...@li... > https://lists.sourceforge.net/lists/listinfo/pdfedit-devel -- Michal Hocko |