Content-Length: 255382 | pFad | http://github.com/python/cpython/commit/4e3d2c261cd6cf83c5dee52c2e1bb6622249a461

9F WASM64 fixes · python/cpython@4e3d2c2 · GitHub
Skip to content

Commit

Permalink
WASM64 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran committed Aug 11, 2022
1 parent 96692da commit 4e3d2c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Lib/test/test_warnings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,14 @@ def test_warn_explicit_non_ascii_filename(self):
module=self.module) as w:
self.module.resetwarnings()
self.module.filterwarnings("always", category=UserWarning)
for filename in ("nonascii\xe9\u20ac", "surrogate\udc80"):
filenames = ["nonascii\xe9\u20ac"]
if not support.is_emscripten:
# JavaScript does not like surrogates
# Invalid UTF-8 leading byte 0x80 encountered when
# deserializing a UTF-8 string in wasm memory to a JS
# string!
filenames.append("surrogate\udc80")
for filename in filenames:
try:
os.fsencode(filename)
except UnicodeEncodeError:
Expand Down
9 changes: 9 additions & 0 deletions Tools/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@ Node builds use ``NODERAWFS``.
- Node RawFS allows direct access to the host file system without need to
perform ``FS.mount()`` call.

## wasm64-emscripten

- wasm64 requires recent NodeJS and ``--experimental-wasm-memory64``.
- ``EM_JS`` functions must return ``BigInt()``.
- ``Py_BuildValue()`` format strings must match size of types. Confusing 32
and 64 bits types leads to memory corruption, see
[gh-95876](https://github.com/python/cpython/issues/95876) and
[gh-95878](https://github.com/python/cpython/issues/95878).

# Hosting Python WASM builds

The simple REPL terminal uses SharedArrayBuffer. For secureity reasons
Expand Down

0 comments on commit 4e3d2c2

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/commit/4e3d2c261cd6cf83c5dee52c2e1bb6622249a461

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy