Skip to content
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

asyn-thread: do not allocate thread_data separately #16241

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Feb 7, 2025

Put the full struct into Curl_async since it will be used for every name resolve anyway.

cherry-picked from #16219

@bagder bagder added the name lookup DNS and related tech label Feb 7, 2025
@testclutch

This comment was marked as outdated.

Put the full struct into Curl_async since it will be used for every name
resolve anyway.

Closes #16241
@bagder bagder force-pushed the bagder/thread_data branch from d6d0f32 to 2928725 Compare February 9, 2025 10:36
@bagder
Copy link
Member Author

bagder commented Feb 11, 2025

I'll merge this after 8.12.1 ships, for added safety.

@bagder bagder closed this in d9fc64d Feb 13, 2025
@bagder bagder deleted the bagder/thread_data branch February 13, 2025 14:36
vszakats added a commit that referenced this pull request Mar 15, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
seen with mingw-w64 gcc 14.2.0 while playing with other modifications:
```
lib/asyn-thread.c: In function 'init_resolve_thread':
lib/asyn-thread.c:447:5: warning: 'free' called on pointer 'data' with nonzero offset 3264 [-Wfree-nonheap-object]
  447 |     free(td);
      |     ^~~~~~~~
```

Where `td` is:
```c
  struct thread_data *td = &data->state.async.thdata;
```

Follow-up to d9fc64d #16241
Closes #16734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
name lookup DNS and related tech
Development

Successfully merging this pull request may close these issues.

None yet

2 participants