-
Notifications
You must be signed in to change notification settings - Fork 12
Add libcmocka suppresion file #27
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
Add libcmocka suppresion file #27
Conversation
test/cmocka.supp
Outdated
| <libcmocka2> | ||
| Memcheck:Cond | ||
| obj:/usr/lib/libcmocka.so.0.8.1 | ||
| obj:/usr/lib/libcmocka.so.0.8.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be too tightly coupled to the currently available libcmocka.so version
Currently existing lzma.supp uses this, more general syntax:
{
<lzma>
Memcheck:Cond
...
obj:/usr/*lib*/liblzma.so.*
...
}
Does it make sense to follow this example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is very good point, updated, thank you!
This is needed only on i686 architectures. The specific traces look like: ``` ==1376228== Conditional jump or move depends on uninitialised value(s) ==1376228== at 0x4743165: list_free (cmocka.c:660) ==1376228== by 0x4743165: teardown_testing.isra.0 (cmocka.c:585) ==1376228== by 0x4744D22: cmocka_run_one_test_or_fixture (cmocka.c:2973) ==1376228== by 0x47454FB: cmocka_run_one_tests (cmocka.c:3056) ==1376228== by 0x47454FB: _cmocka_run_group_tests (cmocka.c:3187) ==1376228== by 0x804CA65: main (drpm_api_tests.c:1040) ==1376228== Uninitialised value was created by a heap allocation ==1376228== at 0x403E7AF: malloc (vg_replace_malloc.c:447) ==1376228== by 0x4064B2D: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376228== by 0x4064AC2: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376228== by 0x40696A3: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376228== by 0x8053D32: init_gzip (drpm_decompstrm.c:179) ==1376228== by 0x8053FF0: decompstrm_init (drpm_decompstrm.c:297) ==1376228== by 0x8058A8F: readdelta_rest (drpm_read.c:98) ==1376228== by 0x80597FA: read_deltarpm (drpm_read.c:469) ==1376228== by 0x804CBC9: drpm_read (drpm.c:74) ==1376228== by 0x804B514: read_rpmonly_noaddblk (drpm_api_tests.c:646) ==1376228== by 0x4744CEC: cmocka_run_one_test_or_fixture (cmocka.c:2948) ==1376228== by 0x47454FB: cmocka_run_one_tests (cmocka.c:3056) ==1376228== by 0x47454FB: _cmocka_run_group_tests (cmocka.c:3187) ==1376228== ``` or ``` ==1376228== Conditional jump or move depends on uninitialised value(s) ==1376228== at 0x4744B55: check_for_leftover_values_list (cmocka.c:900) ==1376228== by 0x4744B55: fail_if_leftover_values.isra.0 (cmocka.c:567) ==1376228== by 0x4744D05: cmocka_run_one_test_or_fixture (cmocka.c:2966) ==1376228== by 0x47454FB: cmocka_run_one_tests (cmocka.c:3056) ==1376228== by 0x47454FB: _cmocka_run_group_tests (cmocka.c:3187) ==1376228== by 0x804CA65: main (drpm_api_tests.c:1040) ==1376228== Uninitialised value was created by a heap allocation ==1376228== at 0x403E7AF: malloc (vg_replace_malloc.c:447) ==1376228== by 0x4064B2D: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376228== by 0x4064AC2: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376228== by 0x40696A3: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376228== by 0x8053D32: init_gzip (drpm_decompstrm.c:179) ==1376228== by 0x8053FF0: decompstrm_init (drpm_decompstrm.c:297) ==1376228== by 0x8058A8F: readdelta_rest (drpm_read.c:98) ==1376228== by 0x80597FA: read_deltarpm (drpm_read.c:469) ==1376228== by 0x804CBC9: drpm_read (drpm.c:74) ==1376228== by 0x804B514: read_rpmonly_noaddblk (drpm_api_tests.c:646) ==1376228== by 0x4744CEC: cmocka_run_one_test_or_fixture (cmocka.c:2948) ==1376228== by 0x47454FB: cmocka_run_one_tests (cmocka.c:3056) ==1376228== by 0x47454FB: _cmocka_run_group_tests (cmocka.c:3187) ==1376228== ``` However this is only visible when the build is done with cmocka debug symbols without them it is only: ``` ==1376687== Conditional jump or move depends on uninitialised value(s) ==1376687== at 0x4743165: ??? (in /usr/lib/libcmocka.so.0.8.1) ==1376687== by 0x4744D22: ??? (in /usr/lib/libcmocka.so.0.8.1) ==1376687== by 0x47454FB: _cmocka_run_group_tests (in /usr/lib/libcmocka.so.0.8.1) ==1376687== by 0x804CA65: main (drpm_api_tests.c:1040) ==1376687== Uninitialised value was created by a heap allocation ==1376687== at 0x403E7AF: malloc (vg_replace_malloc.c:447) ==1376687== by 0x4064B2D: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376687== by 0x4064AC2: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376687== by 0x40696A3: ??? (in /usr/lib/libz.so.1.3.1.zlib-ng) ==1376687== by 0x8053D32: init_gzip (drpm_decompstrm.c:179) ==1376687== by 0x8053FF0: decompstrm_init (drpm_decompstrm.c:297) ==1376687== by 0x8058A8F: readdelta_rest (drpm_read.c:98) ==1376687== by 0x80597FA: read_deltarpm (drpm_read.c:469) ==1376687== by 0x804CBC9: drpm_read (drpm.c:74) ==1376687== by 0x804B514: read_rpmonly_noaddblk (drpm_api_tests.c:646) ==1376687== by 0x4744CEC: ??? (in /usr/lib/libcmocka.so.0.8.1) ==1376687== by 0x47454FB: _cmocka_run_group_tests (in /usr/lib/libcmocka.so.0.8.1) ==1376687== ``` Since by default the debug symbols are missing the suppresion file cannot use the specific function names because it wouldn't match.
f2374a3 to
7b6d99d
Compare
m-blaha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This blocks fedora release.
This is needed only on i686 architectures.
Interestingly when I compiled cmocka manually the problems disappeared.
I have verified the problems are not caused by drpm because they happen even if the tests are not doing anything.
The specific traces look like:
or
However this is only visible when the build is done with cmocka debug symbols without them it is only:
Since by default the debug symbols are missing the suppresion file cannot use the specific function names because it wouldn't match.