Skip to content

AddressSanitizer: initialization-order-fiasco in source/common/http/filter/ratelimit.cc #762

@fengli79

Description

@fengli79

==946550==ERROR: AddressSanitizer: initialization-order-fiasco on address 0x000002691ff8 at pc 0x00000077bce6 bp 0x7fff3f79d000 sp 0x7fff3f79cff8
READ of size 8 at 0x000002691ff8 thread T0
#0 0x77bce5 in std::unique_ptr<Http::HeaderMapImpl::StaticLookupEntry, std::default_deleteHttp::HeaderMapImpl::StaticLookupEntry >::get() const bits/unique_ptr.h:305:16
#1 0x7783cd in Http::HeaderMapImpl::StaticLookupTable::find(char const*) const third_party/envoy/src/source/common/http/header_map_impl.cc:225:36
#2 0x778d60 in Http::HeaderMapImpl::insertByKey(Http::HeaderString&&, Http::HeaderString&&) third_party/envoy/src/source/common/http/header_map_impl.cc:278:56
#3 0x7786d0 in Http::HeaderMapImpl::HeaderMapImpl(std::initializer_list<std::pair<Http::LowerCaseString, std::string> > const&) third_party/envoy/src/source/common/http/header_map_impl.cc:259:5
#4 0x4806ad in __cxx_global_var_init.48 third_party/envoy/src/source/common/http/filter/ratelimit.cc:23:63
#5 0x480837 in _GLOBAL__sub_I_ratelimit.cc third_party/envoy/src/source/common/http/filter/ratelimit.cc
#6 0x10376e5 in __do_global_ctors_aux

0x000002691ff8 is located 472 bytes inside of global variable 'Http::HeaderMapImpl::static_lookup_table_' defined in 'third_party/envoy/src/source/common/http/header_map_impl.cc:196:55' (0x2691e20) of size 2056
registered at:
#0 0x50a01e in __asan_register_globals third_party/llvm/llvm/projects/compiler-rt/lib/asan/asan_globals.cc:338:3
#1 0x77ba1b in asan.module_ctor
#2 0x41e0c6 in _init
#3 0x7ffdf23b6cfe in __libc_start_main
#4 0x4e02a8 in _start

SUMMARY: AddressSanitizer: initialization-order-fiasco bits/unique_ptr.h:305:16 in std::unique_ptr<Http::HeaderMapImpl::StaticLookupEntry, std::default_deleteHttp::HeaderMapImpl::StaticLookupEntry >::get() const

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