Skip to content

Document that the pacparser API is not thread-safe - #247

Merged
manugarg merged 1 commit into
mainfrom
docs/thread-safety
Jun 30, 2026
Merged

manugarg merged 1 commit into
mainfrom
docs/thread-safety

Conversation

@manugarg

Copy link
Copy Markdown
Owner

Summary

  • Document pacparser's thread-safety contract (it keeps engine state in process-global variables and is not thread-safe) in the README and pacparser.h.
  • Callers must serialize all pacparser_* calls and must not call pacparser_cleanup() while another thread is in find_proxy()/parse_pac*().

Addresses GHSA-q2v4-fh98-357r (docs half; mutex hardening is a separate PR).

Test plan

  • Docs-only change; no build impact.

🤖 Generated with Claude Code

pacparser keeps all engine state in process-global variables and creates
no threads of its own, so the API is single-instance and not thread-safe.
Document the contract in the README and pacparser.h: callers must
serialize all pacparser_* calls and must not call pacparser_cleanup()
while another thread is in find_proxy()/parse_pac*().

Addresses GHSA-q2v4-fh98-357r.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@manugarg
manugarg merged commit e433df4 into main Jun 30, 2026
30 checks passed
@manugarg
manugarg deleted the docs/thread-safety branch June 30, 2026 01:32
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
pacparser 1.5.2

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
* Bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in manugarg/pacparser#243
* Build .deb and .rpm packages for Linux releases by @manugarg in manugarg/pacparser#244
* Document SonarCloud token rotation by @manugarg in manugarg/pacparser#245
* Document that the pacparser API is not thread-safe by @manugarg in manugarg/pacparser#247
* Bump the github-actions group with 3 updates by @dependabot[bot] in manugarg/pacparser#249
* Bump the github-actions group with 4 updates by @dependabot[bot] in manugarg/pacparser#251
* Ship C sources and version.mk in the python sdist by @manugarg in manugarg/pacparser#255
* Add sdist metadata regression test and fix version sanitization by @manugarg in manugarg/pacparser#256


**Full Changelog**: https://github.com/manugarg/pacparser/compare/v1.5.1...v1.5.2</pre>
  <p>View the full release notes at <a href="https://github.com/manugarg/pacparser/releases/tag/v1.5.2">https://github.com/manugarg/pacparser/releases/tag/v1.5.2</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!17498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant