{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":166244463,"defaultBranch":"main","name":"wasi-libc","ownerLogin":"WebAssembly","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2019-01-17T15:02:57.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/11578470?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1718642935.0","currentOid":""},"activityList":{"items":[{"before":"1b19fc65ad84b223876c50dd4fcd7d5a08c311dc","after":"7d4d3b83fc66c79b3faa5989e67ed2d1042dacaf","ref":"refs/heads/main","pushedAt":"2024-09-18T00:05:06.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"ci: update actions (#535)\n\nThis updates the GitHub actions to avoid errors related to deprecations;\r\nsee [this example].\r\n\r\n[this example]:\r\nhttps://github.com/WebAssembly/wasi-libc/actions/runs/10839597105/job/30080296576","shortMessageHtmlLink":"ci: update actions (#535)"}},{"before":"3f812abfb20a21c1427270aa8a59c5e2ddf8c7d3","after":"1b19fc65ad84b223876c50dd4fcd7d5a08c311dc","ref":"refs/heads/main","pushedAt":"2024-08-28T00:39:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"getaddrinfo: improve the service/port resolution (#524)\n\nHello,\r\n\r\nWhile experimenting with the `wasm32-wasip2` target and CPython, I\r\ndiscovered an issue with the `getaddrinfo()` implementation: it fails to\r\nresolve the provided service into a port number, causing `sin_port` to\r\nalways be set to 0. This issue leads to failures in network-related\r\nfunctions that rely on `getaddrinfo()`, such as Python's `urllib3`\r\nlibrary, which passes the result directly to `connect()`. This results\r\nin connection attempts using a port value of 0, which naturally fails.\r\n\r\n### Minimal example to reproduce the problem\r\n```c\r\n#include \r\n#include \r\n#include \r\n\r\nint main(void) {\r\n struct addrinfo *res = NULL;\r\n getaddrinfo(\"google.com\", \"443\", NULL, &res);\r\n\r\n for (struct addrinfo *i = res; i != NULL; i = i->ai_next) {\r\n char str[INET6_ADDRSTRLEN];\r\n if (i->ai_addr->sa_family == AF_INET) {\r\n struct sockaddr_in *p = (struct sockaddr_in *)i->ai_addr;\r\n int port = ntohs(p->sin_port);\r\n printf(\"%s: %i\\n\", inet_ntop(AF_INET, &p->sin_addr, str, sizeof(str)), port);\r\n } else if (i->ai_addr->sa_family == AF_INET6) {\r\n struct sockaddr_in6 *p = (struct sockaddr_in6 *)i->ai_addr;\r\n int port = ntohs(p->sin6_port);\r\n printf(\"%s: %i\\n\", inet_ntop(AF_INET6, &p->sin6_addr, str, sizeof(str)), port);\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n```\r\n```\r\n$ /opt/wasi-sdk/bin/clang -target wasm32-wasip2 -o foo foo.c\r\n$ wasmtime run -S allow-ip-name-lookup=y foo\r\n216.58.211.238: 0\r\n2a00:1450:4026:808::200e: 0\r\n```\r\nExpected output:\r\n```\r\n216.58.211.238: 443\r\n2a00:1450:4026:808::200e: 443\r\n```\r\n### Root Cause\r\n\r\nThe root cause is that `getaddrinfo()` does not correctly translate the\r\nprovided service into a port number. As described in the `getaddrinfo()`\r\nman [page](https://man7.org/linux/man-pages/man3/getaddrinfo.3.html),\r\nthe function should:\r\n\r\n> service sets the port in each returned address structure. If\r\nthis argument is a service name (see\r\n[services(5)](https://man7.org/linux/man-pages/man5/services.5.html)),\r\nit is\r\ntranslated to the corresponding port number. This argument can\r\nalso be specified as a decimal number, which is simply converted\r\nto binary. If service is NULL, then the port number of the\r\nreturned socket addresses will be left uninitialized.\r\n\r\n### Proposed Fix\r\n\r\nThis pull request addresses the issue by implementing the following\r\nbehavior for `getaddrinfo()`:\r\n\r\n* If the service is `NULL`, the port number in the returned socket\r\naddresses remains uninitialized.\r\n* The value is converted to an integer and validated if the service is\r\nnumeric.\r\n\r\nThe PR does not currently add support for translating named services\r\ninto port numbers because `getservbyname()` has not been implemented. In\r\ncases where a named service is provided, the `EAI_NONAME` error code is\r\nreturned.","shortMessageHtmlLink":"getaddrinfo: improve the service/port resolution (#524)"}},{"before":"8279f9591a066aa4930ac07b9a5b590aaf9740a7","after":"3f812abfb20a21c1427270aa8a59c5e2ddf8c7d3","ref":"refs/heads/main","pushedAt":"2024-08-28T00:01:22.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"fix shared library build with llvm-19 (#526)","shortMessageHtmlLink":"fix shared library build with llvm-19 (#526)"}},{"before":"230d4be6c54bec93181050f9e25c87150506bdd0","after":"8279f9591a066aa4930ac07b9a5b590aaf9740a7","ref":"refs/heads/main","pushedAt":"2024-08-27T23:42:48.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Exclude setjmp runtime from LTO (#529)\n\nThis fixes errors like:\r\n```\r\nwasm-ld: error: /Volumes/PortableSSD/git/wasi-sdk/build/install/bin/../share/wasi-sysroot/lib/wasm32-wasi/llvm-lto/19.1.0-wasi-sdk/libsetjmp.a(rt.o): attempt to add bitcode file after LTO (__wasm_longjmp)\r\n```\r\n\r\nNote: Any symbol that the compiler might generate at bitcode compile\r\ntime either need to be unconditionally included at LTO time, or not\r\nbuilt as LTO. This is because LTO object files cannot be added to the\r\nlink after LTO time.","shortMessageHtmlLink":"Exclude setjmp runtime from LTO (#529)"}},{"before":"5d3c5e918c38a4432d5efbfc0f70de76c4779eed","after":"230d4be6c54bec93181050f9e25c87150506bdd0","ref":"refs/heads/main","pushedAt":"2024-08-06T18:04:02.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Improve some pthreads stub functions, batch 1 (#525)\n\nThis is the next part of breaking up #518 into smaller PRs.\r\n\r\nThis is the rest of the commits which change the existing\r\n`THREAD_MODEL=posix` functionality. It:\r\n\r\n* _removes_ some functions which are optional and which were already\r\nnonfunctional.\r\n* (Continues to) establish a precedent of trying to remain as compatible\r\nwith Open Group specifications as possible, even when there are major\r\ndifferences in WASI capabilities (i.e. thread cancellation)\r\n\r\nCompared to the RFC PR, the `pthread_atfork` stub has been dropped as it\r\nis now officially obsolete as of the very recent Issue 8 of the\r\nspecifications.","shortMessageHtmlLink":"Improve some pthreads stub functions, batch 1 (#525)"}},{"before":"b9ef79d7dbd47c6c5bafdae760823467c2f60b70","after":"5d3c5e918c38a4432d5efbfc0f70de76c4779eed","ref":"refs/heads/main","pushedAt":"2024-08-02T16:56:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sbc100","name":"Sam Clegg","path":"/sbc100","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/515813?s=80&v=4"},"commit":{"message":"Improve some pthreads stub functions, batch 0 (#519)\n\nThis is one part of breaking up #518 into smaller PRs. This should be\r\n(IMO) the least-controversial batch of commits","shortMessageHtmlLink":"Improve some pthreads stub functions, batch 0 (#519)"}},{"before":"b9e15a8af930603183eb13af62e193de0f9f9ee3","after":"b9ef79d7dbd47c6c5bafdae760823467c2f60b70","ref":"refs/heads/main","pushedAt":"2024-07-24T18:14:31.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alexcrichton","name":"Alex Crichton","path":"/alexcrichton","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/64996?s=80&v=4"},"commit":{"message":"Use the correct compiler-rt (#517)\n\neg. when a user specifies non-default -resource-dir.\r\n\r\ncf. https://github.com/WebAssembly/wasi-sdk/pull/446","shortMessageHtmlLink":"Use the correct compiler-rt (#517)"}},{"before":"d43dcc63d26013264bb58241e53bde9318349443","after":"b9e15a8af930603183eb13af62e193de0f9f9ee3","ref":"refs/heads/main","pushedAt":"2024-07-12T18:21:34.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Add LTO build option (#505)\n\n* Add LTO build option\r\n\r\nAn old PR which I used as a base:\r\nhttps://github.com/WebAssembly/wasi-libc/pull/150\r\n\r\nCo-Authored-by: Dan Gohman \r\n\r\n* Exclude atexit.c from LTO\r\n\r\nThis fixes a failure in wasi-sdk \"make check\".\r\n(\"undefined symbol: __cxa_atexit\" for ctors_dtors.c test)\r\n\r\n* avoid specifying multiple lto flags for LIBC_NONLTO_OBJS\r\n\r\n---------\r\n\r\nCo-authored-by: Dan Gohman ","shortMessageHtmlLink":"Add LTO build option (#505)"}},{"before":"3f43ea9abb24ed8d24d760989e1d87ea385f8eaa","after":"d43dcc63d26013264bb58241e53bde9318349443","ref":"refs/heads/main","pushedAt":"2024-07-11T23:11:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Adjust Makefile for LLVM trunk (19) as of 2024-07-10 (#512)\n\nhttps://github.com/llvm/llvm-project/commit/0e7590a25cd2e49c5849cc7d2facd5810f8900ce","shortMessageHtmlLink":"Adjust Makefile for LLVM trunk (19) as of 2024-07-10 (#512)"}},{"before":"5667be15d691de057ecfaee95ce5e4c52acf967c","after":"3f43ea9abb24ed8d24d760989e1d87ea385f8eaa","ref":"refs/heads/main","pushedAt":"2024-07-08T15:30:39.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"iconv/wctomb: fix memory corruption related to CURRENT_UTF8 implementation (#511)","shortMessageHtmlLink":"iconv/wctomb: fix memory corruption related to CURRENT_UTF8 implement…"}},{"before":"67080fa04564030496faaac868c4531a178a6e1a","after":"5667be15d691de057ecfaee95ce5e4c52acf967c","ref":"refs/heads/main","pushedAt":"2024-07-03T23:09:00.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"0-initialize thread-specific data upon thread creation. (#508)\n\nIf thread-specific data is not set to 0 upon thread creation,\r\n`__pthread_tsd_run_dtors` will end up running destructors passing\r\nuninitialized memory as memory addresses, which can lead to memory\r\ncorruption.\r\n\r\nThis issue can be triggered when malloc() returns a memory address that\r\nwas freed before, as in that case memory is not zeroed out.","shortMessageHtmlLink":"0-initialize thread-specific data upon thread creation. (#508)"}},{"before":"320bbbcced68ce8e564b0dc4c8f80a5a5ad21a9c","after":"67080fa04564030496faaac868c4531a178a6e1a","ref":"refs/heads/main","pushedAt":"2024-07-03T05:46:25.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sbc100","name":"Sam Clegg","path":"/sbc100","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/515813?s=80&v=4"},"commit":{"message":"`times` should always return 0 for `tms_cutime` (#510)\n\n`tms_cutime` is the sum of the user times of child processes *excluding\r\nthe current process*. Since WASI doesn't provide a way to spawn a new\r\nprocess, this value should always be 0.","shortMessageHtmlLink":"times should always return 0 for tms_cutime (#510)"}},{"before":"ebac9aee23f28aaddf17507712696f56727513d4","after":"320bbbcced68ce8e564b0dc4c8f80a5a5ad21a9c","ref":"refs/heads/main","pushedAt":"2024-06-21T16:49:34.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Adjust Makefile for LLVM trunk (19) as of 2024-06-20 (#509)\n\nhttps://github.com/llvm/llvm-project/commit/41c6e4379204ffc00948edd33d59ba5ebbceaba2","shortMessageHtmlLink":"Adjust Makefile for LLVM trunk (19) as of 2024-06-20 (#509)"}},{"before":"cfe725060ccb31bf8cdafd3607fdc144dc6ab17c","after":null,"ref":"refs/heads/pch/tz_null_ptr_deref","pushedAt":"2024-06-17T16:48:55.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"}},{"before":"31845366d4a2212a9a6bfe4d2336f7869ef3f6d9","after":"ebac9aee23f28aaddf17507712696f56727513d4","ref":"refs/heads/main","pushedAt":"2024-06-17T16:48:52.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"timezone __secs_to_zone stub: guard against null pointer dereference (#507)\n\nCloses #506","shortMessageHtmlLink":"timezone __secs_to_zone stub: guard against null pointer dereference (#…"}},{"before":null,"after":"cfe725060ccb31bf8cdafd3607fdc144dc6ab17c","ref":"refs/heads/pch/tz_null_ptr_deref","pushedAt":"2024-06-16T19:22:53.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"pchickey","name":"Pat Hickey","path":"/pchickey","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/118618?s=80&v=4"},"commit":{"message":"timezone __secs_to_zone stub: guard against null pointer dereference\n\nCloses #506","shortMessageHtmlLink":"timezone __secs_to_zone stub: guard against null pointer dereference"}},{"before":"acd0a6e3524cca9a863a243501ad1d8148992388","after":"31845366d4a2212a9a6bfe4d2336f7869ef3f6d9","ref":"refs/heads/main","pushedAt":"2024-05-30T23:10:57.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"Makefile: separate the target to create empty dummy libraries (#502)\n\n* Makefile: separate the target to create empty dummy libraries\r\n\r\nDuring develompment, it's sometimes convenient to have a separate target.\r\n\r\n* ensure to create the destination directory","shortMessageHtmlLink":"Makefile: separate the target to create empty dummy libraries (#502)"}},{"before":"7528b13170462c82e367d91ae0ecead84e470ceb","after":"acd0a6e3524cca9a863a243501ad1d8148992388","ref":"refs/heads/main","pushedAt":"2024-05-29T14:22:38.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alexcrichton","name":"Alex Crichton","path":"/alexcrichton","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/64996?s=80&v=4"},"commit":{"message":"include pthread.h for all targets (#504)\n\nPer #501, this restores the pre-WASI-SDK-22 behavior of including a copy of\r\npthread.h for all targets -- not just the `*-threads` targets. This helps\r\nminimize the number of preprocessor guards required to port existing POSIX\r\nsoftware to WASI. It also make it easier for projects using WASI-SDK versions\r\nearlier than 22 to upgrade.\r\n\r\nNote that this includes the pthread.h header, but no stub function definitions\r\nto link against. We should probably provide the latter as well, but I'll leave\r\nthat for a separate PR.\r\n\r\nSigned-off-by: Joel Dice ","shortMessageHtmlLink":"include pthread.h for all targets (#504)"}},{"before":"44c4b1e3a58f5c3042fa26dff9c1b29b6fc695b2","after":"7528b13170462c82e367d91ae0ecead84e470ceb","ref":"refs/heads/main","pushedAt":"2024-05-22T17:09:23.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"Extend wasi-emulated-mman with `mprotect`. (#500)\n\nThis implementation never changes actual memory protection, but it does\r\nverify that the address range and flags are valid. The direct motivation\r\nis fixing a linker error where LLVM links to `mprotect` in dead code.","shortMessageHtmlLink":"Extend wasi-emulated-mman with mprotect. (#500)"}},{"before":"153f6321bbe50a978dd184d9ed7b4d2632e3b7ec","after":"44c4b1e3a58f5c3042fa26dff9c1b29b6fc695b2","ref":"refs/heads/main","pushedAt":"2024-05-21T14:36:55.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alexcrichton","name":"Alex Crichton","path":"/alexcrichton","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/64996?s=80&v=4"},"commit":{"message":"Use a different makefile variable for `-D__wasilibc_use_wasip2` (#499)\n\nThis switches from `EXTRA_CFLAGS` to `CFLAGS` so when `EXTRA_CFLAGS` is\r\nin the environment to specify `-g`, for example, it doesn't override\r\np2-handling logic.","shortMessageHtmlLink":"Use a different makefile variable for -D__wasilibc_use_wasip2 (#499)"}},{"before":"a3ef1520ec5c00f375eb87903151307c90cca4f1","after":"153f6321bbe50a978dd184d9ed7b4d2632e3b7ec","ref":"refs/heads/main","pushedAt":"2024-05-20T21:59:53.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"alexcrichton","name":"Alex Crichton","path":"/alexcrichton","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/64996?s=80&v=4"},"commit":{"message":"Ignore the `__tls_base` undefined symbol (#498)\n\nCurrently if `-g` is specified with build flags then wasi-libc fails to\r\nbuild. I'm not certain why it shows up in object files, but it appears\r\nto be a spurious error so this commit adds it to the list of variables\r\nto ignore.","shortMessageHtmlLink":"Ignore the __tls_base undefined symbol (#498)"}},{"before":"2f088a99d8437fb980594f4467879555456f447e","after":"a3ef1520ec5c00f375eb87903151307c90cca4f1","ref":"refs/heads/main","pushedAt":"2024-05-17T17:53:56.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"dlmalloc: account the footprint of the initial heap (#496)\n\nWhile malloc_stats and friends are disabled and unused for wasi-libc,\r\nit's neater to be consistent.\r\n\r\nBackground: My colleagues for some reasons enabled malloc_stats\r\nand asked me why it reports negative values.\r\n\r\nNote: Depending __heap_base, init_top() adjusts the address for\r\nalignment. I think the amount of this adjustment is reported as\r\n\"used\" by malloc_stats. I don't bother to \"fix\" it.","shortMessageHtmlLink":"dlmalloc: account the footprint of the initial heap (#496)"}},{"before":"887613873d839decf16ccc5277a03f09678a93a4","after":"2f088a99d8437fb980594f4467879555456f447e","ref":"refs/heads/main","pushedAt":"2024-05-06T23:56:34.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Update `_POSIX_THREAD_XX` macro definitions (#494)\n\nThis is a follow-up to https://github.com/WebAssembly/wasi-libc/pull/356","shortMessageHtmlLink":"Update _POSIX_THREAD_XX macro definitions (#494)"}},{"before":"129ee9b64be8724745c4ebd45c21dcdc5fd23e22","after":"887613873d839decf16ccc5277a03f09678a93a4","ref":"refs/heads/main","pushedAt":"2024-05-02T21:07:27.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Remove extra lock-taking in preopen setup (#491)\n\nIssue [#8392] in Wasmtime highlights how preopen registration can result\r\nin a hang when compiled for a threaded environment. The problem is that\r\n`internal_register_preopened_fd_unlocked` assumes it will not touch the\r\nglobal lock because its caller, `__wasilibc_populate_preopens`, already\r\nhas taken the lock. Unfortunately, a refactoring in #408 (which\r\nintroduces `internal_register_preopened_fd_unlocked`) did not catch that\r\nthe `resize` function called internally also takes the global lock. This\r\nchange removes that locking in `resize` under the assumption that it\r\nwill only be called when the lock is already taken.\r\n\r\n[#8392]: https://github.com/bytecodealliance/wasmtime/issues/8392","shortMessageHtmlLink":"Remove extra lock-taking in preopen setup (#491)"}},{"before":"13ed98026d1e6f96fa4c0efce3ff849e3040fca3","after":"129ee9b64be8724745c4ebd45c21dcdc5fd23e22","ref":"refs/heads/main","pushedAt":"2024-05-01T14:30:33.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Adjust Makefile for LLVM trunk (19) as of 2024-04-30 (#493)\n\nhttps://github.com/llvm/llvm-project/commit/5bbf1ea8f18d1f99637b7b8bf6b985c186c808f6\r\nadded __wasm_multivalue__ and __wasm_reference_types__, and the latter\r\nalso makes libraries reference the undefined __indirect_function_table\r\nsymbol, which is provided by the linker.","shortMessageHtmlLink":"Adjust Makefile for LLVM trunk (19) as of 2024-04-30 (#493)"}},{"before":"9e8c542319242a5e536e14e6046de5968d298038","after":"13ed98026d1e6f96fa4c0efce3ff849e3040fca3","ref":"refs/heads/main","pushedAt":"2024-04-29T21:46:03.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"abrown","name":"Andrew Brown","path":"/abrown","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/541880?s=80&v=4"},"commit":{"message":"Adjust Makefile for LLVM trunk (19) as of 2024-04-26 (#492)\n\nhttps://github.com/llvm/llvm-project/commit/72c373bfdc9860b3d75e72c219b2c81c90bc4364\r\ndded __GCC_(CON|DE)STRUCTIVE_SIZE macros.","shortMessageHtmlLink":"Adjust Makefile for LLVM trunk (19) as of 2024-04-26 (#492)"}},{"before":"d03829489904d38c624f6de9983190f1e5e7c9c5","after":"9e8c542319242a5e536e14e6046de5968d298038","ref":"refs/heads/main","pushedAt":"2024-04-11T22:27:43.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"add `__wasilibc_reset_preopens` (#489)\n\nThis resets the preopens table to an uninitialized state, forcing it to be\r\nreinitialized next time it is needed. This is useful when pre-initializing\r\nusing e.g. `wizer` or `component-init`. Such tools are capable of taking a\r\nsnapshot of a running application which may later be resumed on an unrelated\r\nruntime (which may have its own, unrelated preopens).\r\n\r\nSigned-off-by: Joel Dice ","shortMessageHtmlLink":"add __wasilibc_reset_preopens (#489)"}},{"before":"1ab654e2f57c7276a4574cd2e3a392f56f4b9974","after":"d03829489904d38c624f6de9983190f1e5e7c9c5","ref":"refs/heads/main","pushedAt":"2024-04-02T23:54:41.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"implement `getsockname`, `getpeername`, and `getaddrinfo` (#488)\n\nThis also includes stubs for `gethostbyname`, `gethostbyaddr`, etc. which were\r\nnecessary to get CPython to build. I believe it will be possible to implement\r\nthem all properly at some point, but don't have the bandwidth at the moment.\r\n\r\nFinally, this includes a few fixes for issues I missed in earlier PRs that\r\nsurfaced when running the CPython `asyncio` test suite.\r\n\r\nSigned-off-by: Joel Dice \r\nCo-authored-by: Dave Bakker ","shortMessageHtmlLink":"implement getsockname, getpeername, and getaddrinfo (#488)"}},{"before":"a2ed34e8107d906337d8b1b88be84f9186d56342","after":"1ab654e2f57c7276a4574cd2e3a392f56f4b9974","ref":"refs/heads/main","pushedAt":"2024-04-01T22:36:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"Add libsetjmp.a/so (#483)\n\n* Add libsetjmp.a/so\r\n\r\nAdd setjmp/longjump support based on Wasm EH proposal.\r\n\r\nIt's provided as a separate library (libsetjmp) from libc so that\r\nruntimes w/o EH support can still load libc.so.\r\n\r\nTo use this setjmp/longjmp implementation, an application should\r\nbe compiled with `-mllvm -wasm-enable-sjlj` and linked with `-lsetjmp`.\r\n(You need an LLVM with the change mentioned below.)\r\n\r\nAlso, you need a runtime with EH support to run such an application.\r\n\r\nIf you want to use the latest EH instructions, you can use\r\n`binaryen --translate-eh-old-to-new` on your application.\r\n\r\nNote: You don't need to translate libsetjmp.a/so to the new EH.\r\nWhile LLVM currently produces bytecode for an old version of the EH\r\nproposal, luckily for us, the bytecode used in this library (ie. the tag\r\ndefinition and the \"throw\" instruction) is compatible with the latest\r\nversion of the proposal.\r\n\r\nThe runtime logic is basically copy-and-paste from:\r\n https://github.com/yamt/garbage/tree/wasm-sjlj-alt2/wasm/longjmp\r\n\r\nThe corresponding LLVM change:\r\n https://github.com/llvm/llvm-project/pull/84137\r\n (Note: you need this change to build setjmp/longjmp using code.\r\n otoh, you don't need this to build libsetjmp.)\r\n\r\nA similar change for emscripten:\r\n https://github.com/emscripten-core/emscripten/pull/21502\r\n\r\nAn older version of this PR, which doesn't require LLVM changes:\r\n https://github.com/WebAssembly/wasi-libc/pull/467\r\n\r\nDiscussion:\r\n https://docs.google.com/document/d/1ZvTPT36K5jjiedF8MCXbEmYjULJjI723aOAks1IdLLg/edit\r\n\r\nAn example to use the latest EH instructions:\r\n```\r\nclang -mllvm -wasm-enable-sjlj -o your_app.wasm your_app.c -lsetjmp\r\nwasm-opt --translate-eh-old-to-new -o your_app.wasm your_app.wasm\r\ntoywasm --wasi your_app.wasm\r\n```\r\nNote: use toywasm built with `-DTOYWASM_ENABLE_WASM_EXCEPTION_HANDLING=ON`.\r\n\r\nAn example to use the older EH instructions, which LLVM currently produces:\r\n```\r\nclang -mllvm -wasm-enable-sjlj -o your_app.wasm your_app.c -lsetjmp\r\niwasm your_app.wasm\r\n```\r\nNote: use wasm-micro-runtime built with `-DWAMR_BUILD_EXCE_HANDLING=1`.\r\nNote: as of writing this, only the classic interpreter supports EH.\r\n\r\n* Make libsetjmp build optional\r\n\r\n* CI: Disable libsetjmp for old LLVM\r\n\r\n* libc-top-half/musl/include/setjmp.h: fix a rebase botch","shortMessageHtmlLink":"Add libsetjmp.a/so (#483)"}},{"before":"6593687e25f07526c4b92a20fe5ddf507599d5b3","after":"a2ed34e8107d906337d8b1b88be84f9186d56342","ref":"refs/heads/main","pushedAt":"2024-03-27T19:24:10.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sunfishcode","name":"Dan Gohman","path":"/sunfishcode","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4503403?s=80&v=4"},"commit":{"message":"wasip2 support for `close`, `poll`, `pselect` (#486)\n\nThis enables `wasm32-wasip2` support for `close`, `poll`, and `pselect`. I\r\ncheated a bit for the latter by re-implementing `pselect` in terms of `poll` to\r\navoid having to implement wasip2 versions of both.\r\n\r\nSigned-off-by: Joel Dice \r\nCo-authored-by: Dave Bakker ","shortMessageHtmlLink":"wasip2 support for close, poll, pselect (#486)"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xOFQwMDowNTowNi4wMDAwMDBazwAAAAS5FwbL","startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOS0xOFQwMDowNTowNi4wMDAwMDBazwAAAAS5FwbL","endCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wMy0yN1QxOToyNDoxMC4wMDAwMDBazwAAAAQhEvfd"}},"title":"Activity · WebAssembly/wasi-libc"}