commit | 6c055d92f3cfac32cbbc16bfffc7369a8b77bd88 | [log] [tgz] |
---|---|---|
author | meg-gupta <megupta@microsoft.com> | Wed Jan 17 02:12:29 2018 |
committer | meg-gupta <megupta@microsoft.com> | Wed Jan 17 02:12:29 2018 |
tree | 7276d06e0e6eb02ed10d686e5b5efc7415054296 | |
parent | 2fd420bdbe68f005feb6830e887b12bc214ab9f1 [diff] | |
parent | dee125d086d66a92641611b59eee504732a0df59 [diff] |
[MERGE #4535 @meg-gupta] Fix setting hasBailout when there are inlined functions in try/catch Merge pull request #4535 from meg-gupta:fixCatchEatingUpEx Fixes OS#15078638 When we bailout executing trycode from within OP_TryCatch, we complete the execution of the current function enclosing the try/catch in the interpreter. If there was an exception within the try region, it is caught and handled accordingly in ProcessTryHandlerBailOut which reconstructs try/catch/finally frames when we bailout midway executing code within OP_TryCatch. If there was an exception outside the try region, the catch of the OP_TryCatch ends up catching it, because it happens to be on the callstack. For this we use the hasBailOut bit which is per function, so we know that this exception has to be passed above. When we have inlined functions inside the try, and for bailouts inside the inlined code, we do not set the hasBailedOut bit, so that the enclosing functions catch in OP_TryCatch catches it. But when we bailout from inlined code inside try, we execute inlined code, as well as the enclosing function's code in the interpreter. We will be execution code past the try/catch of the current function in the interpreter. Now if any code outside the eh region throws, we will catch that in OP_TryCatch which happens to be on the callstack. And we will end up handling it instead of passing above because we have not set the hasBailedOutBit from the bailout point. This change fixes this issue. We pass a pointer to the hasBailedOutBit and set it once we have finished executing the inlined frames and are ready to process the interpreter frame of the current function.
ChakraCore is the core part of Chakra, the high-performance JavaScript engine that powers Microsoft Edge and Windows applications written in HTML/CSS/JS. ChakraCore supports Just-in-time (JIT) compilation of JavaScript for x86/x64/ARM, garbage collection, and a wide range of the latest JavaScript features. ChakraCore also supports the JavaScript Runtime (JSRT) APIs, which allows you to easily embed ChakraCore in your applications.
You can stay up-to-date on progress by following the MSEdge developer blog.
Debug | Test | Release | |
---|---|---|---|
Windows (x64) | |||
Windows (x86) | |||
Windows (ARM) | |||
Ubuntu 16.04 (x64)[a] | |||
Ubuntu 16.04 (x64)[s] | |||
Ubuntu 16.04 (x64)[s][n] | * | * | |
OS X 10.9 (x64)[a] | |||
OS X 10.9 (x64)[s][n] | * | * |
[a] Static | [s] Shared | [n] NoJIT | * Omitted
Above is a table of our rolling build status. We run additional builds on a daily basis. See Build Status for the status of all builds and additional details.
If you believe you have found a security issue in ChakraCore, please share it with us privately following the guidance at the Microsoft Security TechCenter. Reporting it via this channel helps minimize risk to projects built with ChakraCore.
You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 or above, with either Visual Studio 2015 or 2017 with C++ support installed. Once you have Visual Studio installed:
git clone https://github.com/Microsoft/ChakraCore.git
Build\Chakra.Core.sln
in Visual StudioMore details in Building ChakraCore.
Alternatively, see Getting ChakraCore binaries for pre-built ChakraCore binaries.
Once built, you have a few options for how you can use ChakraCore:
Build\VcBuild\bin\${platform}_${configuration}
Build\VcBuild\bin\x64_debug
)A note about using ChakraCore: ChakraCore is the foundational JavaScript engine, but it does not include the external APIs that make up the modern JavaScript development experience. For example, DOM APIs like document.write()
are additional APIs that are not available by default and would need to be provided. For debugging, you may instead want to use print()
.
Contributions to ChakraCore are welcome. Here is how you can contribute to ChakraCore:
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Please refer to Contribution Guidelines for more details.
Code licensed under the MIT License.
For details on our planned features and future direction please refer to our Roadmap.
If you have questions about ChakraCore, or you would like to reach out to us about an issue you're having or for development advice as you work on a ChakraCore issue, you can reach us as follows: