[CDRIVER-747] Test with address sanitizer Created: 15/Jul/15  Updated: 25/Oct/16  Resolved: 25/Oct/16

Status: Closed
Project: C Driver
Component/s: tests
Affects Version/s: None
Fix Version/s: 1.5.0

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-1403 Potential buffer overrun in bson_strndup Closed
related to CDRIVER-1055 Unit Tests Under -fsanitize=address T... Closed
related to CDRIVER-1874 Re-enable debug-compile-valgrind suite Closed
related to CDRIVER-1051 ASAN/UBSAN: misaligned address Closed
Epic Link: C Driver in Evergreen

 Description   

There are several options for testing C code with an address sanitizer (asan, valgrind drd, ...), pick one and run in continuous integration. The driver should not ship with address sanitizer warnings.



 Comments   
Comment by Hannes Magnusson [ 25/Oct/16 ]

We now run the serverless tests under valgrind.
I've fixed a slew of issues this found, but not all.

Comment by Githook User [ 25/Oct/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-747: Run the test suite through valgrind
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d8206ebd6fab9b7b3f9dffacc23a7de6d052d716

Comment by Githook User [ 30/Jun/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-747: Add address sanitizer and scan-build buildvariants
Branch: master
https://github.com/mongodb/libbson/commit/99625ebeea83bd9b51d2a76c2b1583dcad2ec282

Comment by Githook User [ 09/Jun/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-747: Make valgrind return error on failure
Branch: master
https://github.com/mongodb/libbson/commit/0edfe2c932e33cf53ba068feae42c2bde77537a7

Comment by A. Jesse Jiryu Davis [ 16/Jul/15 ]

And fail if there are leaks or invalid accesses. Since there are leaks and invalid accesses reported by "make valgrind", those have to be diagnosed and fixed or suppressed.

Comment by Hannes Magnusson [ 15/Jul/15 ]

Doesn't this mean just to run "make valgrind" as apposed to currently "make test" in evergreen?

Generated at Wed Feb 07 21:10:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.