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

Document that the pacparser API is not thread-safe#247
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 <noreply@anthropic.com>
@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
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