-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature/android #4452
base: master
Are you sure you want to change the base?
Feature/android #4452
Conversation
pal/src/sync/cclock.cpp
Outdated
|
||
CCLock::CCLock(bool shouldTrackThreadId) | ||
{ | ||
char *alignedMutexPtr = AlignPointer(this->mutexPtr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the CCLock lands on unaligned memory, it causes SIGBUS on the next mutex manipulation on Android. I see that the OSX tests failed though...maybe I'll guard the alignment for Android only after all tests are finished.
@gashtio Thank you for sending this! |
069f228
to
67a05f9
Compare
Okay, all checks pass now. |
5310021
to
ddcca1d
Compare
@obastemur I did some major changes to the PR since I started testing this more thoroughly and it kept breaking whenever I also dug a bit deeper into my previous issue that the I'm also pretty sure the Windows ARM build isn't working properly because of all this, but I don't have a device to test on. Also posted this on Reviewable if that's easier to look at. I've also ported the library for iOS and currently doing some tests, but it relies on code in this PR. If you have any review comments please let me know so we can move this forward :) |
@@ -1332,23 +1332,10 @@ void __cdecl _alloca_probe_16() | |||
#endif | |||
Js::Var varResult; | |||
|
|||
//The ARM can pass 4 arguments via registers so handle the cases for 0 or 1 values without resorting to asm code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we limit these changes to non WIN32? (including the one above?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted those as you requested (updated reviewable), but they're tied to the hand-written assembly function. As I'm not sure if you meant that you're using the same files for another project or something else, I didn't do changes to the assembly - let me know if you want the old version compiled for Win32.
I actually guarded most of the changes so they're compiled for __ANDROID__
only, but the .asm function seemed broken and I modified it for all platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was only referring to this file (JavascriptFunction.cpp)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right, that's done then.
@gashtio great effort here! Thank you! I have a small change request. Rest LGTM. |
Right. Not with ChakraCore. |
…S/EXC_ARM_DA_ALIGN errors for misaligned access
…, fixed signature and several issues Multiple fixes for handling stack unwinding on ARM (with JavascriptStackWalker). Resolves issue chakra-core#3966 Fixed a problem with DeferredParsingThunk which was referring to the wrong address for the JS function passed to DeferredParse Changed the scheme for obtaining the JS function called through walking on ARMv7 the stack to a more reliable one. The callee is now expected to put a specific amount of bytes before the frame pointer, rather than put the register arguments somewhere, which is compiler/flags dependent Fixed possible crash in Release mode where R9 register was reused and and had incorrect value
8bcdf87
to
647d93d
Compare
@gashtio I had some luck in the past testing on a Raspberry Pi 2/3 running Windows IoT Core. I don't think our test suite will run, but some basic testing using ch.exe should be possible. |
@kfarnung I'll need this on consoles, so having tests is definitely on my list, just not yet. I've only done some small tests with various JS frameworks that seem to run OK. This is more of a initial port to get the basics up and running, but my idea is to add tests for all new platforms. |
Resolves issue #3966
This change is