Skip to content

Commit

Permalink
Do not emit the DataCount section (WebAssembly#2010)
Browse files Browse the repository at this point in the history
Its presence was causing validation errors in the Emscripten test
suite. This should be reverted once the default feature set is no
longer All.
  • Loading branch information
tlively authored Apr 15, 2019
1 parent 1e91e1b commit cb2d635
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
11 changes: 8 additions & 3 deletions src/wasm/wasm-binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,14 @@ void WasmBinaryWriter::writeDataCount() {
if (!wasm->features.hasBulkMemory() || !wasm->memory.segments.size()) {
return;
}
auto start = startSection(BinaryConsts::Section::DataCount);
o << U32LEB(wasm->memory.segments.size());
finishSection(start);

// TODO(tlively): re-enable writing the data count once the default feature
// set is no longer All, which causes validation errors in Emscripten due to
// the presence of an unrecognized section.

// auto start = startSection(BinaryConsts::Section::DataCount);
// o << U32LEB(wasm->memory.segments.size());
// finishSection(start);
}

void WasmBinaryWriter::writeDataSegments() {
Expand Down
2 changes: 1 addition & 1 deletion test/debugInfo.fromasm.clamp.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/debugInfo.fromasm.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions test/unit/test_datacount.py

This file was deleted.

0 comments on commit cb2d635

Please sign in to comment.