Skip to content

Fix for core_2gb.test_fs_js_api_wasmfs. NFC #23885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Mar 11, 2025

This tests is failing on the emscripten-releases waterfall.

In 2Gb+ mode its no longer possible to fix the returning of pointers with the returning of -errno since negative number are valid pointers in this mode.

This tests is failing on the emscripten-releases waterfall.

In 2Gb+ mode its no longer possible to fix the returning of pointers
with the returning of `-errno` since negative number are valid pointers
in this mode.
@sbc100 sbc100 requested review from kripken and dschuff March 11, 2025 00:26
var bufPtr = stackAlloc({{{ POINTER_SIZE }}});
FS.handleError(__wasmfs_readlink(stringToUTF8OnStack(path), bufPtr));
var readBuffer = {{{ makeGetValue('bufPtr', '0', '*') }}};
return UTF8ToString(readBuffer);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is where a new multi-value ABI could be useful! See WebAssembly/tool-conventions#247

CC @alexcrichton

@sbc100 sbc100 merged commit 741d0f9 into emscripten-core:main Mar 11, 2025
29 checks passed
@sbc100 sbc100 deleted the fix_wasmfs_readlink_2gb branch March 11, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants