Hi,

On 15.08.2013 10:10, Regina Henschel wrote:
Hi Oliver,

Oliver-Rainer Wittmann schrieb:
Hi,

Herbert, Andre and myself had a closer look on the error log of the
recent Linux 32bit build bot build (#456) and at the corresponding code.
It seems that there is a programming error in method
<SvgSvgNode::getCurrentViewPort()>.

I am working on it.

Please tell me, what is the problem there. I wrote it.


What Herbert, Andre and myself have figured out is the following:
Error message from Linux 32bit build bot says:
/home/buildslave20/slave20/openoffice-linux32-nightly/build/main/svgio/source/svgreader/svgsvgnode.cxx: In member function 'virtual const basegfx::B2DRange* svgio::svgreader::SvgSvgNode::getCurrentViewPort() const': /home/buildslave20/slave20/openoffice-linux32-nightly/build/main/svgio/source/svgreader/svgsvgnode.cxx:636:71: error: taking address of temporary [-fpermissive] /home/buildslave20/slave20/openoffice-linux32-nightly/build/main/svgio/source/svgreader/svgsvgnode.cxx:679:75: error: taking address of temporary [-fpermissive] /home/buildslave20/slave20/openoffice-linux32-nightly/build/main/svgio/source/svgreader/svgsvgnode.cxx:698:67: error: taking address of temporary [-fpermissive] make: *** [/home/buildslave20/slave20/openoffice-linux32-nightly/build/main/solver/400/unxlngi6.pro/workdir/CxxObject/svgio/source/svgreader/svgsvgnode.o] Error 1

The corresponding code line are:
- 636: return &basegfx::B2DRange(fX, fY, fX+fW, fY+fH);
- 679: return &basegfx::B2DRange(fX, fY, fX+fW, fY+fH);
- 698: return &basegfx::B2DRange(0.0, 0.0, fW, fH);
Thus, a pointer to a temporary created object is returned here and the return type of this method is <basegfx::B2DRange*>. The life time of such an object ends when the method ends. Thus, accessing the returned pointer outside the method means accessing 'dead' memory.

Best regards, Oliver.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to