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

yamlcpp/xerces: ASAN tests fail #1691

Open
markus2330 opened this Issue Nov 1, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@markus2330
Contributor

markus2330 commented Nov 1, 2017

When enabling yamlcpp/xerces for the homepage f986a66 the test cases fail:

 75/101 Test  #77: testmod_yamlcpp ..................***Failed    0.64 sec
/usr/include/boost/smart_ptr/detail/shared_count.hpp:484:41: runtime error: member call on address 0x60300000ecb0 which does not point to an object of type 'sp_counted_base'
0x60300000ecb0: note: object is of type 'boost::detail::sp_counted_impl_p<YAML::detail::memory_holder>'
 02 00 00 70  98 96 c5 0d e5 7f 00 00  01 00 00 00 01 00 00 00  70 e7 00 00 20 60 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
...
/home/jenkins/workspace/workspace/elektra-homepage/src/plugins/xerces/deserializer.cpp:202:57: runtime error: member call on address 0x613000003d90 which does not point to an object of type 'DOMDocument'
0x613000003d88: note: object is base class subobject at offset 8 within object of type 'xercesc_3_1::DOMDocumentImpl'
 20 60 00 00  a8 81 ec a3 71 7f 00 00  b8 84 ec a3 71 7f 00 00  00 86 ec a3 71 7f 00 00  38 86 ec a3
              ^                        ~~~~~~~~~~~~~~~~~~~~~~~
                                       vptr for 'xercesc_3_1::DOMDocument' base class of 'xercesc_3_1::DOMDocumentImpl'

See https://build.libelektra.org/jenkins/job/elektra-homepage/235/consoleFull for full log.

Any idea why the suppressions (tests/sanitizer.blacklist) are not working?

Do we need a new script for every combination? (asan_nokdbtests?) If possible I would rather avoid that.

@sanssecours

This comment has been minimized.

Show comment
Hide comment
@sanssecours

sanssecours Nov 1, 2017

Contributor

Any idea why the suppressions (tests/sanitizer.blacklist) are not working?

I assume that is the case since the homepage build uses GCC:

	if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=integer")
		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize-blacklist=\"${CMAKE_SOURCE_DIR}/tests/sanitizer.blacklist\"")
	endif ()

.

Contributor

sanssecours commented Nov 1, 2017

Any idea why the suppressions (tests/sanitizer.blacklist) are not working?

I assume that is the case since the homepage build uses GCC:

	if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=integer")
		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize-blacklist=\"${CMAKE_SOURCE_DIR}/tests/sanitizer.blacklist\"")
	endif ()

.

markus2330 added a commit that referenced this issue Nov 1, 2017

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Nov 1, 2017

Contributor

Thank you for looking into it. I removed these two plugins for now until also a solution for gcc is found.

Contributor

markus2330 commented Nov 1, 2017

Thank you for looking into it. I removed these two plugins for now until also a solution for gcc is found.

@e1528532

This comment has been minimized.

Show comment
Hide comment
@e1528532

e1528532 Nov 3, 2017

Contributor

Yes gcc doesn't support the blacklist. There seems to be the possibility to use a macro though but since some of the blacklisted things happen inside an external library, this doesn't seem to be a good solution for us.

Contributor

e1528532 commented Nov 3, 2017

Yes gcc doesn't support the blacklist. There seems to be the possibility to use a macro though but since some of the blacklisted things happen inside an external library, this doesn't seem to be a good solution for us.

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Nov 3, 2017

Contributor

The advantage of the macro is that it is supported by both llvm and gcc. Does it work recursive? Then we could mark the functions calling the problematic code.

Is not ideal, though, we would also exclude our code to be instrumented 😕

Contributor

markus2330 commented Nov 3, 2017

The advantage of the macro is that it is supported by both llvm and gcc. Does it work recursive? Then we could mark the functions calling the problematic code.

Is not ideal, though, we would also exclude our code to be instrumented 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment