google / bloaty

Bloaty: a size profiler for binaries
Apache License 2.0
4.71k stars 340 forks source link

AddressSanitizer report out of range when use the bloaty #291

Open aglory-ly opened 2 years ago

aglory-ly commented 2 years ago

Verion

dev version,git clone https://github.com/google/bloaty.git

Environment

Ubuntu 18.04,64bit

Command

Compile test program:

$ cmake .
$ make -j6

Compile test program with address sanitizer with this command:

Result

The result of running without ASAN:

$ ./bloaty $poc

terminate called after throwing an instance of 'std::out_of_range'
  what():  absl::string_view::substr
Aborted (core dumped)

Information obtained by using ASAN:

$ ./bloaty_asan $poc

terminate called after throwing an instance of 'std::out_of_range'
  what():  absl::string_view::substr
Aborted (core dumped)

Description

When we execute the command, asan reports the error:
terminate called after throwing an instance of 'std::out_of_range'
  what():  absl::string_view::substr
Aborted (core dumped)

Poc

Poc file is this