github klzgrad/naiveproxy v107.0.5304.87-2

latest releases: v129.0.6668.81-2, v129.0.6668.81-1, v128.0.6613.40-3...
23 months ago

Fix a crash on Mac.

The crash is caused by the static initializer for setting up PartitionAlloc on Mac being accidentally optimized out by the linker, resulting in undefined behavior in accessing uninitialized thread local storage during PartitionAlloc thread cache purge.

This could happen because our code relies on the default behavior of PartitionAlloc instead of the mainstream procedure used by the browser processes. The fix adopts much of the PartitionAlloc initialization procedure used by the full browser with the following simplifications:

  • No PCScan
  • No Backup Ref Ptr checks
  • No RawPtr checks

New behaviors also enabled by this fix:

  • Enabled PartitionAlloc Thread Cache previously disabled. This offers a very small performance gain because allocations are few, but this code path is more mainstream thus more likely to be well tested.
  • Enabled PartitionAlloc in all OpenWrt builds. OpenWrt builds previously disabled PartitionAlloc entirely because of issues with Musl, which have been fixed this time. This should have non-trivial improvement in allocation by replacing libc malloc. See https://blog.chromium.org/2021/04/efficient-and-safe-allocations-everywhere.html about the nature of this improvement.

Don't miss a new naiveproxy release

NewReleases is sending notifications on new releases.