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

asan reports error(AddressSanitizer: SEGV on unknown address), but the code works without asan. #733

Closed
Lunewcome opened this issue Oct 25, 2016 · 5 comments

Comments

@Lunewcome
Copy link

Lunewcome commented Oct 25, 2016

As title says. How can I do then ?
Thanks very much!

detail :

ASAN:SIGSEGV

==1613==ERROR: AddressSanitizer: SEGV on unknown address 0x0002205f835e (pc 0x00000052a10e bp 0x7fff5ee560d0 sp 0x7fff5ee560b0 T0)
#0 0x52a10d in std::cxx11::list<std::pair<mstd::basic_string<char, std::char_traits, ads::allocator >, unsigned long>, ads::allocator<std::pair<mstd::basic_string<char, std::char_traits, ads::allocator >, unsigned long> > >::begin() const /home/xllu/g++/include/c++/5.4.0/bits/stl_list.h:841
#1 0x4b9ee3 in Server::load_user_agent_keywords(Repository const
) ../../server/Server.cpp:
#2 0x4ab6bd in Server::switch_repository(Repository const
, int, int) ../../server/Server.cpp:

AddressSanitizer can not provide additional info.

@yugr
Copy link

yugr commented Oct 25, 2016

@Lunewcome please post a repro.

@Lunewcome
Copy link
Author

@yugr I'have posted it. Help me pls. Thank you very much!

@yugr
Copy link

yugr commented Oct 25, 2016

From the backtrace it seems that you are accessing an uninitialized pointer somewhere in std::list. Is that the case? I suggest you debug the problem locally and check why it's uninitialized.

If not, we'll probably need more info: version of compiler, full backtrace and preferably an example code which can be used to repro error on other machine.

@Lunewcome
Copy link
Author

Turns out it was cause by a conflict between asan shadow memory and our code. We changed asan shadow memory, and it worked now.
Thanks!

@yichuan1118
Copy link

@Lunewcome could you share a little about how did you solved this issue? Thank you!

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

No branches or pull requests

3 participants