| Summary: | Valgrind reports read errors reading a memory area that has been used as `sigaltstack` memory | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Marco Trevisan <mail> |
| Component: | memcheck | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.22.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Marco Trevisan
2024-05-09 13:37:15 UTC
I have a workaround - use KDE :-) ==451300== by 0x10BB30: memset (string_fortified.h:59) memcheck should be redirecting memset, which it expects to be in libc. Is that a fortified version that is inline in a header? Can you build a non-fortified version for testing with Valgrind. I see that you've disabled the test without even understanding the problem. That's the kind of quality that I expect from GTK. | I have a workaround - use KDE :-) Well, considering many qt programs may still depend on GLib main loop I'm not sure this is a good advice. In any case, I was considering this as a "funny" (maybe 15 years ago?) comment, but not really considering your next comment | I see that you've disabled the test without even understanding the problem. That's the kind of quality that I expect from GTK. Really, this is not helping at all. We want to definitely help valgrind to handle this case or to fix it in our side if that's really a problem, but I don't think that's the way... However if you read the code properly, the test has not been disabled at all, the test is still running in valgrind, what we disabled is a memory check that was failing but that isn't really affecting what the purpose of the test was. And we did it because we couldn't rely on an error that so far no other analyzer underlined. However... This is the trace without fortified sources: ==32420== ==32420== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==32417== Invalid read of size 8 ==32417== at 0x484E98B: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x4033B5: test_signal_alternate_stack (unix.c:619) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== Invalid read of size 1 ==32417== at 0x484E959: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x4033B5: test_signal_alternate_stack (unix.c:619) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffef28 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== Invalid write of size 8 ==32417== at 0x484F173: memset (vg_replace_strmem.c:1386) ==32417== by 0x4033EB: test_signal_alternate_stack (unix.c:625) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== Invalid write of size 8 ==32417== at 0x484F16C: memset (vg_replace_strmem.c:1386) ==32417== by 0x4033EB: test_signal_alternate_stack (unix.c:625) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeeb0 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== Invalid read of size 8 ==32417== at 0x484E98B: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x40349D: test_signal_alternate_stack (unix.c:626) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== Invalid read of size 8 ==32417== at 0x484E98B: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x40346E: test_signal_alternate_stack (unix.c:632) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== Invalid read of size 1 ==32417== at 0x484E959: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x40346E: test_signal_alternate_stack (unix.c:632) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffef28 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ** GLib:ERROR:../../GNOME/glib/glib/tests/unix.c:632:test_signal_alternate_stack: assertion failed (stack_memory == zero_mem) ==32417== ==32417== Process terminating with default action of signal 6 (SIGABRT): dumping core ==32417== at 0x4A31834: __pthread_kill_implementation (pthread_kill.c:44) ==32417== by 0x49DF8ED: raise (raise.c:26) ==32417== by 0x49C78FE: abort (abort.c:79) ==32417== by 0x4875064: g_assertion_message.cold (gtestutils.c:3331) ==32417== by 0x4036CE: test_signal_alternate_stack (unix.c:632) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== ==32417== HEAP SUMMARY: ==32417== in use at exit: 35,316 bytes in 153 blocks ==32417== total heap usage: 1,252 allocs, 1,099 frees, 1,706,851 bytes allocated ==32417== ==32417== LEAK SUMMARY: ==32417== definitely lost: 0 bytes in 0 blocks ==32417== indirectly lost: 0 bytes in 0 blocks ==32417== possibly lost: 0 bytes in 0 blocks ==32417== still reachable: 13,199 bytes in 139 blocks ==32417== suppressed: 22,117 bytes in 14 blocks ==32417== Reachable blocks (those to which a pointer was found) are not shown. ==32417== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==32417== ==32417== ERROR SUMMARY: 1042 errors from 7 contexts (suppressed: 1 from 1) ==32417== ==32417== 1 errors in context 1 of 7: ==32417== Invalid read of size 1 ==32417== at 0x484E959: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x40346E: test_signal_alternate_stack (unix.c:632) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffef28 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== ==32417== 1 errors in context 2 of 7: ==32417== Invalid read of size 1 ==32417== at 0x484E959: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x4033B5: test_signal_alternate_stack (unix.c:619) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffef28 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== ==32417== 17 errors in context 3 of 7: ==32417== Invalid read of size 8 ==32417== at 0x484E98B: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x40346E: test_signal_alternate_stack (unix.c:632) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== ==32417== 17 errors in context 4 of 7: ==32417== Invalid read of size 8 ==32417== at 0x484E98B: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x4033B5: test_signal_alternate_stack (unix.c:619) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== ==32417== 251 errors in context 5 of 7: ==32417== Invalid write of size 8 ==32417== at 0x484F173: memset (vg_replace_strmem.c:1386) ==32417== by 0x4033EB: test_signal_alternate_stack (unix.c:625) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== ==32417== 252 errors in context 6 of 7: ==32417== Invalid write of size 8 ==32417== at 0x484F16C: memset (vg_replace_strmem.c:1386) ==32417== by 0x4033EB: test_signal_alternate_stack (unix.c:625) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeeb0 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== ==32417== ==32417== 503 errors in context 7 of 7: ==32417== Invalid read of size 8 ==32417== at 0x484E98B: bcmp (vg_replace_strmem.c:1229) ==32417== by 0x40349D: test_signal_alternate_stack (unix.c:626) ==32417== by 0x48D8EA2: test_case_run (gtestutils.c:2988) ==32417== by 0x48D8EA2: g_test_run_suite_internal (gtestutils.c:3090) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D8E1A: g_test_run_suite_internal (gtestutils.c:3109) ==32417== by 0x48D9381: g_test_run_suite (gtestutils.c:3189) ==32417== by 0x48D9407: g_test_run (gtestutils.c:2275) ==32417== by 0x4025EC: main (unix.c:911) ==32417== Address 0x1ffeffeea8 is on thread 1's stack ==32417== in frame #1, created by test_signal_alternate_stack (unix.c:576) ==32417== Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |