kripken/emscripten — pull request #1301 by Manny-MADE (2013-06-17 15:21:47+00:00)
Title: BUGFIX: lists cannot be copied as "llvm_va_copy" was broken, didn't copy list offset

This is an improved version of the earlier pull request: https://github.com/kripken/emscripten/pull/1300

"It seems va_list handling is seriously broken and incompatible.
Check out this testcase, the output at the top of the page is from the native executable https://dl.dropboxusercontent.com/u/20452169/drahtwerk/vabug.html
Here is the corresponding cpp code https://dl.dropboxusercontent.com/u/20452169/drahtwerk/vabug.cpp

The pull request fixes the issue and the tests run identical to native code."

Additional changes include:
- no hardcoded values for struct offsets, it's now based on the Runtime.QUANTUM_SIZE value.
- lots of comments
- the varargs-test ("runner.py::test_varargs") has been extended to include several tests related to reusing and copying a list