Hi,

The Address Sanitizer is really great. I thought I need a really long debug session but it gave me the information I needed to fix the bug. So the fix is checked in. And there was another possible memory leak in rpc server which the address sanitizer detected.


Tommi



Am 08.02.2015 um 10:42 schrieb Tommi Mäkitalo:
Hi,

I did not know about Address Sanitizer. It looks great. I tried it and it gives good information about the problem. I will look at it.

Tommi

Am 04.02.2015 um 03:07 schrieb Steve Gieseking:

I have been looking to use cxxtools in some projects that require both Linux and Windows support. As part of doing some testing in compiling with Cygwin, I was getting segmentation faults with the rpcechoclient demo. The application runs but then generates faults when cleaning up at the end of execution. I went back to the standard Linux version (master branch) and was able to recreate the problem compiling with Address Sanitizer. I don’t get this problem with the 2.2.1 release.

What seems to be happening is that Connection::close() is being called with an object that is part of the list in the Connectable class. Inside Connectable::onConnectionClose(), it finds the element and removes it which calls the destructor. When it returns back, you are in the object that you just called the destructor for.

With the standard Linux compilation, it basically ignores it. With Address Sanitizer added, it will detect that the object has already been deleted and generate an error.

Below is a trace the code with various trace and debug statements added.

The object that is a problem is at address 0x60300000abe0.

At 2015-02-03 15:00:40.52715, it is created.

At 2015-02-03 15:00:40.53251, it’s close function is called.

At 2015-02-03 15:00:40.53268, it’s destructor is called.

It is still accessed when returning and causes a Heap Use After Free error.

Steve



------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/


_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to