Login  Register

potential memory leak in dxfrw

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

potential memory leak in dxfrw

dxli
1985 posts
This post was updated on Jan 01, 2014; 3:42am.
Rallaz,

can you review my fixes:

https://github.com/LibreCAD/LibreCAD/commit/19c6b9e3759e6ecc36bbb935d7d637fa1ee24eda

I feel more fixes similar are still out there.

more similar fixes in my branch:

https://github.com/dxli/LibreCAD
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: potential memory leak in dxfrw

Rallaz
395 posts
I will do it,

But, for compability of older systems and programs I prefer that he does not have  std11 code,
because libdxfrw may be useful for others open source programs and we could have more feedback.

Cheers,
Rallaz
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: potential memory leak in dxfrw

dxli
1985 posts
Hi Rallaz,

right now, pretty much every platform supports c++11, so I'm not so worried.

I am not sure whether about the memory leak issue itself:

1, is there actually a memory leak?
2, is the smart pointer a proper fix, given a "yes" answer to question 1?

Thanks,

Dongxu


On Thu, Jan 2, 2014 at 5:33 AM, Rallaz [via LibreCAD] <[hidden email]> wrote:
I will do it,

But, for compability of older systems and programs I prefer that he does not have  std11 code,
because libdxfrw may be useful for others open source programs and we could have more feedback.

Cheers,
Rallaz


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/potential-memory-leak-in-dxfrw-tp5709327p5709334.html
To start a new topic under LibreCAD-dev, email [hidden email]
To unsubscribe from LibreCAD-dev, click here.
NAML



--
Dongxu Li, Ph.D.
www.librecad.org
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: potential memory leak in dxfrw

dxli
1985 posts
Hi Rallaz,

I have reverted my changes, because I found it causes segfault with dimensions.

This requires a 2.0.2 release soon.

dxli
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: potential memory leak in dxfrw

Rallaz
395 posts
Hi Dongxu,

The memory leak is present, at least, in drw_variant and drw_header.

I send two commits fixing it.

I made some test in linux and read/write process are OK.

May be a read/write tests in win & osX are required.

Cheers