Skip to content

WARNING: MemorySanitizer: use-of-uninitialized-value #46

@cyw0ng95

Description

@cyw0ng95

Encounter an error when running a self-developed fuzzing tool, but this error seems not related to the fuzzing process, but only during init.

root@46ed3b2e2c71:/opt# ./output/duckdb_embedded_executor 
10/30 17:16:15 [INFO] Starting duckdb_embedded executor
Uninitialized bytes in strlen at offset 0 inside [0x7ffd0caa8a08, 5)
==5748==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x0000011341ac in unsigned long duckdb::Hash<char const*>(char const*) (/opt/output/duckdb_embedded_executor+0x11341ac) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #1 0x000000fa1b53 in duckdb::LogicalDependencyHashFunction::operator()(duckdb::LogicalDependency const&) const (/opt/output/duckdb_embedded_executor+0xfa1b53) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #2 0x000000fbbc91 in std::pair<std::__detail::_Node_iterator<duckdb::LogicalDependency, true, true>, bool> std::_Hashtable<duckdb::LogicalDependency, duckdb::LogicalDependency, std::allocator<duckdb::LogicalDependency>, std::__detail::_Identity, duckdb::LogicalDependencyEquality, duckdb::LogicalDependencyHashFunction, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::_M_insert<duckdb::LogicalDependency const&, std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<duckdb::LogicalDependency, true>>>>(duckdb::LogicalDependency const&, std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<duckdb::LogicalDependency, true>>> const&, std::integral_constant<bool, true>, unsigned long) (/opt/output/duckdb_embedded_executor+0xfbbc91) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #3 0x000000fb2ca7 in duckdb::LogicalDependencyList::AddDependency(duckdb::CatalogEntry&) (/opt/output/duckdb_embedded_executor+0xfb2ca7) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #4 0x000000fc65cc in duckdb::DuckSchemaEntry::AddEntryInternal(duckdb::CatalogTransaction, duckdb::unique_ptr<duckdb::StandardEntry, std::default_delete<duckdb::StandardEntry>, true>, duckdb::OnCreateConflict, duckdb::LogicalDependencyList) (/opt/output/duckdb_embedded_executor+0xfc65cc) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #5 0x000000fc69b0 in duckdb::DuckSchemaEntry::AddEntry(duckdb::CatalogTransaction, duckdb::unique_ptr<duckdb::StandardEntry, std::default_delete<duckdb::StandardEntry>, true>, duckdb::OnCreateConflict) (/opt/output/duckdb_embedded_executor+0xfc69b0) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #6 0x000000fc6f3b in duckdb::DuckSchemaEntry::CreateTableFunction(duckdb::CatalogTransaction, duckdb::CreateTableFunctionInfo&) (/opt/output/duckdb_embedded_executor+0xfc6f3b) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #7 0x0000018099a3 in duckdb::BuiltinFunctions::AddFunction(duckdb::TableFunctionSet) (/opt/output/duckdb_embedded_executor+0x18099a3) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #8 0x0000017c7f6b in duckdb::TableScanFunction::RegisterFunction(duckdb::BuiltinFunctions&) (/opt/output/duckdb_embedded_executor+0x17c7f6b) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #9 0x000001807b73 in duckdb::BuiltinFunctions::Initialize() (/opt/output/duckdb_embedded_executor+0x1807b73) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #10 0x000000fa0e9f in duckdb::DuckCatalog::Initialize(bool) (/opt/output/duckdb_embedded_executor+0xfa0e9f) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #11 0x000001812335 in duckdb::AttachedDatabase::Initialize(duckdb::optional_idx) (/opt/output/duckdb_embedded_executor+0x1812335) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #12 0x000001814bb2 in duckdb::DatabaseManager::InitializeSystemCatalog() (/opt/output/duckdb_embedded_executor+0x1814bb2) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #13 0x00000184af4b in duckdb::DatabaseInstance::Initialize(char const*, duckdb::DBConfig*) (/opt/output/duckdb_embedded_executor+0x184af4b) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #14 0x00000184b2ee in duckdb::DuckDB::DuckDB(char const*, duckdb::DBConfig*) (/opt/output/duckdb_embedded_executor+0x184b2ee) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #15 0x000000c9871b in duckdb_open_ext (/opt/output/duckdb_embedded_executor+0xc9871b) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8)
    #16 0x000000c8f528 in _cgo_b59e10b900ff_Cfunc_duckdb_open_ext /tmp/go-build/cgo-gcc-prolog:123:11
    #17 0x0000007fd063 in runtime.asmcgocall.abi0 /root/go/pkg/mod/golang.org/[email protected]/src/runtime/asm_amd64.s:923

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/opt/output/duckdb_embedded_executor+0x11341ac) (BuildId: e48e79d4f034eae61580f6c2d46f82799f9874e8) in unsigned long duckdb::Hash<char const*>(char const*)
Exiting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions