-
Notifications
You must be signed in to change notification settings - Fork 209
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
php-wasm : Symlink infinite loop #1283
Comments
@mho22 this makes sense, good find! This seems like an Emscripten issue, I think it's this line: If you'd open a PR for that project, it would fix the problem for everyone and we wouldn't have to patch the Emscripten output in here. If it's not reviewed and released reasonably quickly, let's explore an in-Playground patch after all. |
@adamziel new Pull Request created. |
@adamziel Emscripten Pull Request merged ! 🎉. I assume this will be considered from now on, correct? Should I suggest a Pull Request with up-to-date builds ? |
@mho22 We'll need to wait for the next Emscripten release and then update the Emscripten version used by the base Dockerfile. From there, rebuilding will do the trick. Thank you so much for your amazing work and going as far as fixing the upstream project! |
@mho22 I read through the Emscripten PR. Nice work! |
@adamziel @brandonpayton Thanks, everyone! I'll make sure to keep an eye out for the next Emscripten release. |
@adamziel @brandonpayton Emscripten 3.1.60 is available. Do you think I should update current version 3.1.43 to version 3.1.60 ? |
👋 Hi @mho22! It looks like there might be a reason we are still back on the 3.1.43 version. The Emscripten v3.1.44 changes include:
And it looks like we currently reference the asm property for error reporting. Unless @adamziel knows other reasons we haven't upgraded, I imagine it would be good to upgrade if the dependency on the asm property is adjusted so error logging improvements still work. (We might also have other uses of that property, but that was the one I found.) |
Hi @adamziel ! What do you think about @brandonpayton said about this ? |
I have a directory
public
used asdocumentroot
. This directory has 3 files :The symlink returns the
store
directory at the root level, same level aspublic
The symlink has been created with a php script
symlink.php
:When trying :
http://localhost:2222/file.php -> "PUBLIC"
http://localhost:2222/directory/subfile.php -> "DIRECTORY"
http://localhost:2222/store/storefile.php -> 404 NOT FOUND
I found out the method called here to make this work is
lookupPath()
.The problem is : that same
lookupPath()
method callsFS.readlink(current_path)
. And that samereadlink
method callslookupPath()
inside of it. If thecurrent_path
doesnt change in between them, it creates a sort of inifinite loop.And that is what is happening here. In fact, the return value of the
readlink
method is always the same result. In my example it isphp-wasm/public/store
.And if I separate elements :
To resolve this, I modified the return value of the
readlink
method :Waiting for your confirmation before creating a PR for this.
The text was updated successfully, but these errors were encountered: