win: Fix generated binaries crashing with exit code 3221225477
See https://issues.chromium.org/issues/336007395
This commit is contained in:
parent
b537fc929b
commit
0783b4c57d
|
@ -780,5 +780,12 @@ patches = [
|
||||||
# It is a bit hacky, not suitable for merging into upstream.
|
# It is a bit hacky, not suitable for merging into upstream.
|
||||||
# https://chromium-review.googlesource.com/c/chromium/src/+/5302103
|
# https://chromium-review.googlesource.com/c/chromium/src/+/5302103
|
||||||
'name': 'osr_win_remove_keyed_mutex_2575'
|
'name': 'osr_win_remove_keyed_mutex_2575'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
# win: Fix generated binaries crashing with exit code 3221225477.
|
||||||
|
# https://issues.chromium.org/issues/336007395
|
||||||
|
# Reverts
|
||||||
|
# https://chromium-review.googlesource.com/c/chromium/src/+/5454331
|
||||||
|
'name': 'win_partition_freelist_entry_336007395'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
diff --git base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
|
||||||
|
index 889f6c3d02d2b..eaa8e98ef9c9e 100644
|
||||||
|
--- base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
|
||||||
|
+++ base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
|
||||||
|
@@ -10,7 +10,6 @@
|
||||||
|
#include "partition_alloc/partition_alloc_base/bits.h"
|
||||||
|
#include "partition_alloc/partition_alloc_base/compiler_specific.h"
|
||||||
|
#include "partition_alloc/partition_alloc_base/component_export.h"
|
||||||
|
-#include "partition_alloc/partition_alloc_base/no_destructor.h"
|
||||||
|
#include "partition_alloc/partition_alloc_buildflags.h"
|
||||||
|
#include "partition_alloc/partition_alloc_constants.h"
|
||||||
|
|
||||||
|
@@ -299,16 +298,18 @@ PA_ALWAYS_INLINE const PartitionFreelistDispatcher*
|
||||||
|
PartitionFreelistDispatcher::Create(PartitionFreelistEncoding encoding) {
|
||||||
|
switch (encoding) {
|
||||||
|
case PartitionFreelistEncoding::kEncodedFreeList: {
|
||||||
|
- static base::NoDestructor<PartitionFreelistDispatcherImpl<
|
||||||
|
- PartitionFreelistEncoding::kEncodedFreeList>>
|
||||||
|
- encoded_impl;
|
||||||
|
- return encoded_impl.get();
|
||||||
|
+ static constinit PartitionFreelistDispatcherImpl<
|
||||||
|
+ PartitionFreelistEncoding::kEncodedFreeList>
|
||||||
|
+ encoded = PartitionFreelistDispatcherImpl<
|
||||||
|
+ PartitionFreelistEncoding::kEncodedFreeList>();
|
||||||
|
+ return &encoded;
|
||||||
|
}
|
||||||
|
case PartitionFreelistEncoding::kPoolOffsetFreeList: {
|
||||||
|
- static base::NoDestructor<PartitionFreelistDispatcherImpl<
|
||||||
|
- PartitionFreelistEncoding::kPoolOffsetFreeList>>
|
||||||
|
- pool_offset_impl;
|
||||||
|
- return pool_offset_impl.get();
|
||||||
|
+ static constinit PartitionFreelistDispatcherImpl<
|
||||||
|
+ PartitionFreelistEncoding::kPoolOffsetFreeList>
|
||||||
|
+ pool = PartitionFreelistDispatcherImpl<
|
||||||
|
+ PartitionFreelistEncoding::kPoolOffsetFreeList>();
|
||||||
|
+ return &pool;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue