Skip to content
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

fix: handle mmap offset #10095

Merged
merged 2 commits into from
Jan 6, 2020

Conversation

petersalomonsen
Copy link
Contributor

fixes #10094

@welcome
Copy link

welcome bot commented Dec 22, 2019

Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS.

petersalomonsen added a commit to petersalomonsen/libgit2 that referenced this pull request Dec 22, 2019
add http transport for emscripten
add example for git commit
fix example for git add
add synchronous http worker for nodejs
add example for interacting with examples from emscripten
depends on mmap offset fix in emscripten:
emscripten-core/emscripten#10095
This was referenced Dec 22, 2019
petersalomonsen added a commit to petersalomonsen/libgit2 that referenced this pull request Dec 22, 2019
add http transport for emscripten
add example for git commit
fix example for git add
add synchronous http worker for nodejs
add web http support using sync XmlHttpRequest
add nodejs and webworker examples for interacting with libgit2.js
depends on mmap offset fix in emscripten:
emscripten-core/emscripten#10095
petersalomonsen added a commit to petersalomonsen/libgit2 that referenced this pull request Dec 22, 2019
add http transport for emscripten
add example for git commit
fix example for git add
add synchronous http worker for nodejs
add web http support using sync XmlHttpRequest
add nodejs and webworker examples for interacting with libgit2.js
depends on mmap offset fix in emscripten:
emscripten-core/emscripten#10095
petersalomonsen added a commit to petersalomonsen/libgit2 that referenced this pull request Dec 22, 2019
add http transport for emscripten
add example for git commit
fix example for git add
add synchronous http worker for nodejs
add web http support using sync XmlHttpRequest
add nodejs and webworker examples for interacting with libgit2.js
depends on mmap offset fix in emscripten:
emscripten-core/emscripten#10095
petersalomonsen added a commit to petersalomonsen/libgit2 that referenced this pull request Dec 23, 2019
add http transport for emscripten
add example for git commit
fix example for git add
add synchronous http worker for nodejs
add web http support using sync XmlHttpRequest
add nodejs and webworker examples for interacting with libgit2.js
depends on mmap offset fix in emscripten:
emscripten-core/emscripten#10095
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Thanks @petersalomonsen !

This looks right to me, but it's been a while since I read this code, so I might be missing something.

Perhaps you could add a test for this? Looks like https://github.com/emscripten-core/emscripten/blob/incoming/tests/fs/test_mmap.c has some msync usage (runnable with ./tests/runner.py test_fs_mmap), perhaps that can be extended a little?

@petersalomonsen
Copy link
Contributor Author

petersalomonsen commented Dec 24, 2019

Thanks for feedback @kripken I've extended test_mmap.c with a test case for mmap with offset. Please have a look and let me know if it's according to what you had in mind.

add and use offset parameter in doMsync
add test case for shared mmap with offset

fixes emscripten-core#10094
petersalomonsen added a commit to petersalomonsen/libgit2 that referenced this pull request Dec 24, 2019
add http transport for emscripten
add example for git commit
fix example for git add
add synchronous http worker for nodejs
add web http support using sync XmlHttpRequest
add nodejs and webworker examples for interacting with libgit2.js
depends on mmap offset fix in emscripten:
emscripten-core/emscripten#10095
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Great, thanks @petersalomonsen !

@kripken kripken merged commit cab9e53 into emscripten-core:incoming Jan 6, 2020
@petersalomonsen petersalomonsen deleted the fix-mmap-offset branch January 7, 2020 13:23
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
Add and use offset parameter in doMsync

fixes emscripten-core#10094
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.

mmap ignores offset
2 participants