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

MSan has runtime error: unsigned integer overflow #116

Closed
alpha-X-omega opened this issue Jan 27, 2018 · 2 comments
Closed

MSan has runtime error: unsigned integer overflow #116

alpha-X-omega opened this issue Jan 27, 2018 · 2 comments

Comments

@alpha-X-omega
Copy link

I just turned on Clang's Memory Sanitizer and it complained about this. The existing test cases in the tutorial will suffice to reproduce this issue.

/usr/include/c++/v1/__tree:836:16: runtime error: downcast of address 0x000002ce73c0 with insufficient space for an object of type 'std::__1::__tree_node<doctest::detail::TestCase, void *>'
0x000002ce73c0: note: pointer points here
80 70 00 00 00 00 00 00 80 70 00 00 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/include/c++/v1/__tree:836:16 in
doctest/doctest.h:4146:45: runtime error: unsigned integer overflow: 9 - 87 cannot be represented in type 'unsigned int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior doctest/doctest.h:4146:45 in
==44126==WARNING: MemorySanitizer: use-of-uninitialized-value

@onqtam
Copy link
Member

onqtam commented Jan 28, 2018

Hi!

This seems like it's in the implementation of std::set<>.
There have been previous similar reports - is your standard library also instrumented for msan?

Here it says:

In particular, you would need to link against MSan-instrumented C++ standard library.

@alpha-X-omega
Copy link
Author

Hi!

You're a genius! How silly of me to think anything works out of the box :-)

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

2 participants