Summary: | ASTERISK-24718: [patch]Add inital support of "sanitize" to configure | ||
Reporter: | Badalian Vyacheslav (slavon) | Labels: | |
Date Opened: | 2015-01-23 16:27:43.000-0600 | Date Closed: | 2015-12-14 14:22:00.000-0600 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/BuildSystem |
Versions: | SVN 11.15.0 11.16.0 11.20.0 13.3.2 13.6.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) 1.diff ( 1) add_sanitize.diff ( 2) san-address.log ( 3) san-leak.log ( 4) san-thread.log.gz ( 5) san-undefined.log | |
Description: | Tested on RedHat 6 with {{devtoolchain-3}} (gcc 4.9.1) installed
after apply patch need run {{./bootstrap.sh}} {quote} Please update the issue description with what the patch is doing {quote} Path add support to use ASAN (https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer) that was add to gcc 4.8+. You may use one of {{address}}, {{thread}} or {{memory}} sanitizer. To enable it you can simple do {{./configure --enable-sanitize=address}} {quote} and the reason the patch is being provided. {quote} Valgrind have poor perfomance... slow down 20x+ from native run. Address-sanitizer do only 2x slowdown, but break running after first error found. Becouse our production server have more 100 connected lines we can't test memory leaks. In valgrind run we can do only 5-7 connected lines :( Now we detect memory leaks using address-sanitizer. I'm provide patch to anyone else who want test with ASAN. | ||
Comments: | By: Badalian Vyacheslav (slavon) 2015-01-23 16:32:58.633-0600 Compiled. After removed ASTERISK-24717 modules normal start. Have some problems with stun, but sip is work. By: Matt Jordan (mjordan) 2015-01-23 16:45:15.524-0600 Please update the issue description with what the patch is doing, and the reason the patch is being provided. By: Badalian Vyacheslav (slavon) 2015-01-23 16:55:36.268-0600 Description was updated By: Rusty Newton (rnewton) 2015-01-30 17:34:31.883-0600 Badalian, do you want to test this and make sure it works with Trunk as well? (since it is a new feature) By: Badalian Vyacheslav (slavon) 2015-02-17 08:44:41.658-0600 Sorry for the long answer. Was on vacation. Patch tested on Asterisk 11.15 + gcc version 4.9.1 20140922 (Red Hat 4.9.1-10) (GCC) Gcc used from devtoolset-3: # scl enable devtoolset-3 bash Asterisk is compiled, run, and calls on SIP work. Some modules had to shut down, as soon as ASAN it gives an overflow error (codecs). After disabling everything works, no problems seeing. By: Rusty Newton (rnewton) 2015-02-20 12:26:08.829-0600 So it sounds like you haven't tested the addition in trunk then. Please test in trunk and then once you've followed the Code Review process [1] and submitted your code to Review Board [2] be sure to edit this JIRA issue and add the Review Board review URL in the appropriate field. Thanks! [1] https://wiki.asterisk.org/wiki/display/AST/Code+Review [2] https://wiki.asterisk.org/wiki/display/AST/Review+Board+Usage By: Badalian Vyacheslav (slavon) 2015-03-06 06:40:15.683-0600 Sorry, Test stand closed for external network and i can't use you software to pull changes. Patch tested on 11.16.0. All work done By: Badalian Vyacheslav (slavon) 2015-03-06 08:04:15.580-0600 tested with Centos 6 + devtoolset 2 (gcc 4.8.2) - all work done By: Badalian Vyacheslav (slavon) 2015-03-06 16:46:09.340-0600 Path updated. # patch -p1 < add_sanitize.diff # ,/bootstap.sh tested on 11.16.0 changelog: 1. Fix thread sanitize 2. Replace memory to leak sanitize Also attach real example output of sanitizer By: Badalian Vyacheslav (slavon) 2015-03-06 16:48:18.188-0600 Example output attached By: Badalian Vyacheslav (slavon) 2015-03-06 16:57:01.950-0600 Also look to THREAD sanitize log https://code.google.com/p/thread-sanitizer/wiki/CppManual {quote} A data race occurs when two threads access the same variable concurrently and at least one of the accesses is write. C++11 standard officially bans data races as undefined behavior.{quote} You have many POOR places in code. By: Badalian Vyacheslav (slavon) 2015-04-14 09:03:43.533-0500 work with 13.3.2 |