Hi Michael.
Thanks so much for the work. I hope is merged soon into branch and we are allowed to fix the diferences on execution from compilations in debug mode and in release mode actualy happends.
As far I know this new branch can be used with modern linux distributions but not broke older ones. Is correct?
I have the zip in my inbox with the problems you find with your first test. I try to wait to be merged to start fixing the long list.
All the best, Jabier.
On Thu, 2017-09-07 at 22:34 +0200, Michael Soegtrop via Inkscape-devel wrote:
Dear Jabier,
as discussed, I tested the Sanitzer builds with Debian 9 - works well. I can now configure 4 sanitizer variants with CMake D Parameters like this:
-D SANITIZE_ADDRESS=ON -D SANITIZE_MEMORY=OFF -D SANITIZE_THREAD=OFF -D SANITIZE_UNDEFINED=ON
address and undefined can be enabled together, the other two options require separate builds with only one option enabled.
When I set
export ASAN_OPTIONS=halt_on_error=0
before you start inkscape, it will not stop on errors. Then you get the output in sanitizer-sample-1.txt until inkscape reaches the main screen. It looks all like new/delete mismatches which usually come from forgetting to define a destructor virtual. If I disable these as well with:
export ASAN_OPTIONS=new_delete_type_mismatch=0
it is clean until reaching main screen. The second attached file is from shutdown and shows just memory leaks. So chances are not bad that the Sanitizer will be useful for specific issues without a lot of upfront debugging.
The detection and configuration of the sanitizers is done by CMake scripts I took from another project (compatible licenses). You get all 4 variants with gcc 6.xx. With earlier variants only the address sanitizer works. The changes to the inkscape CMake files are minimal, all is in separate CMake modules.
I will do some more tests on Saturday and do a pull request then, but you can already look at it here:
https://gitlab.com/MSoegtrop/inkscape/commits/sanitizer
It is just one commit you can easily merge.
Best regards,
Michael
P.S.: attachments as ZIP didn't get through and are way large unzipped. If someone is interested in the Sanitizer errors, please send me a mail.
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel