[PATCH] D60757: Fix a crash bug caused by a nested call of parallelForEach.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 19:14:41 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD358547: Fix a crash bug caused by a nested call of parallelForEach. (authored by ruiu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D60757?vs=195318&id=195505#toc
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60757/new/
https://reviews.llvm.org/D60757
Files:
wasm/OutputSections.cpp
Index: wasm/OutputSections.cpp
===================================================================
--- wasm/OutputSections.cpp
+++ wasm/OutputSections.cpp
@@ -110,8 +110,8 @@
memcpy(Buf, CodeSectionHeader.data(), CodeSectionHeader.size());
// Write code section bodies
- parallelForEach(Functions,
- [&](const InputChunk *Chunk) { Chunk->writeTo(Buf); });
+ for (const InputChunk *Chunk : Functions)
+ Chunk->writeTo(Buf);
}
uint32_t CodeSection::numRelocations() const {
@@ -175,7 +175,7 @@
// Write data section headers
memcpy(Buf, DataSectionHeader.data(), DataSectionHeader.size());
- parallelForEach(Segments, [&](const OutputSegment *Segment) {
+ for (const OutputSegment *Segment : Segments) {
// Write data segment header
uint8_t *SegStart = Buf + Segment->SectionOffset;
memcpy(SegStart, Segment->Header.data(), Segment->Header.size());
@@ -183,7 +183,7 @@
// Write segment data payload
for (const InputChunk *Chunk : Segment->InputSegments)
Chunk->writeTo(Buf);
- });
+ }
}
uint32_t DataSection::numRelocations() const {
@@ -231,8 +231,8 @@
Buf += NameData.size();
// Write custom sections payload
- parallelForEach(InputSections,
- [&](const InputSection *Section) { Section->writeTo(Buf); });
+ for (const InputSection *Section : InputSections)
+ Section->writeTo(Buf);
}
uint32_t CustomSection::numRelocations() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60757.195505.patch
Type: text/x-patch
Size: 1449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190417/3a049291/attachment.bin>
More information about the llvm-commits
mailing list