[CDRIVER-2046] Invalid read in libbson-release Created: 13/Feb/17  Updated: 03/May/17  Resolved: 03/Mar/17

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.6.0
Fix Version/s: 1.7.0

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

Issue Links:
Duplicate
is duplicated by CDRIVER-2011 libbson fuzztest failure Closed

 Description   

The valgrind task in libbson-release is failing due to an invalid read

[2017/02/01 12:47:12.936] ==31702== Invalid read of size 1
[2017/02/01 12:47:12.936] ==31702==    at 0x4E52A56: _bson_iter_next_internal (bson-iter.c:576)
[2017/02/01 12:47:12.936] ==31702==    by 0x4E52E56: bson_iter_next (bson-iter.c:769)
[2017/02/01 12:47:12.936] ==31702==    by 0x4134E2: test_bson_iter_fuzz (test-iter.c:251)
[2017/02/01 12:47:12.937] ==31702==    by 0x40557A: TestSuite_AddHelper (TestSuite.c:309)
[2017/02/01 12:47:12.937] ==31702==    by 0x405938: TestSuite_RunTest (TestSuite.c:444)
[2017/02/01 12:47:12.937] ==31702==    by 0x406088: TestSuite_RunSerial (TestSuite.c:720)
[2017/02/01 12:47:12.937] ==31702==    by 0x40641B: TestSuite_Run (TestSuite.c:799)
[2017/02/01 12:47:12.937] ==31702==    by 0x406666: main (test-libbson.c:55)
[2017/02/01 12:47:12.937] ==31702==  Address 0x59fc9f0 is 0 bytes after a block of size 512 alloc'd
[2017/02/01 12:47:12.937] ==31702==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
[2017/02/01 12:47:12.937] ==31702==    by 0x4E5B317: bson_malloc (bson-memory.c:68)
[2017/02/01 12:47:12.937] ==31702==    by 0x4E4CD70: bson_sized_new (bson.c:1945)
[2017/02/01 12:47:12.937] ==31702==    by 0x4E4CEA4: bson_new_from_data (bson.c:1978)
[2017/02/01 12:47:12.937] ==31702==    by 0x413279: test_bson_iter_fuzz (test-iter.c:235)
[2017/02/01 12:47:12.937] ==31702==    by 0x40557A: TestSuite_AddHelper (TestSuite.c:309)
[2017/02/01 12:47:12.937] ==31702==    by 0x405938: TestSuite_RunTest (TestSuite.c:444)
[2017/02/01 12:47:12.937] ==31702==    by 0x406088: TestSuite_RunSerial (TestSuite.c:720)
[2017/02/01 12:47:12.937] ==31702==    by 0x40641B: TestSuite_Run (TestSuite.c:799)
[2017/02/01 12:47:12.937] ==31702==    by 0x406666: main (test-libbson.c:55)
[2017/02/01 12:47:12.937] ==31702==

See: https://evergreen.mongodb.com/task/libbson_release_releng_debug_compile_valgrind_b98e2bd1e5131b47bbc0c27cba2bbd2a17139b70_17_02_01_17_42_19



 Comments   
Comment by A. Jesse Jiryu Davis [ 03/Mar/17 ]

Fixed: https://github.com/ajdavis/libbson/commit/b12964a09f5191bcd8138fb34f3d0f3339af32ff

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