Skip to content

Commit a6715e5

Browse files
committed
deps: cherry-pick workaround for clang-3.4 ICE
Fixes: nodejs#8323 Refs: nodejs#8343 Refs: nodejs#8317 PR-URL: nodejs#11029 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent c1acc22 commit a6715e5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

deps/v8/src/heap/mark-compact.cc

+12-2
Original file line numberDiff line numberDiff line change
@@ -3673,10 +3673,20 @@ int NumberOfPointerUpdateTasks(int pages) {
36733673

36743674
template <PointerDirection direction>
36753675
void UpdatePointersInParallel(Heap* heap, base::Semaphore* semaphore) {
3676+
// Work-around bug in clang-3.4
3677+
// https://github.com/nodejs/node/issues/8323
3678+
struct MemoryChunkVisitor {
3679+
PageParallelJob<PointerUpdateJobTraits<direction> >& job_;
3680+
MemoryChunkVisitor(PageParallelJob<PointerUpdateJobTraits<direction> >& job)
3681+
: job_(job) {}
3682+
void operator()(MemoryChunk* chunk) {
3683+
job_.AddPage(chunk, 0);
3684+
}
3685+
};
3686+
36763687
PageParallelJob<PointerUpdateJobTraits<direction> > job(
36773688
heap, heap->isolate()->cancelable_task_manager(), semaphore);
3678-
RememberedSet<direction>::IterateMemoryChunks(
3679-
heap, [&job](MemoryChunk* chunk) { job.AddPage(chunk, 0); });
3689+
RememberedSet<direction>::IterateMemoryChunks(heap, MemoryChunkVisitor(job));
36803690
int num_pages = job.NumberOfPages();
36813691
int num_tasks = NumberOfPointerUpdateTasks(num_pages);
36823692
job.Run(num_tasks, [](int i) { return 0; });

0 commit comments

Comments
 (0)