Use size_t for memory allocation size where applicable.#18
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18 +/- ##
=======================================
Coverage 52.40% 52.40%
=======================================
Files 53 53
Lines 4372 4372
Branches 1018 1018
=======================================
Hits 2291 2291
Misses 1449 1449
Partials 632 632
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
52e0966 to
6fff096
Compare
sergio-nsk
approved these changes
Feb 3, 2023
sergio-nsk
added a commit
that referenced
this pull request
Mar 14, 2025
A client app can call proxyres_global_cleanup(), continue to run and crash in an unspecified thread, spawned by JSCoreGTK, running in the address space of the unloaded library. Before dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6c00e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6c00e7c0, cond=0x00007fff6c00e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6c00e7e8, mutex=0x00007fff6c00e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 frame #5: 0x00007fffa2a428a2 libjavascriptcoregtk-6.0.so.1`___lldb_unnamed_symbol43079 + 546 frame #6: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #7: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78 After dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6800e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6800e7c0, cond=0x00007fff6800e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6800e7e8, mutex=0x00007fff6800e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 After crash: * thread #18, name = 'gtest_host', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x7fffa2a428a2) * frame #0: 0x00007fffa2a428a2 frame #1: 0x00007fff991e8700 frame #2: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #3: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78
sergio-nsk
added a commit
that referenced
this pull request
Mar 14, 2025
A client app can call proxyres_global_cleanup(), continue to run and crash in an unspecified thread, spawned by JSCoreGTK, running in the address space of the unloaded library. The forced call to the garbage collector does not fix crashes. Before dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6c00e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6c00e7c0, cond=0x00007fff6c00e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6c00e7e8, mutex=0x00007fff6c00e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 frame #5: 0x00007fffa2a428a2 libjavascriptcoregtk-6.0.so.1`___lldb_unnamed_symbol43079 + 546 frame #6: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #7: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78 After dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6800e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6800e7c0, cond=0x00007fff6800e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6800e7e8, mutex=0x00007fff6800e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 After a crash: * thread #18, name = 'gtest_host', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x7fffa2a428a2) * frame #0: 0x00007fffa2a428a2 frame #1: 0x00007fff991e8700 frame #2: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #3: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78
sergio-nsk
added a commit
that referenced
this pull request
Mar 14, 2025
A client app can call proxyres_global_cleanup(), continue to run and crash in an unspecified thread, spawned by JSCoreGTK, running in the address space of the unloaded library. The forced call to the garbage collector does not fix crashes. Before dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6c00e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6c00e7c0, cond=0x00007fff6c00e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6c00e7e8, mutex=0x00007fff6c00e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 frame #5: 0x00007fffa2a428a2 libjavascriptcoregtk-6.0.so.1`___lldb_unnamed_symbol43079 + 546 frame #6: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #7: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78 After dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6800e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6800e7c0, cond=0x00007fff6800e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6800e7e8, mutex=0x00007fff6800e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 After a crash: * thread #18, name = 'gtest_host', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x7fffa2a428a2) * frame #0: 0x00007fffa2a428a2 frame #1: 0x00007fff991e8700 frame #2: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #3: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78
sergio-nsk
added a commit
that referenced
this pull request
Mar 14, 2025
A client app can call proxyres_global_cleanup(), continue to run and crash in an unspecified thread, spawned by JSCoreGTK, running in the address space of the unloaded library. The forced call to the garbage collector does not fix crashes. Before dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6c00e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6c00e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6c00e7c0, cond=0x00007fff6c00e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6c00e7e8, mutex=0x00007fff6c00e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 frame #5: 0x00007fffa2a428a2 libjavascriptcoregtk-6.0.so.1`___lldb_unnamed_symbol43079 + 546 frame #6: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #7: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78 After dlclose(): * thread #18, name = 'gtest_host' * frame #0: 0x00007ffff2e98d71 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=true, abstime=0x00007fff991e8730, op=393, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:57:12 frame #1: 0x00007ffff2e98d47 libc.so.6`__GI___futex_abstimed_wait_cancelable64 [inlined] __futex_abstimed_wait_common(cancel=true, private=<unavailable>, abstime=0x00007fff991e8730, clockid=<unavailable>, expected=0, futex_word=0x00007fff6800e810) at futex-internal.c:87:9 frame #2: 0x00007ffff2e98d20 libc.so.6`__GI___futex_abstimed_wait_cancelable64(futex_word=0x00007fff6800e810, expected=0, clockid=<unavailable>, abstime=0x00007fff991e8730, private=<unavailable>) at futex-internal.c:139:10 frame #3: 0x00007ffff2e9bc8e libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fff991e8730, clockid=0, mutex=0x00007fff6800e7c0, cond=0x00007fff6800e7e8) at pthread_cond_wait.c:503:10 frame #4: 0x00007ffff2e9bb98 libc.so.6`___pthread_cond_timedwait64(cond=0x00007fff6800e7e8, mutex=0x00007fff6800e7c0, abstime=0x00007fff991e8730) at pthread_cond_wait.c:652:10 After a crash: * thread #18, name = 'gtest_host', stop reason = signal SIGSEGV: address not mapped to object (fault address: 0x7fffa2a428a2) * frame #0: 0x00007fffa2a428a2 frame #1: 0x00007fff991e8700 frame #2: 0x00007ffff2e9caa4 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:447:8 frame #3: 0x00007ffff2f29c3c libc.so.6`__clone3 at clone3.S:78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.