-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix PAL double initialize #2296
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
Conversation
9d5640d to
5e9ca6a
Compare
|
Second part of this work requires #2288 is merged. |
| memcpy(path, msg, (size_t)str_len); \ | ||
| path[str_len] = char(0) | ||
|
|
||
| void GetBinaryLocation(char *path, const unsigned size) |
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.
size [](start = 50, length = 4)
Specify type for size explicitly?
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.
We had discussed on this when it was implemented for the first time. It should be reachable from the blame part.
5e9ca6a to
d55cd22
Compare
|
Adding additional [ Android / ARMv7 / iOS ] related commits straight to this PR. Fixes are related. A full review on this PR is highly appreciated. |
|
moved custom |
…ptimizing the symbols away
- Automated preq. installation for Debian / RedHat distros Build/compile_clang.sh This script downloads and compiles llvm/clang/lto-gold projects [3.9.1]
9be3130 to
b33e26f
Compare
|
|
||
| LLVM_VERSION="3.9.1" | ||
|
|
||
| CC_URL="git://sourceware.org/git/binutils-gdb.git\nhttp://llvm.org/releases/${LLVM_VERSION}/\n" |
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.
/cc @digitalinfinity
|
You can now resolve the CI issues as described here: #2332 (comment) |
b33e26f to
ef987bb
Compare
|
"Fix PAL double initialize" -- Could you document in comment or commit message in more details, how previously PAL double initializes and now does not? From the surface it looks we have 3+ places calling PAL_InitializeChakraCore(). |
|
|
||
| __attribute__((no_instrument_function)) | ||
| static void | ||
| GetBinaryLocation() |
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.
multiple copies of this function...
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.
Intentional. See comments, this file shouldn't take dependencies
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.
Yes, I was aware of that. Questionable though if it is worth duplicating code for that goal.
Also, is this only useful for diagnostics builds and can be excluded form "release"?
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.
It is already excluded for any configuration with no --trace. -> #ifdef ENABLE_CC_XPLAT_TRACE
| // All args are right after ReturnAddress by custom calling convention | ||
| Js::Var* pArgs = reinterpret_cast<Js::Var*>(addrOfReturnAddress) + 1; | ||
| #ifdef _ARM_ | ||
| n += 2; // ip + fp |
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.
Could you please document more details for this "+ 2"? Android ARM stores "ip + fp" in between return address and args?
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.
Yes. Not just Android ARM, so ifdef _ARM_. Still work in progress here though.
jianchun
left a comment
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.
👍
Previously we were calling 2 sep. methods and those were ending up calling the same final initializer multiple times. ATM, we have multiple entry points (Shared / CH / Static) and we trigger base initializer only once. |
|
@ThomsonTan @jianchun Thanks for the review |
Merge pull request #2296 from obastemur:pal_fix_double_init
No description provided.