Commit 9fdd2fc
authored
Don't modify emcc_args in EmscriptenBenchmarker::build (#17910)
`Benchmarker::do_benchmark` calls `Benchmarker::build` and pass
`emcc_args` list to it.
https://github.com/emscripten-core/emscripten/blob/929a6d5810908065bf23aa2af492da32ab572d57/test/test_benchmark.py#L469
But `EmscriptenBenchmarker::build` adds to that list, modifying the the
argument passed in.
https://github.com/emscripten-core/emscripten/blob/929a6d5810908065bf23aa2af492da32ab572d57/test/test_benchmark.py#L197
So when `EmscriptenBenchmarker::build` is called multiple times within
`do_benchmark` because there are multiple `EmscriptenBenchmarker`s,
https://github.com/emscripten-core/emscripten/blob/929a6d5810908065bf23aa2af492da32ab572d57/test/test_benchmark.py#L372-L377
the modified `emcc_args` in an earlier iteration gets passed in to the
`EmscriptenBenchmarker::build` call in the next iteration, causing
duplicated file names in the arguments and failing with duplicate symbol
errors.
This PR changes `emcc_args += ...` to `emcc_args = emcc_args + ...` in
order to make a copy. It looks this code used to be the latter form but
somehow changed to the former in #17173.
`test_zzz_lua_binarytrees` and `test_zzz_lua_scimark` are affected by
this and run OK with this PR.1 parent 1322736 commit 9fdd2fc
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
| |||
0 commit comments