Skip to content

Commit 35c6779

Browse files
authored
gh-145177: Update Emscripten to 6.0.2 (#153235)
Removes the patched `getentropy()` call since it has been included upstream.
1 parent d7275d3 commit 35c6779

4 files changed

Lines changed: 1 addition & 27 deletions

File tree

Platforms/emscripten/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Any data that can vary between Python versions is to be kept in this file.
22
# This allows for blanket copying of the Emscripten build code between supported
33
# Python versions.
4-
emscripten-version = "6.0.0"
4+
emscripten-version = "6.0.2"
55
node-version = "24"
66
test-args = [
77
"-m", "test",

Python/emscripten_syscalls.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -293,26 +293,6 @@ int __syscall_poll(intptr_t fds, int nfds, int timeout) {
293293
return __block_for_int(p);
294294
}
295295

296-
297-
// Workaround for an Emscripten bug: getentropy(buffer, 1) returns the single
298-
// byte of entropy as the return code. Fixed upstream by
299-
// emscripten-core/emscripten#27122
300-
int __real_getentropy(void*, size_t);
301-
302-
int __wrap_getentropy(void *buffer, size_t len) {
303-
if (len != 1) {
304-
return __real_getentropy(buffer, len);
305-
}
306-
// Length is 1. Workaround is to get two bytes of entropy and write the
307-
// first one into the original target buffer.
308-
uint8_t tmp[2];
309-
int ret = __real_getentropy(tmp, 2);
310-
if (ret == 0) {
311-
*(uint8_t *)buffer = tmp[0];
312-
}
313-
return ret;
314-
}
315-
316296
#include <sys/ioctl.h>
317297

318298
int syscall_ioctl_orig(int fd, int request, void* varargs)

configure

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,10 +2411,6 @@ AS_CASE([$ac_sys_system],
24112411
dnl Avoid bugs in JS fallback string decoding path
24122412
AS_VAR_APPEND([LINKFORSHARED], [" -sTEXTDECODER=2"])
24132413
2414-
dnl Workaround for a bug in Emscipten libc's getentropy. See
2415-
dnl __wrap_getentropy in Python/emscripten_syscalls.c.
2416-
AS_VAR_APPEND([LDFLAGS_NODIST], [" -Wl,--wrap=getentropy"])
2417-
24182414
AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
24192415
AS_VAR_APPEND([LINKFORSHARED], [" -sMAIN_MODULE"])
24202416
])

0 commit comments

Comments
 (0)