Commit Graph

3 Commits

Author SHA1 Message Date
klzgrad
44e5796908 Enable PartitionAlloc on OpenWrt 2022-11-11 01:33:43 +08:00
klzgrad
6e5b245e64 Add PartitionAlloc support
Fix a crash on Mac.

The crash is in partition_alloc::internal::PartitionFreelistEntry::CheckFreeListForThreadCache()
called from partition_alloc::ThreadCache::PurgeCurrentThread().

The direct cause of the crash is an uninitialized ThreadCache being
accessed. The root cause is that the required initialization
routines are accidentally removed by the linker and not called.

This could happen because our code path related to PartitionAlloc
is an uncommon one and differs from the standard procedures used
by the browser processes.

Therefore fix the crash by adopting much of the PartitionAlloc
initialization procedures used by the browser processes.

PA config differences from the full browser:

* No PCScan
* No Backup Ref Ptr checks
* No RawPtr checks

New behavior enabled by this change:

* Thread Cache: very small performance gain because allocations are few,
  but this code path is more mainstream thus more likely to be well tested.
2022-11-11 01:20:00 +08:00
klzgrad
b352765b77 Add continuous integration and tests 2022-11-04 07:18:48 +08:00