Skip to content

Use size_t for memory allocation size where applicable.#18

Merged
nmoinvaz merged 2 commits intomasterfrom
nathan/master/fix-size-t
Feb 3, 2023
Merged

Use size_t for memory allocation size where applicable.#18
nmoinvaz merged 2 commits intomasterfrom
nathan/master/fix-size-t

Conversation

@nmoinvaz
Copy link
Collaborator

@nmoinvaz nmoinvaz commented Feb 3, 2023

No description provided.

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #18 (6fff096) into master (95f581e) will not change coverage.
The diff coverage is 23.07%.

@@           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           
Flag Coverage Δ
macos 50.74% <100.00%> (ø)
ubuntu 43.26% <23.07%> (ø)
ubuntu_curl 43.46% <23.07%> (ø)
windows 54.74% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
config_gnome2.c 0.00% <0.00%> (ø)
config_gnome3.c 0.00% <0.00%> (ø)
config_kde.c 0.00% <0.00%> (ø)
config_mac.c 67.50% <ø> (ø)
resolver_gnome3.c 0.00% <0.00%> (ø)
config_env.c 61.11% <100.00%> (ø)
execute_jscore.c 44.89% <100.00%> (ø)
util.c 77.14% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@nmoinvaz nmoinvaz marked this pull request as ready for review February 3, 2023 21:04
@nmoinvaz nmoinvaz force-pushed the nathan/master/fix-size-t branch from 52e0966 to 6fff096 Compare February 3, 2023 21:06
@nmoinvaz nmoinvaz requested a review from sergio-nsk February 3, 2023 21:06
@nmoinvaz nmoinvaz added the cleanup Housekeeping tasks label Feb 3, 2023
@nmoinvaz nmoinvaz merged commit aa3b5c5 into master Feb 3, 2023
@nmoinvaz nmoinvaz deleted the nathan/master/fix-size-t branch February 3, 2023 22:18
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Housekeeping tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants