Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valgrind report use of uninitialized memory in testarray.cpp::hasZeroByte #10

Closed
astigsen opened this issue Jan 2, 2012 · 24 comments
Closed

Comments

@astigsen
Copy link
Contributor

astigsen commented Jan 2, 2012

Valgrind report use of uninitialized memory in testarray.cpp::hasZeroByte

It is triggered in the unit test FindhasZeroByte at line 705, and in some of the following calls:

Alexanders-MacBook-Air:Debug alexanderstigsen$ valgrind --track-origins=yes ./tightdb_unit_tests 
==88587== Memcheck, a memory error detector
==88587== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==88587== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==88587== Command: ./tightdb_unit_tests
==88587== 
==88587== Conditional jump or move depends on uninitialised value(s)
==88587==    at 0x1000DCE09: Array::FindNaive(long long, unsigned long, unsigned long) const (Array.cpp:608)
==88587==    by 0x1000DCBEC: Array::Find(long long, unsigned long, unsigned long) const (Array.cpp:535)
==88587==    by 0x100019431: hasZeroByte(long long, unsigned long) (testarray.cpp:687)
==88587==    by 0x100019895: TestFindhasZeroByte::RunImpl() const (testarray.cpp:705)
==88587==    by 0x1000D542D: void UnitTest::ExecuteTest<UnitTest::Test>(UnitTest::Test&, UnitTest::TestDetails const&) (ExecuteTest.h:25)
==88587==    by 0x1000D4E7B: UnitTest::Test::Run() (Test.cpp:34)
==88587==    by 0x1000D6016: UnitTest::TestRunner::RunTest(UnitTest::TestResults*, UnitTest::Test*, int) const (TestRunner.cpp:61)
==88587==    by 0x1000D69B7: int UnitTest::TestRunner::RunTestsIf<UnitTest::True>(UnitTest::TestList const&, char const*, UnitTest::True const&, int) const (TestRunner.h:40)
==88587==    by 0x1000D5EC8: UnitTest::RunAllTests() (TestRunner.cpp:17)
==88587==    by 0x100084263: main (main.cpp:4)
==88587==  Uninitialised value was created by a heap allocation
==88587==    at 0xD6D9: malloc (vg_replace_malloc.c:266)
==88587==    by 0x1000D9CC7: Allocator::Alloc(unsigned long) (alloc.h:21)
==88587==    by 0x1000DA34E: Array::Alloc(unsigned long, unsigned long) (Array.cpp:1191)
==88587==    by 0x1000DA192: Array::Array(ColumnDef, Array*, unsigned long, Allocator&) (Array.cpp:27)
==88587==    by 0x1000DA0B2: Array::Array(ColumnDef, Array*, unsigned long, Allocator&) (Array.cpp:23)
==88587==    by 0x100019352: hasZeroByte(long long, unsigned long) (Array.h:69)
==88587==    by 0x100019895: TestFindhasZeroByte::RunImpl() const (testarray.cpp:705)
==88587==    by 0x1000D542D: void UnitTest::ExecuteTest<UnitTest::Test>(UnitTest::Test&, UnitTest::TestDetails const&) (ExecuteTest.h:25)
==88587==    by 0x1000D4E7B: UnitTest::Test::Run() (Test.cpp:34)
==88587==    by 0x1000D6016: UnitTest::TestRunner::RunTest(UnitTest::TestResults*, UnitTest::Test*, int) const (TestRunner.cpp:61)
==88587==    by 0x1000D69B7: int UnitTest::TestRunner::RunTestsIf<UnitTest::True>(UnitTest::TestList const&, char const*, UnitTest::True const&, int) const (TestRunner.h:40)
==88587==    by 0x1000D5EC8: UnitTest::RunAllTests() (TestRunner.cpp:17)
==88587== 
@ghost ghost assigned rrrlasse Jan 2, 2012
@astigsen
Copy link
Contributor Author

Verified that memory leak is fixed today

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

@realm-ci
Copy link
Contributor

realm-ci commented Sep 1, 2017

@realm-ci
Copy link
Contributor

realm-ci commented Sep 6, 2017

@realm-ci
Copy link
Contributor

realm-ci commented Sep 6, 2017

@realm-ci
Copy link
Contributor

realm-ci commented Sep 6, 2017

@realm-ci
Copy link
Contributor

realm-ci commented Sep 6, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants