issue_owner_repo
listlengths
2
2
issue_body
stringlengths
0
261k
issue_title
stringlengths
1
925
issue_comments_url
stringlengths
56
81
issue_comments_count
int64
0
2.5k
issue_created_at
stringlengths
20
20
issue_updated_at
stringlengths
20
20
issue_html_url
stringlengths
37
62
issue_github_id
int64
387k
2.46B
issue_number
int64
1
127k
[ "chakra-core", "ChakraCore" ]
###### ChakraCore version: version 1.12.0.0-beta ###### Build Commond ./build.sh --debug ###### OS Ubuntu 16.04.6 LTS (Linux 4.4.0-142-generic x86_64) ###### Test case ``` function test0() { var func2 = (async (xsbazt = hkvvxr(x)) => [...[ -2, ]]); var a = -191; func3(a); } function Run(){ WScript.Echo('PASSED'); } WScript.Attach(Run); ``` ###### Output ``` ASSERTION 202914: (ChakraCore/lib/Runtime/Debug/DebugContext.cpp, line 359) pFuncBody->GetYieldRegister() == oldYieldRegister Failure: (pFuncBody->GetYieldRegister() == oldYieldRegister) Illegal instruction ``` Credits: This vulnerability is detected by chong from OWL337.
ASSERTION (pFuncBody->GetYieldRegister() == oldYieldRegister) failed in Js::DebugContext::RundownSourcesAndReparse
https://api.github.com/repos/chakra-core/ChakraCore/issues/6453/comments
0
2020-06-01T09:03:35Z
2020-06-09T03:10:58Z
https://github.com/chakra-core/ChakraCore/issues/6453
628,271,379
6,453
[ "chakra-core", "ChakraCore" ]
Hi. Is there a way to break an endless loop? In example, I have some script that contains endless loop, and I can't check it before execution. I want to destroy a runtime instance after delay, but I'm getting exception with message "A runtime that is still in use cannot be disposed".
Break endless loop
https://api.github.com/repos/chakra-core/ChakraCore/issues/6452/comments
2
2020-06-01T07:29:43Z
2020-06-01T08:53:23Z
https://github.com/chakra-core/ChakraCore/issues/6452
628,217,902
6,452
[ "chakra-core", "ChakraCore" ]
Tracking: WebAssembly [reference types][r] proposal is attempting to go to Phase 4. Obviously it is not going to be trivial amount of work to implement. Upside of trying to this proposal is that it is in a mature stage and won't change much. It might also be useful for embedded scenarios. [r]: https://github.com/WebAssembly/reference-types
[Wasm] Reference types
https://api.github.com/repos/chakra-core/ChakraCore/issues/6451/comments
0
2020-05-27T02:08:33Z
2020-05-27T02:08:33Z
https://github.com/chakra-core/ChakraCore/issues/6451
625,319,849
6,451
[ "chakra-core", "ChakraCore" ]
Hello! Here is an example integration with full debugger capabilities I wanted to share. It also shows how to project objects to Javascript easily via reflection. Is a great API you come with! Thank you. https://bitbucket.org/Adr14n/chakracore-.net-integration-example/src/master/
Example of .Net Integration
https://api.github.com/repos/chakra-core/ChakraCore/issues/6450/comments
1
2020-05-26T13:23:08Z
2020-05-29T10:20:21Z
https://github.com/chakra-core/ChakraCore/issues/6450
624,880,302
6,450
[ "chakra-core", "ChakraCore" ]
As one can't give native funcions objects a name (name property of function objects is read only) looks like there is no way to make instanceof to work on external objects. Is there any workaround?
instanceof not working with external objects
https://api.github.com/repos/chakra-core/ChakraCore/issues/6448/comments
8
2020-05-18T15:56:24Z
2020-05-19T14:58:50Z
https://github.com/chakra-core/ChakraCore/issues/6448
620,323,913
6,448
[ "chakra-core", "ChakraCore" ]
There are various issues with the test suite that make it harder to maintain and use than it should be. Each of these should be addressed. However this obviously won't improve the experience for any users of ChakraCore it's a purely for developer/contributor experience hence this is low priority but still something to work on: - [ ] Tests can't be run on release builds https://github.com/microsoft/ChakraCore/issues/6422 - [x] If a test file does nothing OR does not exist it is counted as a pass #6596 - [ ] To run tests: Linux & macOS use runtests.py, windows uses rl.exe - ideally should be consistent #6585 #6596 - [ ] Many tests have unnecessary baseline files when they could just throw exceptions for failures and print 'pass' for success - baselines are strictly necessary only when tracing actions that can't be synchronously monitored/checked within javascript - [ ] There are 48 tests that don't use a baseline but print a multi-line output ('pass'/'passed' repeatedly) - [ ] Success indicators vary "Pass", "Passed", "pass", "PASSED" etc. - should be consistent. - [ ] Many tests are not well explained/don't clearly show what they're for - [ ] Many test files could be combined into larger aggregate files - which would run faster and be easier to manage - [ ] Baseline files all use CRLF line endings - ch outputs CRLF on windows but LF only on linux/macOS - currently runtests.py converts CRLF in the baselines to LF only upon every run - should update ch to do LF only and remove all CRs #6444 makes some progress on some of these points though there is far more to be done.
Test Suite Cleanup
https://api.github.com/repos/chakra-core/ChakraCore/issues/6445/comments
1
2020-05-09T10:49:20Z
2021-02-25T08:50:03Z
https://github.com/chakra-core/ChakraCore/issues/6445
615,148,180
6,445
[ "chakra-core", "ChakraCore" ]
There are a few CMake build options for ICU currently: - `NO_ICU` disables building with ICU support - `SYSTEM_ICU` triggers default ICU link libraries to be used - `EMBED_ICU` download ICU sources, then build and use them during build - `ICU_INCLUDE_PATH` custom ICU installation (just the include path) There is some detection of the library being present, in main CMake for custom ICU path and in PAL for one of the header files. It might be beneficial to refactor ICU support around detecting the library from main CMakeLists.txt: - `WITH_ICU` - enable ICU, fail if library not found; default to ON if the library is present, and OFF otherwise - `ICU_PREFIX` to point it to the location of custom of ICU installation, implies `WITH_ICU` - `EMBED_ICU` download and build ICU, implies `WITH_ICU`
CMake ICU options
https://api.github.com/repos/chakra-core/ChakraCore/issues/6443/comments
0
2020-05-08T14:38:25Z
2020-05-08T14:38:25Z
https://github.com/chakra-core/ChakraCore/issues/6443
614,783,746
6,443
[ "chakra-core", "ChakraCore" ]
Hello, I am able to reproduce the following bug still with NuGet package 1.11.17 using the code above `eval("a/("+Array(2**16).fill(0).join(",")+")");` This was closed out a while back https://github.com/Microsoft/ChakraCore/issues/5699 so I thought I would create a new issue.
Crash regression for eval("a/("+Array(2**16).fill(0).join(",")+")");
https://api.github.com/repos/chakra-core/ChakraCore/issues/6438/comments
1
2020-04-27T16:51:51Z
2020-04-27T19:20:23Z
https://github.com/chakra-core/ChakraCore/issues/6438
607,699,375
6,438
[ "chakra-core", "ChakraCore" ]
Chakra failed when build with std:c++latest by msvc on Windows. Could you please help take a look at this? **You can repro this issue as the steps below:** 1. git clone -c core.autocrlf=true https://github.com/microsoft/ChakraCore D:\Chakra\src 2. open a clean VS2019 x86 prompt and browse to D:\Chakra\src 3. set CL=/std:c++latest 4. msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.18362.0 Build\Chakra.Core.sln /t:Rebuild **Failures:** JsrtContextCore.i JsrtContextCore.i(1558483): error C2220: the following warning is treated as an error JsrtContextCore.i(1558483): warning C4499: 'static': an explicit specialization cannot have a storage class (ignored) JsrtContextCore.i(1558485): warning C4499: 'static an explicit specialization cannot have a storage class (ignored) JsrtContextCore.i(1558487): warning C4499: 'static': an explicit specialization cannot have a storage class (ignored)
Chakra failed when build with std:c++latest by msvc on Windows
https://api.github.com/repos/chakra-core/ChakraCore/issues/6436/comments
7
2020-04-23T09:52:56Z
2020-05-15T11:37:47Z
https://github.com/chakra-core/ChakraCore/issues/6436
605,397,249
6,436
[ "chakra-core", "ChakraCore" ]
While working on #6430 I've noticed that there are no includes for `unicode/uchar.h`, which was puzzling at first, but then I realized that`-Wno-implicit-function-declaration` set up in CMake inhibits complaints about that. Implicit function declarations are dangerous, because they can hide mismatches between definition and use (which actually happened when ICU failed to build in time for the link). It is a warning (rather than an error) due to backwards compatibility with older C standards. But there are [even more](https://github.com/microsoft/ChakraCore/blob/9d644c51c5914deebf2d437f5fd8c58acbeda3fc/CMakeLists.txt#L308): - [ ] `-Wno-ignored-attributes` - [x] `-Wno-deprecated-declarations` - [ ] `-Wno-parentheses-equality` - [x] `-Wno-missing-braces` - [ ] `-Wno-reorder` - [ ] `-Wno-microsoft` - [ ] `-Wno-unused-value` - [ ] `-Wno-int-to-void-pointer-cast` - [ ] `-Wno-invalid-offsetof` - [ ] `-Wno-undefined-inline` - [ ] `-Wno-inconsistent-missing-override` - [ ] `-Wno-c++14-extensions` - [ ] `-Wno-macro-redefined` - [ ] `-Wno-pragmas` - [ ] `-Wno-invalid-token-paste` - [ ] `-Wno-format` - [ ] `-Wno-invalid-noreturn` - [ ] `-Wno-null-arithmetic` - [ ] `-Wno-tautological-constant-out-of-range-compare` - [ ] `-Wno-tautological-undefined-compare` - [ ] `-Wno-address-of-temporary` - [ ] `-Wno-null-conversion` - [ ] `-Wno-return-type` - [ ] `-Wno-switch` - [x] `-Wno-implicit-function-declaration` (both C and C++) - [ ] `-Wno-int-to-pointer-cast` - [ ] `-Wno-tautological-constant-compare` - [ ] `-Wno-enum-compare-switch` - [ ] `-Wno-unknown-warning-option` ``` # notes.. # -Wno-address-of-temporary # vtinfo.h, VirtualTableInfo<T>::RegisterVirtualTable # -Wno-null-conversion # Check shmemory.cpp and cs.cpp here... # -Wno-return-type # switch unreachable code # -Wno-switch # switch values not handled # -W-enum-compare-switch # throws warning on enum1 == enum2 where both # enums represent same value but do not share the type. ie. we use both AsmJsType # and AsmJsRetType interchangably and filter things out by `default:` case. # -W-tautological-constant-compare throws warning for checks known at compile time. # Some of those checks are optimized out during compile / lto time, and others # are platform / compiler dependent. # -Wno-unknown-warning-option ... well, some of the new switches are not # recognized by older compilers and they fail. So, put this one and not fail ``` Does anybody remember what was motivation for adding those, aside from the ones that have a note below?
Warning switches
https://api.github.com/repos/chakra-core/ChakraCore/issues/6435/comments
1
2020-04-22T03:30:16Z
2020-05-15T16:51:02Z
https://github.com/chakra-core/ChakraCore/issues/6435
604,426,252
6,435
[ "chakra-core", "ChakraCore" ]
Need to catch up with the state of `simd128` WebAssembly proposal, though it might make sense to wait until after the opcode renumbering - WebAssembly/simd#209. There is a number of new operations, in particular `swizzle` had been reintroduced, but with variable mask; general case would be expensive to implement without `phufb` support, but we have part of 4-lane variety still in the sources (albeit with a constant mask).
simd128 opcode update and new instructions
https://api.github.com/repos/chakra-core/ChakraCore/issues/6434/comments
1
2020-04-22T03:07:35Z
2020-04-22T03:10:33Z
https://github.com/chakra-core/ChakraCore/issues/6434
604,418,567
6,434
[ "chakra-core", "ChakraCore" ]
There is some ICU detection as part of PAL (it checks for `uchar.h`), but ChakraCore main CMake file does not really look for the library, unless `ICU_INCLUDE_PATH` is set. For 'system ICU` case Linux distros get hardcoded library names, and OSX does not get anything set. We might need to think what the interaction between EMBED_ICU, SYSTEM_ICU, and ICU_INCLUDE_PATH should be.
Detect ICU from CMake
https://api.github.com/repos/chakra-core/ChakraCore/issues/6433/comments
0
2020-04-22T00:51:03Z
2020-04-22T00:53:07Z
https://github.com/chakra-core/ChakraCore/issues/6433
604,374,128
6,433
[ "chakra-core", "ChakraCore" ]
There are currently a few problems with using test262 efficiently on chakracore: 1. ch does not support monotonicNow (see issue #5271) 2. I'm unsure if the createRealm method works properly - some tests relating to it fail - though it could be that that's exposing underlying CC issues. 3. Some spec violations may happen for different reasons in jitted code vs interpreted code, currently running test262 99% of the time it's all going to be in the interpreter. 4. test262Harness seems the easiest way to run the thing https://github.com/bterlson/test262-harness with a couple of provisos: i. I've had to hack in support for running code as a module (it doesn't support this with CC - because it uses a flag that's only in master) ii. controlling what tests you run is awkward to do manually - almost feels like it could do with a separate script to manage it, I have an alternative js start file for it offline which allows you to specify the inputs as a JS object instead of command line args; not sure if there's a better way of doing this. iii. managing the output is also awkward, I've got an alternate reporter file that compares results before and after a change to CC by saving a baseline but it all feels a bit hacky iv. I note that to solve issue 3 above may take some more fundamental edits/may not be feasible in the framework of test262Harness Solving points 1 and 2 involve working on CC, for the other points I think we could probably do with a CC specific test262 runner script of some kind that can be stored in the tools directory - perhaps written in python (per #6411), something that can: 1. fetch the latest test262 2. Optionally Serialise the harness code within test262 as bytecode for fast injection 3. prepare all the tests 4. run them - including capturing and using dynamic profile info for a re-run so that they can get run with the fulljit 5. Store the output AND enable comparison between different versions of the output.
Efficient use of test262
https://api.github.com/repos/chakra-core/ChakraCore/issues/6432/comments
1
2020-04-21T08:34:00Z
2020-12-14T18:38:56Z
https://github.com/chakra-core/ChakraCore/issues/6432
603,813,620
6,432
[ "chakra-core", "ChakraCore" ]
Contents of `test/benchmarks` ``` ARES-6 jetstream Kraken Octane Octane_Closure SunSpider ``` Should we add or update anything? One thing I can think from the top of my head, is that Jetstream has a new version (which also includes Wasm). @chicoxyzzy and @zenparsing what do you think about this from set standards point of veiw? @RTSMikeM, since you brought up an interesting use for the engine, do you have any input into how you would see evaluating its performance?
Benchmarks
https://api.github.com/repos/chakra-core/ChakraCore/issues/6431/comments
1
2020-04-21T02:55:30Z
2020-05-15T16:19:43Z
https://github.com/chakra-core/ChakraCore/issues/6431
603,666,940
6,431
[ "chakra-core", "ChakraCore" ]
The version returned by https://aka.ms/chakracore/version is `1_11_18`, but requesting the build itself (https://aka.ms/chakracore/cc_osx_x64_1_11_18) returns a 403 error
https://aka.ms/chakracore/cc_osx_x64_1_11_18 returning "AuthenticationFailed"
https://api.github.com/repos/chakra-core/ChakraCore/issues/6428/comments
2
2020-04-20T14:42:30Z
2020-04-21T01:49:16Z
https://github.com/chakra-core/ChakraCore/issues/6428
603,292,287
6,428
[ "chakra-core", "ChakraCore" ]
https://aka.ms/chakracore/cc_osx_x64_1_11_18
ChakraCore builds returning 403 errors for "1_11_18
https://api.github.com/repos/chakra-core/ChakraCore/issues/6427/comments
2
2020-04-20T14:39:30Z
2020-04-21T01:50:38Z
https://github.com/chakra-core/ChakraCore/issues/6427
603,290,134
6,427
[ "chakra-core", "ChakraCore" ]
Current *nix builds allow for embedding of ICU library into the build via `--embed-icu` switch. What this does - it invokes an additional script from the build script, followed by `configure` and `make`: https://github.com/microsoft/ChakraCore/blob/master/build.sh#L411 https://github.com/microsoft/ChakraCore/blob/master/tools/icu/configure.py CMake can take care of that via `ExternalProject` module, which would eliminate ICU download script and greatly reduce the corresponding section of the build script.
Embed ICU from CMake
https://api.github.com/repos/chakra-core/ChakraCore/issues/6424/comments
6
2020-04-17T01:42:40Z
2020-05-07T05:36:08Z
https://github.com/chakra-core/ChakraCore/issues/6424
601,642,563
6,424
[ "chakra-core", "ChakraCore" ]
I've noticed that `runtests.py` does not support testing release binary. If I try to force it run (with "test" or "debug" flag), all the tests seem to fail. Does anybody remember why?
Running tests on release build
https://api.github.com/repos/chakra-core/ChakraCore/issues/6422/comments
11
2020-04-15T02:40:43Z
2020-05-17T05:23:05Z
https://github.com/chakra-core/ChakraCore/issues/6422
599,977,481
6,422
[ "chakra-core", "ChakraCore" ]
Build type `Test` in CMakeLists.txt corresponds to default CMake build type `RelWithDebInfo` (release with debug on). There is also a section that sets up `-O0` for `Debug`, `-O3` for release and so on, which should not be necessary. `Test` build type is tied to `--test` flag in the script, but `RelWithDebInfo` can work just as fine.
RelWithDebInfo build type
https://api.github.com/repos/chakra-core/ChakraCore/issues/6419/comments
0
2020-04-14T07:41:28Z
2020-04-22T02:17:14Z
https://github.com/chakra-core/ChakraCore/issues/6419
599,363,568
6,419
[ "chakra-core", "ChakraCore" ]
On platforms on which ChacoreCore builds via CMake allow the canonical CMake workflow. In the most basic case it would be something like this (`ninja` generator should be enabled as well): ``` $ cd build $ cmake /path/to/ChakraCore/ $ make ``` - [x] (Basic workflow) Extra credit: - [x] testing support - [x] expose more configuration options to the command line `cmake` invocation - [x] ICU embedding - [ ] Windows support Windows support may be too ambitious of a goal at the moment, but projects using CMake (which we expect might embed ChakraCore) often build on Windows as well, and we should not completely rule that out.
Default CMake builds
https://api.github.com/repos/chakra-core/ChakraCore/issues/6417/comments
0
2020-04-14T02:53:47Z
2020-05-13T16:49:09Z
https://github.com/chakra-core/ChakraCore/issues/6417
599,259,150
6,417
[ "chakra-core", "ChakraCore" ]
The CC external API also called JSRT could do with a review prior to the next release. Roughly speaking it contains: 1. "Windows only APIs": These are historic chakra.dll APIs that pre-date the cross platform nature of chakracore; they can actually be used on linux or macOS with some caution - notably they use strings that are rows of 16bit characters - normal on windows but not normal on other platforms. 1. Settled Chakracore APIs: Methods included in version 1.11 and in most cases several previous versions - many of these are marked as "experimental" in documentation but in practise have been stable for some years and should probably be labelled as such. 1. Master only APIs: Various APIs have been added in master, some of these are documented, some aren't - in particular several were added in #5923 that seem to follow a very different design philosophy to all the previous APIs. We should review these and consider removal or documentation on a case by case basis prior to a stable release. Overall I think we should aim at maintaining an API with a clear design philosophy that works in a consistent way AND supports stability and is relatively easy to maintain - part of this is keeping it lean hence my aversion to some of the additions from #5923.
Review Hosting API
https://api.github.com/repos/chakra-core/ChakraCore/issues/6416/comments
8
2020-04-13T09:16:03Z
2020-05-11T09:27:53Z
https://github.com/chakra-core/ChakraCore/issues/6416
598,776,785
6,416
[ "chakra-core", "ChakraCore" ]
ChakraCore contains numerous feature switches that in practise are never used - e.g. there's a switch to disable promises and one to disable proxies etc. Some of these bloat the codebase AND require runtime checks for whether they're enabled or not. EDIT: we should also consider removing phase/option switches that are never used see #4311 for one example (though in that case it's an always on switch) We should investigate removing some/several of the older ones that are unlikely to ever be switched off and all associated checks. Note, see lib/Commmon/ConfigFlagsList.h for all switches as the place to start looking. edit: The PR ref'd below makes a start at this but there's more to do.
Review feature switches/Remove old always on switches
https://api.github.com/repos/chakra-core/ChakraCore/issues/6415/comments
1
2020-04-11T19:25:26Z
2020-12-05T17:10:43Z
https://github.com/chakra-core/ChakraCore/issues/6415
598,334,374
6,415
[ "chakra-core", "ChakraCore" ]
As part of improving the experience for contributors we should produce helpful documentation covering the logic of ChakraCore's internals. Including what the key data types are in each area and what key logical processes are used internally: It would be good if multiple people could contribute to this, we'll need to think about exactly how it should all hang together but here's a rough list of the things we should document: - [ ] Process overview from script file -> execution with notes on where different aspects of the codebase are involved - [ ] Parser - [ ] Bytecode emitter - [ ] Type system - [ ] Interpretor - [ ] JS Library - [ ] JsBuiltins - [ ] INTL - [ ] GarbageCollector/Recycler - [ ] Jit - [ ] Internal Data Structures - [ ] RegEx parsing and matching
Documenting ChakraCore's internals
https://api.github.com/repos/chakra-core/ChakraCore/issues/6414/comments
1
2020-04-11T19:14:36Z
2020-04-25T18:26:43Z
https://github.com/chakra-core/ChakraCore/issues/6414
598,332,405
6,414
[ "chakra-core", "ChakraCore" ]
Looks like there are a few scripting languages used for various tasks: ``` $ find ChakraCore -name \*.bat -o -name \*.cmd -o -name \*.ps1 -o -name \*.py -o -name \*.pl -o -name \*.sh | grep -o "\(cmd\|ps1\|py\|pl\|sh\|bat\)" | sort | uniq -c 1 bat 26 cmd 3 pl 14 ps1 13 py 15 sh ``` One issue is that a number of those only run on Windows. Also there is probably no good reason to depend on Perl _and_ Python, and given that there are only three Perl scripts it probably makes sense to drop Perl altogether. It also makes sense to pythonise the scripts described in #6410 (same scripts as in #3330).
Scripts (and scripting languages)
https://api.github.com/repos/chakra-core/ChakraCore/issues/6411/comments
13
2020-04-11T02:57:44Z
2021-01-28T05:08:48Z
https://github.com/chakra-core/ChakraCore/issues/6411
598,175,183
6,411
[ "chakra-core", "ChakraCore" ]
The JsBuiltIn system makes cross-platform development difficult, since: - The scripts to regenerate the bytecode are written for the windows command shell. - x86 isn't even supported on Mac, etc. Also, dealing with bytecode regeneration is a constant source of conflicts and annoyance. So a couple of questions for the OG Chakra devs: 1. What advantage does the JsBulitIn system give (as opposed to just keeping it in C++)? 1. Why is there different byte code for x86/x64/jit/no-jit? @pleath @boingoing @jackhorton
Questions about JsBulitIn
https://api.github.com/repos/chakra-core/ChakraCore/issues/6410/comments
26
2020-04-11T02:46:56Z
2020-04-20T17:54:15Z
https://github.com/chakra-core/ChakraCore/issues/6410
598,173,589
6,410
[ "chakra-core", "ChakraCore" ]
I [already wrote](https://github.com/microsoft/ChakraCore/pull/6403#issuecomment-608331434) that when switching from version 1.11.17 to version 1.12.0, in my project some tests stopped passing: ``` Expected: ···riable2 - variable3; Actual: ···riable2 - variable3;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0··· ``` If you run the following JS code: ```js var $variable1 = 611; var _variable2 = 711; var variable3 = 678; $variable1 + -variable2 - variable3; ``` Then an error will occur and this is normal behavior. The main problem that caused by switching to new version of the ChakraCore library is the following: number of characters in value from the `source` property of error meta data has increased significantly. In this case, number of characters increased from 36 to 106. To reproduce this error, I wrote a C++ console application: ```cpp #define _JSRT_ #include "ChakraCore.h" #include <string> #include <iostream> using namespace std; int main() { JsRuntimeHandle runtime; JsContextRef context; JsValueRef result; unsigned currentSourceContext = 0; int returnedValue; const char* script = "var $variable1 = 611;\r\n" "var _variable2 = 711;\r\n" "var variable3 = 678;\r\n" "\r\n" "$variable1 + -variable2 - variable3;" ; // Create a runtime JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime); // Create an execution context JsCreateContext(runtime, &context); // Now set the execution context as being the current one on this thread. JsSetCurrentContext(context); const char* fileName = "variables.js"; JsValueRef sourceUrl; JsCreateString(fileName, strlen(fileName), &sourceUrl); JsValueRef scriptSource; JsCreateString(script, strlen(script), &scriptSource); // Run the script JsErrorCode errCode = JsRun(scriptSource, currentSourceContext++, sourceUrl, JsParseScriptAttributeNone, &result); if (errCode == JsNoError) { JsValueRef resultJSString; JsConvertValueToString(result, &resultJSString); char* resultSTR = nullptr; size_t stringLength; JsCopyString(resultJSString, nullptr, 0, &stringLength); resultSTR = (char*)malloc(stringLength + 1); JsCopyString(resultJSString, resultSTR, stringLength + 1, nullptr); resultSTR[stringLength] = 0; printf("Result -> %s \n", resultSTR); free(resultSTR); returnedValue = 0; } else { printf("Error %d\n", errCode); if (errCode == JsErrorScriptException) { JsValueRef errMetadata; JsGetAndClearExceptionWithMetadata(&errMetadata); const char* sourcePropertyName = "source"; JsPropertyIdRef sourcePropertyId; JsCreatePropertyId(sourcePropertyName, strlen(sourcePropertyName), &sourcePropertyId); bool hasProperty; JsHasProperty(errMetadata, sourcePropertyId, &hasProperty); if (hasProperty) { JsValueRef sourceLine; JsGetProperty(errMetadata, sourcePropertyId, &sourceLine); char* sourceLineSTR = nullptr; size_t stringLength; JsCopyString(sourceLine, nullptr, 0, &stringLength); sourceLineSTR = (char*)malloc(stringLength + 1); JsCopyString(sourceLine, sourceLineSTR, stringLength + 1, nullptr); sourceLineSTR[stringLength] = 0; printf("Source line -> %zd characters in \"%s\" \n", stringLength, sourceLineSTR); free(sourceLineSTR); } } returnedValue = 1; } system("pause"); // Dispose runtime JsSetCurrentContext(JS_INVALID_REFERENCE); JsDisposeRuntime(runtime); return returnedValue; } ``` You can download the [64-bit version of this demo project](https://www.dropbox.com/s/a2ru40cxluq7akg/TestErrorSourceInChakraCore-win-x64.zip?dl=1) from the Dropbox.
Different length of the error source in 1.11 and 1.12 versions
https://api.github.com/repos/chakra-core/ChakraCore/issues/6408/comments
4
2020-04-10T14:21:17Z
2020-04-11T16:49:31Z
https://github.com/chakra-core/ChakraCore/issues/6408
597,913,724
6,408
[ "chakra-core", "ChakraCore" ]
This is an idea I thought of whilst looking at #6341 Throughout the internal JS library in ChakraCore a method `GetAndAssertIsConstructorSuperCall` is used within all constructors to see if they are being called as supers or potentially have a newTarget set. All of these checks: a) have a small but pervasive performance impact AND b) make some of the code rather messy (there have been various bugs relating to mishandling this in the past) In all cases the caller of the constructor ought to be able to establish this and provide it - therefore these calls could be eliminated AND additionally to prevent the branching that's currently done all of these constructors could be converted into template bool functions. This would be a reasonably large refactor (and may involve refactoring lowering of constructor calls in the JIT - not sure on that, would need to check) but it would be a good opportunity for someone to get a look at a large portion of the codebase and it should be beneficial in the long run, any takers?
Suggestion: extract IsConstructorSuperCall into callers and use templates
https://api.github.com/repos/chakra-core/ChakraCore/issues/6407/comments
0
2020-04-09T09:52:25Z
2020-04-09T10:21:01Z
https://github.com/chakra-core/ChakraCore/issues/6407
597,162,858
6,407
[ "chakra-core", "ChakraCore" ]
This is mostly to get some clarity on when/if we should move community driven development to a different Github organization, as outlined in #6399. We have created https://github.com/chakra-core with the members of the community team invited. Creating a separate repo should involve moving or copying the issues from this one. @rhuanjl, @fly-style, @zenparsing, @chicoxyzzy, and @divmain
Decide on the home for the repo
https://api.github.com/repos/chakra-core/ChakraCore/issues/6406/comments
6
2020-04-07T06:13:18Z
2020-04-14T02:39:48Z
https://github.com/chakra-core/ChakraCore/issues/6406
595,618,295
6,406
[ "chakra-core", "ChakraCore" ]
**EDIT:** ideal goal is to remove all dependence on PAL, but this will be a large project 1. PAL was added to ChakraCore in ~2016 to make it build on Linux and MacOS. 2. Since then it has been updated a little - occasionally new content from dotnet has been brought over but not in a full or systematic way. 3. Additionally various parts of PAL have been edited for ChakraCore either in some cases by just removing bits that weren't really needed to slim the build down (e.g. most of SEH was taken out to remove the libunwind dependency, and the stop the synchmanager from starting a thread as it wasn't being used) or other cases by tweaking/enhancing. 4. The result of 1, 2 and 3 is a very different version of PAL; which is fine as long as chakracore is using it on its own BUT if you're using something else that interacts with it; e.g. if you're using dotnet, then there are problems. #6403 fixes a known presenting issue - but it is a bit of a hack fix and its unclear if it could introduce an alternate problem. It may be worth attempting to update the whole of PAL to the latest from dotnet and then re-applying some of the historic chakracore changes - this could be a reasonably large piece of work, but could present future problems.
PAL compatibility issues
https://api.github.com/repos/chakra-core/ChakraCore/issues/6404/comments
10
2020-04-03T08:01:50Z
2024-04-25T05:05:21Z
https://github.com/chakra-core/ChakraCore/issues/6404
593,195,612
6,404
[ "chakra-core", "ChakraCore" ]
Review how error locations are displayed. Spec discussion: https://github.com/WebAssembly/design/pull/1053
Standard wasm Error location
https://api.github.com/repos/chakra-core/ChakraCore/issues/6402/comments
0
2020-04-02T02:56:28Z
2020-04-02T02:56:28Z
https://github.com/chakra-core/ChakraCore/issues/6402
592,322,702
6,402
[ "chakra-core", "ChakraCore" ]
Should we add Gitter or Discord (or both)? I recall @Fly-Style has some experience with it.
Instant communication
https://api.github.com/repos/chakra-core/ChakraCore/issues/6401/comments
6
2020-04-01T07:30:04Z
2020-04-11T13:32:06Z
https://github.com/chakra-core/ChakraCore/issues/6401
591,690,597
6,401
[ "chakra-core", "ChakraCore" ]
I'm trying to understand the capability of ChakraCore in regards to multi-threaded environment with multiple run times and multiple contexts. We are currently using an older version of Spidermonkey which gives us full control of global objects and can have multiple threads access objects at the same time. I know this is not possible with ChakraCore. However, I need to understand how & why the global object seems to be tied directly to context. It seems to only way to access the global is to call JsGetGlobalObject(). i.e. There is no JsSetGlobalObject() to allow you to set your own. One of my use cases is a javascript enabled web server. There is a pool of runtimes and a pool of contexts and a map containing pre-compiled scripts that we use on the contexts for execution speed. We also need to maintain session state and keep a "Session Global" around between trips to the web server so that all objects and properties exist on the next trip back to the web server. Assuming i need a context for each session with the web server (since the global is tied to this) how many can I have in my pool at a time? Is a 1000 too many? How lightweight are contexts? What are the recommendations here regarding context and runtime pools? I was thinking of starting with 5 runtimes. Where are the standard classes stored? Is this on the global? or someplace else? We want the standard classes to already exist on the global on the next trip back to the web server to make it as fast as possible. Is it possible to have a resolver hook so we can lazy load objects into global as needed? If a session is invalidated we would like to be able to clear the global object while preserving standard classes. Similar to JS_ClearScope() in Spidermonkey. Lastly, we need need to be able to suspend running a script (similar to JS_SuspendRequest in spidermoney) which we run another backround script on a different context in the same thread and wait for the return before resuming execution of the mainline script. Spidermonkey has been great, but it has no future for advanced use cases. Thanks! Mike
Question - globals, contexts & threading
https://api.github.com/repos/chakra-core/ChakraCore/issues/6400/comments
5
2020-03-31T23:49:01Z
2020-04-02T18:34:31Z
https://github.com/chakra-core/ChakraCore/issues/6400
591,515,141
6,400
[ "chakra-core", "ChakraCore" ]
###### Test Case ``` print(/\udc00/u.test('\udc00\uDC2A')); print(/\ud800/u.test('\ud800\uDC2A')); ``` ###### Excepted Output true false ###### Chakra Output true true ###### Other JS Engines Output true false ###### Description Is this a bug in chakra? Or is it just that chakr is coded differently from other engines? Looking forward your reply, thx.
A issue about Regex with flag 'u'.
https://api.github.com/repos/chakra-core/ChakraCore/issues/6398/comments
2
2020-03-31T04:44:54Z
2020-03-31T10:50:53Z
https://github.com/chakra-core/ChakraCore/issues/6398
590,788,685
6,398
[ "chakra-core", "ChakraCore" ]
@Cellule - I've added #6396 and put it up as "bug" [WebAssemply project](https://github.com/microsoft/ChakraCore/projects/1), though it does not necessary a bug (at least from correctness point of view). I am not sure what to do with priority here - what were your thoughts on P1, P2, P3 buckets?
Rearranging WebAssembly project
https://api.github.com/repos/chakra-core/ChakraCore/issues/6397/comments
2
2020-03-31T03:45:13Z
2020-04-01T07:33:10Z
https://github.com/chakra-core/ChakraCore/issues/6397
590,766,684
6,397
[ "chakra-core", "ChakraCore" ]
Current implementation of wasm SIMD shuffle produces a scalar loop over the bytes of the vector. That is the leftover of the situation when there were multiple shuffles with different lane shuffles - byte shuffle was considered lower priority than other kinds. To solve this Chakra would need to emit byteshuffle instructions (`pshufb` on x86).
WASM SIMD - Single instruction shuffle
https://api.github.com/repos/chakra-core/ChakraCore/issues/6396/comments
2
2020-03-31T03:12:19Z
2021-10-30T07:58:42Z
https://github.com/chakra-core/ChakraCore/issues/6396
590,753,446
6,396
[ "chakra-core", "ChakraCore" ]
As discussed in #6384, there is value in improving CMake experience for non-MSVC developers. I think we should provide first-class CMake build flow, in addition to the script. This should improve development experience - by using usual CMake patterns, and consolidating everything build-related "under one roof", by including testing in the build. This should also help with integration with external projects built using CMake and various package management systems.
CMake improvements
https://api.github.com/repos/chakra-core/ChakraCore/issues/6392/comments
4
2020-03-30T08:40:21Z
2020-04-14T02:59:27Z
https://github.com/chakra-core/ChakraCore/issues/6392
590,100,854
6,392
[ "chakra-core", "ChakraCore" ]
ES6 regular expression prototype and symbol features were never fully implemented or enabled - this is the one signficant ES6 gap that Chakracore still has. The two flags: -ES6RegexPrototypeProperties and -ES6RegexSymbols guard much of this incomplete work. These need a thorough review/clean up and then to be enabled, ideally for the next release. This will solve the following issues which I have closed to consolidate here: #6342 #5679 #5629 #5579 #5512 #5510 #5508 #5388 #5187 #6364
RegExp ES6 implementation incomplete
https://api.github.com/repos/chakra-core/ChakraCore/issues/6390/comments
0
2020-03-25T08:52:25Z
2021-02-13T15:11:49Z
https://github.com/chakra-core/ChakraCore/issues/6390
587,539,154
6,390
[ "chakra-core", "ChakraCore" ]
Hello everyone, In December of 2018, [we announced](https://blogs.windows.com/windowsexperience/2018/12/06/microsoft-edge-making-the-web-better-through-more-open-source-collaboration/) our intent to adopt the Chromium Open Source project in the development of Microsoft Edge. At that time, [we made no immediate changes](https://github.com/microsoft/ChakraCore/issues/5865) to the ChakraCore project. Now that the new Microsoft Edge is generally available, we believe the time has come to transition ongoing ownership of ChakraCore to the community. In order to mitigate any disruption, we are committed to providing 12 months of security patches to the most-recent release of ChakraCore (v1.11). This will be true whether or not the community picks up ongoing development. Microsoft will not provide security patches past March 9, 2021. Our hope is that the community will continue supporting ChakraCore after this date. Some of you may have already heard from us directly, as we have begun to explore community ownership. And, while we haven’t yet reached a quorum of partners to make this viable, we are open and supportive for it to happen. If you want to participate, or if you have questions or concerns, we want to hear from you. - Contact us via email at [email protected] - Contact us on Twitter [@ChakraCore](https://twitter.com/ChakraCore) - If you would like to have a one-on-one discussion, please reach out and we’ll set something up. Lastly, we want to thank the ChakraCore and JavaScript communities for supporting us in our successes and in our failures. We’ve learned a lot and we’ve enjoyed working with you all. All the best, The Chakra Team
ChakraCore Transition
https://api.github.com/repos/chakra-core/ChakraCore/issues/6384/comments
30
2020-03-09T18:08:53Z
2020-05-05T20:13:58Z
https://github.com/chakra-core/ChakraCore/issues/6384
578,094,462
6,384
[ "chakra-core", "ChakraCore" ]
When I execute the testcase below, chakra gives a different output which is not the same as other engines (like V8, spiderMonkey,javascriptCore). I wonder if chakra has any special ways to deal with floating numbers. ### version [eaaf7ac](https://github.com/microsoft/ChakraCore/commit/eaaf7ac6beca01ab0d80c05959f3868463043c2d) ### testcase ``` var NISLFuzzingFunc = function(){ print(32.963645576628462); }; NISLFuzzingFunc(); ``` ### output `32.963645576628465` ### expected output `32.963645576628466`
A question about floating number
https://api.github.com/repos/chakra-core/ChakraCore/issues/6383/comments
4
2020-03-09T13:55:50Z
2020-06-12T11:55:53Z
https://github.com/chakra-core/ChakraCore/issues/6383
577,927,352
6,383
[ "chakra-core", "ChakraCore" ]
In the downloaded nuget package packages\Microsoft.ChakraCore.vc140.1.11.10\lib\native\v140 It has arm, x64, and x86 but no arm64 Should the nuget have it? Note: Also just checked latest Microsoft.ChakraCore.vc140.1.11.16 still not there :(
The nuget for ChakraCore.vc140 by Microsoft doesn't include arm64
https://api.github.com/repos/chakra-core/ChakraCore/issues/6382/comments
2
2020-03-03T23:32:01Z
2020-08-21T02:35:47Z
https://github.com/chakra-core/ChakraCore/issues/6382
575,027,414
6,382
[ "chakra-core", "ChakraCore" ]
**Description:** In /std:c++17 mode, this triggers a deprecation warning in recent versions of MSVC. In /std:c++latest mode, now that microsoft/STL#380 has been merged, this will trigger an error in VS 2019 16.6 Preview 2. **Reproduce steps:** 1. git clone -c core.autocrlf=true https://github.com/microsoft/ChakraCore D:\Chakra\src 2. cd /d D:\Chakra\src 3. set _CL_=/D_HAS_AUTO_PTR_ETC=1 /D_SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING /Zc:noexceptTypes- /wd5043 /wd5054 4. msbuild /m /p:Platform=x64 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.17134.0 Build\Chakra.Core.sln /t:Rebuild 2>&1 **ErrorMessage:** F:\gitP\microsoft\ChakraCore\bin\External\catch.hpp(7915): error C2039: 'uncaught_exception': is not a member of 'std' (compiling source file NativeTests.cpp) [F:\gitP\microsoft\ChakraCore\bin\NativeTests\NativeTests.vcxproj]
C++20 removed std::uncaught_exception
https://api.github.com/repos/chakra-core/ChakraCore/issues/6378/comments
1
2020-02-17T07:16:34Z
2020-05-15T11:35:28Z
https://github.com/chakra-core/ChakraCore/issues/6378
566,101,031
6,378
[ "chakra-core", "ChakraCore" ]
#### Description When running the testcase below, a SyntaxError exception should be thrown while chakra does not. According to ES10, the `Expression` in parentheses of `IfStatement` should executed based on [this step](http://www.ecma-international.org/ecma-262/10.0/index.html#sec-comma-operator-runtime-semantics-evaluation). And a Comma-terminated expression obviously is not belong to valid `Expression`. This maybe an issue of Chakra. #### Version [eaaf7ac](https://github.com/microsoft/ChakraCore/commit/eaaf7ac6beca01ab0d80c05959f3868463043c2d) #### Testcase ``` var NISLFuzzingFunc = function(){ var f = 0; if(f === 0,) { print("run_here"); } } NISLFuzzingFunc(); ``` #### Ecpected output ``` SyntaxError: Unexpected token ')' ``` #### Output ``` run_here ```
An issue of the If Statement
https://api.github.com/repos/chakra-core/ChakraCore/issues/6377/comments
13
2020-02-14T13:19:10Z
2021-01-16T00:30:31Z
https://github.com/chakra-core/ChakraCore/issues/6377
565,322,273
6,377
[ "chakra-core", "ChakraCore" ]
The C++20 draft standard incorporates a change to help avoid confusion when inserting inappropriate character types to iostreams. In previous C++ versions, insertion of inappropriate character types into output streams (e.g., `wchar_t`/`char16_t`/`char32_t` into `std::cout`) doesn't result in transcoding of the character, but instead outputs a representation of its integral value. Insertion of pointers to such character types also does not transcode but outputs the value of the pointer. C++20 will add deleted stream insertion operators so that the expression `os << x` will instead be ill-formed when `os` is a `std::ostream` (a narrow character stream) and `x` is a `wchar_t`/`char16_t`/`char32_t` or pointer to such. We're implementing these changes right now in MSVC, and our automated tests show that your product (or its tests) will fail to compile with these changes in `/std:c++latest` mode unless the "escape hatch" macro `_HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20` is defined.
C++20 will break the build
https://api.github.com/repos/chakra-core/ChakraCore/issues/6374/comments
1
2020-02-08T01:55:44Z
2020-02-08T02:38:39Z
https://github.com/chakra-core/ChakraCore/issues/6374
561,952,853
6,374
[ "chakra-core", "ChakraCore" ]
See: https://github.com/tc39/ecma262/issues/1794 Refs: https://github.com/microsoft/ChakraCore/issues/588 ``` $ eshost -ts -e "[EvalError.prototype.hasOwnProperty('toString') ? 'own' : 'inherited', EvalError.prototype.toString === Error.prototype.toString ? 'eq' : 'ne']" ┌────────────────┬──────────────┐ │ ChakraCore │ own,ne │ ├────────────────┼──────────────┤ │ engine262 │ inherited,eq │ │ engine262+ │ │ │ JavaScriptCore │ │ │ QuickJS │ │ │ SpiderMonkey │ │ │ V8 │ │ │ XS │ │ └────────────────┴──────────────┘ ``` It's worth noting this is technically not a violation of the spec (it is valid to extend the spec's objects) but it is inconsistent.
%NativeError%.prototype.toString duplicates Error.prototype.toString
https://api.github.com/repos/chakra-core/ChakraCore/issues/6372/comments
0
2020-01-21T17:09:25Z
2020-04-12T00:34:16Z
https://github.com/chakra-core/ChakraCore/issues/6372
553,012,776
6,372
[ "chakra-core", "ChakraCore" ]
Attempting to evaluate a variable which exists in module scope, for example an `import`ed identifier, while paused at a breakpoint inside a function within that same module, will throw a ReferenceError, as though the identifier isn’t in scope.
Can’t access module-level variables from debugger breakpoint
https://api.github.com/repos/chakra-core/ChakraCore/issues/6369/comments
2
2020-01-10T16:57:35Z
2020-03-25T10:34:51Z
https://github.com/chakra-core/ChakraCore/issues/6369
548,187,266
6,369
[ "chakra-core", "ChakraCore" ]
The bug can be reproduced in ch version 1.11.15.0. Running following code: ``` let temp = eval('42;switch (0) { case 0: break; };'); console.log(temp); ``` Actual results: `42` Expected results: `undefined` According to ecma manual,https://tc39.es/ecma262/#sec-block-runtime-semantics-evaluation, the value of a StatementList is the value of the last value producing item in the StatementList. Switch statement produce value undefined (https://tc39.es/ecma262/#sec-runtime-semantics-caseblockevaluation), so the result should be undefined. ISec Lab 2019.12.26
Wrong completion value when switch is part of a statement list
https://api.github.com/repos/chakra-core/ChakraCore/issues/6368/comments
1
2019-12-26T06:15:19Z
2020-03-25T10:41:30Z
https://github.com/chakra-core/ChakraCore/issues/6368
542,447,183
6,368
[ "chakra-core", "ChakraCore" ]
The bug can reproduce in ch version 1.11.15.0. Running following code: ``` var obj = new Object(); Promise.race(obj); ``` According to ECMA manual, since `obj` is not iterable object, a TypeError should be thrown. However, ch output nothing. ISec Lab 2019.12.25
Fail to throw TypeError in Promise.race
https://api.github.com/repos/chakra-core/ChakraCore/issues/6367/comments
4
2019-12-25T08:50:52Z
2020-03-25T08:34:07Z
https://github.com/chakra-core/ChakraCore/issues/6367
542,295,977
6,367
[ "chakra-core", "ChakraCore" ]
The bug can be reproduced in ch version 1.11.15.0. Executing following code: ``` var i = 0; function func(obj0) { { obj0.c = obj0.a; } } function f() { try { f(); } catch (e) { i++; func(Array(123456789)); // can not delete } } f(); print(i); ``` When I delete `func(Array(123456789)); `, the output of `i` is 1. So, the statements in catch-clause only execute once. But when I keep the `func(Array(123456789));`, the output of `i` is more than 1. Reason of this output: f() is jitted, when stack is full during recursion, jitted code of f() will bailout. In procedure of bailout, `i++` is executed correctly, but `func(Array(123456789));` will throw an exception because of stack is full again. This exception will be caught by upper jitted f() caller, and will trigger bailout again. Repeat previous process, `i++` is executed and `func(Array(123456789));` will throw an exception again unless there is enough stack space for its execution. It results to the statements in catch clause execute different times. `i++` is executed several times but `func(Array(123456789)); ` only executed once. ISec Lab 2019.12.25
Handle statements in CatchClause incorrectly when stack overflow
https://api.github.com/repos/chakra-core/ChakraCore/issues/6366/comments
1
2019-12-25T08:11:34Z
2020-11-03T13:31:50Z
https://github.com/chakra-core/ChakraCore/issues/6366
542,288,419
6,366
[ "chakra-core", "ChakraCore" ]
The bug can be reproduced in ch version 1.11.15.0. code: ``` class c extends(d = function() { return 0; }, d) {}; ``` ChakraCore print nothing, however, it should throw an error. According to ecma-262 • All parts of a ClassDeclaration or a ClassExpression are strict mode code. • In strict mode code, assignment to an undeclared identifier or otherwise unresolvable reference does not create a property in the global object. When a simple assignment occurs within strict mode code, its LeftHandSideExpression must not evaluate to an unresolvable Reference. If it does, a ReferenceError exception is thrown. So, assignment to ‘d’, which is undeclared, should throw a ReferenceError exception. ISec Lab 2019.12.24
Not using strict mode within ClassDeclaration statement
https://api.github.com/repos/chakra-core/ChakraCore/issues/6365/comments
1
2019-12-24T09:12:53Z
2020-03-25T16:57:06Z
https://github.com/chakra-core/ChakraCore/issues/6365
542,056,475
6,365
[ "chakra-core", "ChakraCore" ]
The bug can reproduce in ch version 1.11.15.0. Running following code: ``` let arg_0 = /^([^(]+?)=>/; let handler_0 = { get: function(oTarget, sKey) { return Reflect.get(oTarget, sKey); }, }; let p_0 = new Proxy(arg_0, handler_0); sym = Symbol.prototype.constructor(p_0); print("BT_FLAG"); let identifier_array = { "console": (typeof(console) === 'undefined' ? 'undefined' : console) }; print(JSON.stringify(identifier_array)); ``` Expected result: execute without error thrown ch's result: TypeError: RegExp.prototype.toString: 'this' is not a RegExp object According to ecma manual, IsCallable of OrdinaryToPrimitive() will check whether type of p_0 is object. It seems that ch fail to check the type. ISec Lab 2019.12.24
ChakraCore throw an TypeError Incorrectly
https://api.github.com/repos/chakra-core/ChakraCore/issues/6364/comments
1
2019-12-24T05:19:10Z
2020-03-25T10:36:50Z
https://github.com/chakra-core/ChakraCore/issues/6364
541,994,681
6,364
[ "chakra-core", "ChakraCore" ]
I run the following code in Characore-1.11.15 and get a very odd output. I do not know why the output is so strange. The two print should be same output, both 0. However, the first is -5 in ch. I think there must be something wrong in ch's realization. The code: ``` var tmp = new Date() - new((2, function() { return Date })()); print(tmp); var tmp1 = new Date() - new(Date); print(tmp1); print("BT_FLAG"); ``` Output ``` -5 0 BT_FLAG ``` The result should be: ``` 0 0 BT_FLAG ``` ISec Lab 2019.12.21
Wrong realization of 'minus operation' [maybe] of Date object
https://api.github.com/repos/chakra-core/ChakraCore/issues/6363/comments
1
2019-12-22T05:44:59Z
2020-03-30T13:40:07Z
https://github.com/chakra-core/ChakraCore/issues/6363
541,411,412
6,363
[ "chakra-core", "ChakraCore" ]
I run the following code in Characore-1.11.15 and get an odd output. The code firstly call the function ‘foo’, at this time, it print “false”. But then, when calling the ‘foo’ again in the ‘sort’, it print “true”. So I think a bug maybe exists in the implementation of ‘Array.prototype.sort’. This bug may affect the sort result. The code: ``` var array = [21, 45, -12, 37, 0]; function foo() { print(array<1048576); } foo(); arr2 = Array.prototype.sort.call(array, foo); ``` The output: ``` false true true true true ``` ISec Lab 2019.12.21
A bug of ‘Array.prototype.sort'
https://api.github.com/repos/chakra-core/ChakraCore/issues/6362/comments
1
2019-12-22T04:57:35Z
2020-03-25T08:40:10Z
https://github.com/chakra-core/ChakraCore/issues/6362
541,407,864
6,362
[ "chakra-core", "ChakraCore" ]
I run following code in ch 1.11.15, the result of ChakraCore is different from other js engines. Though in specification, “string-concatenation” is not defined clearly, other engines’ output is same. Code: ``` let arg_0 = ['Fire', '', 'Wind', 'Rain']; arr2 = arg_0.toLocaleString(); print(JSON.stringify(arr2)) ``` output of ch: "Fire, , Wind, Rain" output of other engines: "Fire,,Wind,Rain" ISec Lab 2019.12.21
Array.prototype.toLocaleString uses comma space separator instead of just comma
https://api.github.com/repos/chakra-core/ChakraCore/issues/6361/comments
7
2019-12-22T04:57:11Z
2020-10-27T02:22:04Z
https://github.com/chakra-core/ChakraCore/issues/6361
541,407,830
6,361
[ "chakra-core", "ChakraCore" ]
ubuntu 18.04.3 chakra (fd545b4) test.js ```javascript let arr1 = []; function f1() { try { f1(); } catch (v1) { for (let i = 0; i < 0x15555; i = i + 5) { arr1[i] = 13.37; } let typearr1 = new Uint8Array(arr1); typearr1.sort(); } } f1(); ```
Segmentation fault `sort recursion`
https://api.github.com/repos/chakra-core/ChakraCore/issues/6356/comments
1
2019-12-17T07:45:35Z
2019-12-18T01:36:46Z
https://github.com/chakra-core/ChakraCore/issues/6356
538,894,959
6,356
[ "chakra-core", "ChakraCore" ]
When objects are deleted? I guessed it's similar to COM. So I guessed every created object has 1 reference and It will not be deleted And I released every created object at the end. But It's crashed sometimes. So I tried to check the reference count, and the created object had 0 references. I'm confused. If created objects have 0 references when they are deleted? Can I keep zero referenced objects across JsRunScript? If I want to keep undefined value, Am I need to JsAddRef after JsGetUndefinedValue?
Question about reference count, when it's deleted?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6354/comments
4
2019-12-13T08:21:46Z
2019-12-13T16:24:18Z
https://github.com/chakra-core/ChakraCore/issues/6354
537,410,640
6,354
[ "chakra-core", "ChakraCore" ]
Hi...I am using 1.11.12 version of chakracore (on Mac). Initially I've created release version of dylib, but it is crashing occasionally **(even with 1.11.15 version)**. (Also tried with release builds provided under 1.11.12 version of ChakraCore). The crash report is as follows: int JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::Insert<(JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::InsertOperations)0>(unsigned long const&, SourceContextInfo* const&) (@int JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::Insert<(JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::InsertOperations)0>(unsigned long const&, SourceContextInfo* const&):90) Js::ScriptContext::CreateSourceContextInfo(unsigned long, char16_t const*, unsigned long, Js::SimpleDataCacheWrapper*, char16_t const*, unsigned long) (@Js::ScriptContext::CreateSourceContextInfo(unsigned long, char16_t const*, unsigned long, Js::SimpleDataCacheWrapper*, char16_t const*, unsigned long):195) RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**) (@RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**):63) JsRun (@JsRun:99) JavascriptCore::jsLoop() (JavascriptCore.cpp:166) decltype(*(std::__1::forward<JavascriptCore*>(fp0)).*fp()) std::__1::__invoke<void (JavascriptCore::*)(), JavascriptCore*, void>(void (JavascriptCore::*&&)(), JavascriptCore*&&) (/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4369) void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (JavascriptCore::*)(), JavascriptCore*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (JavascriptCore::*)(), JavascriptCore*>&, std::__1::__tuple_indices<2ul>) (/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:342) void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (JavascriptCore::*)(), JavascriptCore*> >(void*) (/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:352) _pthread_start (@_pthread_start:36) This crash doesn't happen with Test build type. To fix the crash for release build type, I am trying to create release build with debug info? I tried to generate it using set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g"). To the extent I understood, but it seems to be available with static builds only. Please correct me if I am wrong here. Could anyone please suggest how to fix this error or please provide a way to get symbol file (for release version) to fix it.
generate release build symbol files on Mac
https://api.github.com/repos/chakra-core/ChakraCore/issues/6353/comments
2
2019-12-12T13:51:22Z
2020-03-25T10:32:01Z
https://github.com/chakra-core/ChakraCore/issues/6353
536,990,709
6,353
[ "chakra-core", "ChakraCore" ]
Segmentation fault in libc.so.6 ispunct at ctype.c. ubuntu 18.04.3 chakra (fd545b428de1a62e3de11962f76699a117bfc4df) test.js ```javascript eval(String.fromCodePoint(654321)) ``` DebugInfo ``` * thread #1, name = 'ch', stop reason = signal SIGSEGV: address access protected (fault address: 0x7ffff72e94a2) frame #0: 0x00007ffff703b58e libc.so.6`ispunct(c=654321) at ctype.c:33 (lldb) bt * thread #1, name = 'ch', stop reason = signal SIGSEGV: address access protected (fault address: 0x7ffff72e94a2) * frame #0: 0x00007ffff703b58e libc.so.6`ispunct(c=654321) at ctype.c:33 frame #1: 0x000055555676474a ch`PlatformAgnostic::UnicodeText::GetGeneralCategoryClass(ch=654321) at UnicodeText.cpp:163 frame #2: 0x000055555676acb8 ch`Js::CharClassifier::GetBigCharTypeES6(ch=654321, instance=0x00007ffff7f89030) at CharClassifier.cpp:259 frame #3: 0x000055555676ba69 ch`Js::CharClassifier::GetCharType(this=0x00007ffff7f89030, ch=654321) const at CharClassifier.cpp:658 frame #4: 0x000055555687359b ch`Scanner<UTF8EncodingPolicyBase<false> >::ScanCore(this=0x00007fffffff8408, identifyKwds=true) at Scan.cpp:1674 frame #5: 0x000055555687310a ch`Scanner<UTF8EncodingPolicyBase<false> >::Scan(this=0x00007fffffff8408) at Scan.cpp:1567 frame #6: 0x00005555567777a9 ch`Parser::Parse(this=0x00007fffffff8308, pszSrc="������", offset=0, length=6, charOffset=0, isUtf8=false, grfscr=7218, lineNumber=0, nextFunctionId=0x00007ffff7f43084, pse=0x00007fffffff8ee0) at Parse.cpp:11889 frame #7: 0x0000555556777010 ch`Parser::ParseSourceInternal(this=0x00007fffffff8308, parseTree=0x00007fffffff82f8, pszSrc="������", offsetInBytes=0, encodedCharCount=6, offsetInChars=0, isUtf8=false, grfscr=7218, pse=0x00007fffffff8ee0, nextFunctionId=0x00007ffff7f43084, lineNumber=0, sourceContextInfo=0x00007ffff7f43080) at Parse.cpp:510 frame #8: 0x000055555678b977 ch`Parser::ParseCesu8Source(this=0x00007fffffff8308, parseTree=0x00007fffffff82f8, pSrc="������", length=6, grfsrc=7218, pse=0x00007fffffff8ee0, nextFunctionId=0x00007ffff7f43084, sourceContextInfo=0x00007ffff7f43080) at Parse.cpp:12317 frame #9: 0x000055555623c045 ch`Js::GlobalObject::DefaultEvalHelper(scriptContext=0x0000555558280518, source=u"򟯱", sourceLength=2, moduleID=0, grfscr=7218, pszTitle=u"eval code", registerDocument=YES, isIndirect=NO, strictMode=NO) at GlobalObject.cpp:875 frame #10: 0x000055555623d8a6 ch`Js::GlobalObject::VEval(library=0x00007ffff7f58000, environment=0x00005555579167f0, moduleID=0, strictMode=false, isIndirect=false, args=0x00007fffffff91f8, isLibraryCode=false, registerDocument=true, additionalGrfscr=0, debugEvalScriptContext=0x0000000000000000) at GlobalObject.cpp:609 frame #11: 0x000055555623d41f ch`Js::GlobalObject::EntryEvalHelper(scriptContext=0x0000555558280518, function=0x00007ffff7f262c0, args=0x00007fffffff91f8) at GlobalObject.cpp:519 frame #12: 0x000055555623e158 ch`Js::GlobalObject::EntryEval(function=0x00007ffff7f262c0, callInfo=(Count = 2, Flags = 24, unused = 0)) at GlobalObject.cpp:549 frame #13: 0x00005555565f538e ch`amd64_CallFunction at JavascriptFunctionA.S:100 ```
Segmentation fault in libc.so.6 ispunct at ctype.c
https://api.github.com/repos/chakra-core/ChakraCore/issues/6352/comments
0
2019-12-12T10:06:13Z
2019-12-12T10:06:13Z
https://github.com/chakra-core/ChakraCore/issues/6352
536,876,463
6,352
[ "chakra-core", "ChakraCore" ]
When running the testcase below, a SyntaxError exception should be thrown while chakra does not. According to ECMAScript Language Specification( from ES 5.1 to [ES 10](http://www.ecma-international.org/ecma-262/10.0/index.html#sec-for-statement) ), `for statement` should have a body with a type of `Statement`. This maybe an issue of Chakra. #### version [eaaf7ac](https://github.com/microsoft/ChakraCore/commit/eaaf7ac6beca01ab0d80c05959f3868463043c2d) #### testcase ``` var NISLFuzzingFunc = function(){ eval("for(;false;)"); print("RunHere"); }; NISLFuzzingFunc(); ``` #### output `RunHere` #### expected output ` SyntaxError: Unexpected end of script`
An issue about for statement without body
https://api.github.com/repos/chakra-core/ChakraCore/issues/6351/comments
13
2019-12-09T12:00:56Z
2022-10-15T11:21:53Z
https://github.com/chakra-core/ChakraCore/issues/6351
534,883,891
6,351
[ "chakra-core", "ChakraCore" ]
Optional chaining (https://github.com/tc39/proposal-optional-chaining) is now stage 4 and should be implemented; hopefully not too hard, roughly speaking: ```js a?.someExpression; //is sugar for a ? a.someExpression : undefined; ``` I may try and do this in the next couple of weeks if no one else is.
Implement optional chaining
https://api.github.com/repos/chakra-core/ChakraCore/issues/6349/comments
3
2019-12-05T17:24:36Z
2020-12-22T23:06:41Z
https://github.com/chakra-core/ChakraCore/issues/6349
533,489,588
6,349
[ "chakra-core", "ChakraCore" ]
I am using chakra library on Mac platform. I understand, ICU is for unicode support. Can someone explain what is the impact of excluding ICU from chakra library? Would there be any difference from functionality perspective?
impact of icu exclusion from chakra library
https://api.github.com/repos/chakra-core/ChakraCore/issues/6346/comments
1
2019-12-04T06:31:25Z
2020-03-25T08:15:13Z
https://github.com/chakra-core/ChakraCore/issues/6346
532,478,977
6,346
[ "chakra-core", "ChakraCore" ]
the following js triggers a ICU_ASSERT in Js::IntlEngineInterfaceExtensionObject::EntryIntl_NormalizeLanguageTag ``` var intl=new Intl.DateTimeFormat('de-u-cu-eur-em-default-hc-h23-ks-level1-lb-strict-lw-normal-ms-metric-nu-latn-rg-atzzzz-sd-atat1-ss-none-tz-atvie-va-posix'); ```
ICU_ASSERT in Js::IntlEngineInterfaceExtensionObject::EntryIntl_NormalizeLanguageTag
https://api.github.com/repos/chakra-core/ChakraCore/issues/6345/comments
0
2019-12-03T08:58:55Z
2019-12-03T08:58:55Z
https://github.com/chakra-core/ChakraCore/issues/6345
531,826,772
6,345
[ "chakra-core", "ChakraCore" ]
the following js fragment can cause a null pointer dereference in SCCLiveness::ProcessStackSymUse ``` function func(){} class C{} for (var i=0;i++<1000;i++){ func(new C(this.__defineGetter__("x",()=>{})),C); } ```
null pointer dereference in SCCLiveness::ProcessStackSymUse
https://api.github.com/repos/chakra-core/ChakraCore/issues/6344/comments
0
2019-12-03T07:30:30Z
2019-12-03T07:30:30Z
https://github.com/chakra-core/ChakraCore/issues/6344
531,783,156
6,344
[ "chakra-core", "ChakraCore" ]
the following js fragment cause a null pointer dereference in TryGetCallbackDefInstr ``` function f1(f2) { for(var i=0;i<null;f2()); } function f() { f1.call(()=>{}); }; for (var i=0;i<1000;i++) f(); ```
null pointer dereference in TryGetCallbackDefInstr
https://api.github.com/repos/chakra-core/ChakraCore/issues/6343/comments
0
2019-12-03T07:14:33Z
2019-12-03T07:14:33Z
https://github.com/chakra-core/ChakraCore/issues/6343
531,776,093
6,343
[ "chakra-core", "ChakraCore" ]
When using `Object.getOwnPropertyDescriptor` to get the descriptor of `regex.source` and `regex.__proto__.source`, I find the property is not defined in RegExp.prototype. According to ES6 and ES10, this property belongs to RegExp.prototype. And the property has been changed into accessor property since ES6. Maybe this is an issue of Chakra. #### version [eaaf7ac](https://github.com/microsoft/ChakraCore/commit/eaaf7ac6beca01ab0d80c05959f3868463043c2d) #### run step `ChakraCore/out/Release/ch testcase.js` #### testcase ``` var NISLFuzzingFunc = function(){ var regex = /nisl/ig; print(regex.source); var des1 = Object.getOwnPropertyDescriptor(regex,"source"); var des2 = Object.getOwnPropertyDescriptor(regex.__proto__ , "source"); print(des1); print(des2); for(var i in des1){ print (i + " " + des1[i]); } }; NISLFuzzingFunc(); ``` #### output ``` nisl [object Object] undefined value nisl writable false enumerable false configurable false ``` #### expected output ``` nisl undefined [object Object] ```
Incorrect realization of RegExp.prototype.source
https://api.github.com/repos/chakra-core/ChakraCore/issues/6342/comments
1
2019-12-03T02:08:31Z
2020-03-25T08:52:56Z
https://github.com/chakra-core/ChakraCore/issues/6342
531,662,346
6,342
[ "chakra-core", "ChakraCore" ]
When I execute the testcase below, the returncode is -6 and aborted without other information (exception, warning, OOM etc.) provided. This is not friendly enough for users. Maybe you could enhance it. #### version [eaaf7ac](https://github.com/microsoft/ChakraCore/commit/eaaf7ac6beca01ab0d80c05959f3868463043c2d) #### build platform `Ubuntu 16.04.6 LTS (Linux 4.15.0-55-generic x86_64)` #### build step `./build.sh --debug` #### testcase ``` var NISLFuzzingFunc =function(){ var result = "-"; while(result !== undefined){ result += result; } }; NISLFuzzingFunc(); ``` #### run step `ChakraCore/out/Release/ch testcase.js`
A question about infinity string
https://api.github.com/repos/chakra-core/ChakraCore/issues/6340/comments
4
2019-11-30T09:09:42Z
2019-12-03T02:19:05Z
https://github.com/chakra-core/ChakraCore/issues/6340
530,553,862
6,340
[ "chakra-core", "ChakraCore" ]
The current error message for `import` or `export` encountered in non-module (script) code is: ``` SyntaxError: Module import or export statement unexpected here ``` This is rather vague and it's not immediately obvious that "here" means "anywhere in non-module code". The error message could be improved, I think. Perhaps something like: ``` `import` or `export` can only be used in module code ``` Although this maybe isn't 100% either since in miniSphere/Cell's case the error occurs depending on whether a file is named `.js` (ESM) or `.cjs` (CommonJS), both of which would be called "modules" in common parlance. But it's certainly an improvement over "statement unexpected here"...
Improve error for import/export in non-ESM code
https://api.github.com/repos/chakra-core/ChakraCore/issues/6339/comments
1
2019-11-28T23:45:09Z
2019-12-06T06:50:46Z
https://github.com/chakra-core/ChakraCore/issues/6339
530,101,568
6,339
[ "chakra-core", "ChakraCore" ]
When calling `Reflect.construct` with an argument list, the members of the argument list are corrupted. > console.log(navigator.userAgent) Mozilla/5.0 (Windows NT 10.0; Win64; x64) ... Edge/18.17763 > var subject = []; > console.log(subject.__proto__ === Array.prototype); true > Reflect.construct(Object, [subject]); > console.log(subject.__proto__ === Array.prototype); false > console.log(subject) Could not complete the operation due to error 80020101. In other browsers `subject` is not corrupted and `true` is logged both times. This may be related to https://github.com/microsoft/ChakraCore/issues/3217.
Reflect.construct corrupts members of the arguments list (error 80020101)
https://api.github.com/repos/chakra-core/ChakraCore/issues/6338/comments
3
2019-11-28T13:04:03Z
2020-04-10T14:44:29Z
https://github.com/chakra-core/ChakraCore/issues/6338
529,901,110
6,338
[ "chakra-core", "ChakraCore" ]
Hi..I am getting a rare crash in JsRun function on macOs. Since it is rare, I am facing problem reproducing it in order to find its root-cause. Could you please suggest what can cause this crash? `int JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::Insert<(JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::InsertOperations)0>(unsigned long const&, SourceContextInfo* const&) (@int JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::Insert<(JsUtil::BaseDictionary<unsigned long, SourceContextInfo*, Memory::Recycler, DictionarySizePolicy<PowerOf2Policy, 2u, 2u, 1u, 4u>, DefaultComparer, JsUtil::SimpleDictionaryEntry, JsUtil::NoResizeLock>::InsertOperations)0>(unsigned long const&, SourceContextInfo* const&):90) Js::ScriptContext::CreateSourceContextInfo(unsigned long, char16_t const*, unsigned long, Js::SimpleDataCacheWrapper*, char16_t const*, unsigned long) (@Js::ScriptContext::CreateSourceContextInfo(unsigned long, char16_t const*, unsigned long, Js::SimpleDataCacheWrapper*, char16_t const*, unsigned long):195) RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**) (@RunScriptCore(void*, unsigned char const*, unsigned long, LoadScriptFlag, unsigned long, char16_t const*, bool, _JsParseScriptAttributes, bool, void**):63) JsRun (@JsRun:99) JavascriptCore::jsLoop() (JavascriptCore.cpp:166) decltype(*(std::__1::forward<JavascriptCore*>(fp0)).*fp()) std::__1::__invoke<void (JavascriptCore::*)(), JavascriptCore*, void>(void (JavascriptCore::*&&)(), JavascriptCore*&&) (/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4369) void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (JavascriptCore::*)(), JavascriptCore*, 2ul>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (JavascriptCore::*)(), JavascriptCore*>&, std::__1::__tuple_indices<2ul>) (/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:342) void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (JavascriptCore::*)(), JavascriptCore*> >(void*) (/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/thread:352) _pthread_start (@_pthread_start:36)`
rare crash of JsRun function on Mac
https://api.github.com/repos/chakra-core/ChakraCore/issues/6337/comments
2
2019-11-27T14:49:08Z
2019-11-29T04:52:44Z
https://github.com/chakra-core/ChakraCore/issues/6337
529,393,618
6,337
[ "chakra-core", "ChakraCore" ]
how to compile it by armv7-linux-gnueabi-gcc
how to compile it by armv7-linux-gnueabi-gcc
https://api.github.com/repos/chakra-core/ChakraCore/issues/6335/comments
1
2019-11-25T03:48:36Z
2020-05-15T19:30:50Z
https://github.com/chakra-core/ChakraCore/issues/6335
527,826,152
6,335
[ "chakra-core", "ChakraCore" ]
``` function foo(){ try{ x = arguments; throw Error(); } catch(e){ return x.length; } var x = {}; } for(var v0 = 0; v0 < 0x1000; v0++){ foo(); } ``` It is related to #6058 . ChakraCore Version: ch version 1.11.15.0 (1B6EE856A9F07071BB8D11ED9068CF262DF8285FC9E762E9F77FBB6A3957E365) Environment: 18.04.2-Ubuntu
Null pointer dereference in ValueType::FromObject() when jitting
https://api.github.com/repos/chakra-core/ChakraCore/issues/6333/comments
0
2019-11-19T15:39:45Z
2019-11-19T15:39:45Z
https://github.com/chakra-core/ChakraCore/issues/6333
525,089,298
6,333
[ "chakra-core", "ChakraCore" ]
The following JavaScript code can lead to a null pointer de-reference. ``` function test(){ var v1 = 0; for(var v2 = 0;;v2++){ for(var v3 = 0;;v3++){ v1 = v3; } } } test() ``` It is related to #5532 . ChakraCore Version: ch version 1.11.15.0 (1B6EE856A9F07071BB8D11ED9068CF262DF8285FC9E762E9F77FBB6A3957E365) Environment: 18.04.2-Ubuntu
Null pointer dereference in EmitBooleanExpression
https://api.github.com/repos/chakra-core/ChakraCore/issues/6332/comments
0
2019-11-19T09:46:39Z
2019-11-19T15:41:55Z
https://github.com/chakra-core/ChakraCore/issues/6332
524,891,928
6,332
[ "chakra-core", "ChakraCore" ]
Are there any plans to publish version 1.12 on Nuget in the foreseeable future?
Plans to release 1.12?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6329/comments
1
2019-11-12T19:11:48Z
2020-03-25T08:21:01Z
https://github.com/chakra-core/ChakraCore/issues/6329
521,746,924
6,329
[ "chakra-core", "ChakraCore" ]
PoC: ``` var b = 0 function test0() { var a = 100; for (var i = 1; (a |= 1) && i < 6; ++i) { test0a(); for (var j = 0; j < 1; ++j) { a = 0xffffffffff for (var k = 0; k < 1; ++k) { i = a; +i; } } print(i) // i should be 1099511627775 (0xffffffffff) but print -1 sometimes if(i == 0xffffffffff) exit() // Intentionally made ReferenceError to stop } function test0a() { a; b = b + 1; if(b > 1000) return // to avoid out-of-stack return test0(b); } } test0(); ``` stdout in Release version: ``` -1 1099511627775 ReferenceError: 'exit' is not defined ``` `i` should be always 1099511627775 (0xffffffffff) but print -1 It also hits assertion in lib/Backend/GlobOpt.cpp:11940. Version=v1.11.14 OS=Ubuntu 16.04.6 Arch=x86_64
Type confusion between integer and float in JIT
https://api.github.com/repos/chakra-core/ChakraCore/issues/6325/comments
1
2019-11-05T21:44:35Z
2020-04-11T06:22:25Z
https://github.com/chakra-core/ChakraCore/issues/6325
518,060,886
6,325
[ "chakra-core", "ChakraCore" ]
I discovered this while trying to produce a repro for #6160. The following code when run in `ch` hits an assertion in `InlineCache.cpp`: ```js WScript.Attach(() => { let iter = g(); iter.next(); iter.next(); }); (async () => { await 777; await 1206; WScript.Detach(() => {}); })(); function* g() { yield 0; } ``` The assertion that was hit is: https://github.com/microsoft/ChakraCore/blob/master/lib/Runtime/Language/InlineCache.cpp#L570 ```cpp Assert(!needsProtoInvalidation || isProtoRegistered); ```
Assertion failure in InlineCache.cpp
https://api.github.com/repos/chakra-core/ChakraCore/issues/6323/comments
5
2019-11-04T15:50:41Z
2020-06-09T03:07:53Z
https://github.com/chakra-core/ChakraCore/issues/6323
517,240,598
6,323
[ "chakra-core", "ChakraCore" ]
The documentation for `JsRunScript` function at https://github.com/microsoft/ChakraCore/wiki/JsRunScript doesn't really tell much about allowed values (including the null pointer) and their interpretation for the `sourceUrl` argument: > sourceUrl: The location the script came from. Scripts do not always come from "locations" as these uniform locations cannot be identified -- since one simply passes strings to `JsRunScript`, it makes no sense to mandate a location for such script. I assumed the argument was optional and tried to pass `NULL` as value, but the function returned an error. What are my options? Am I supposed to cook up a bogus location to indicate no location condition? Like an empty string, for instance?
Insufficient documentation for the `sourceUrl` argument to the `JsRunScript` function
https://api.github.com/repos/chakra-core/ChakraCore/issues/6322/comments
3
2019-11-03T14:54:09Z
2019-11-03T17:22:15Z
https://github.com/chakra-core/ChakraCore/issues/6322
516,839,549
6,322
[ "chakra-core", "ChakraCore" ]
The Wiki says JsCreateRuntime takes 4 arguments: https://github.com/microsoft/ChakraCore/wiki/JsCreateRuntime This seems to apply to the frozen IE11 JSRT mode. The edge-mode version of the function takes 3 arguments, why doesn't the Wiki reflect that at all?
Is the Wiki outdated?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6321/comments
2
2019-11-03T13:14:53Z
2019-11-03T16:38:03Z
https://github.com/chakra-core/ChakraCore/issues/6321
516,826,229
6,321
[ "chakra-core", "ChakraCore" ]
```js function opt1() { } function opt(obj) { Array.prototype.push.call(obj, 1); opt1(' ' + obj); } var arr = new Array([0]); for (let i = 0; i < 0x100; i++) { opt(arr[0]); } opt(2.3023e-320); ``` backtrace is ``` [----------------------------------registers-----------------------------------] RAX: 0xbe1c000000000000 RBX: 0x555556135350 --> 0x7ffff49e4188 --> 0x7ffff3d35b70 (<_ZN2Js16RecyclableObject8FinalizeEb>: ret) RCX: 0xbe1c000000400000 RDX: 0x21 ('!') RSI: 0xbe1c000000400000 RDI: 0x555556135300 --> 0x7ffff49d19d0 --> 0x7ffff401a300 (<_ZNK2Js13ScriptContext11GetNullAddrEv>: mov rax,QWORD PTR [rdi+0x8]) RBP: 0x7fffffffcc10 --> 0x7fffffffcce0 --> 0x7fffffffcd10 --> 0x7fffffffcdb0 --> 0x7fffffffce20 --> 0x7fffffffcee0 (--> ...) RSP: 0x7fffffffcbf0 --> 0x7ff7f1e21000 (movabs rax,0x55555610ad88) RIP: 0x7ffff4249b77 (<_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+39>: mov rcx,QWORD PTR [rsi]) R8 : 0x7fffffffd0d8 --> 0x7ffff7ee6020 --> 0x7ffff4a273c0 --> 0x7ffff3d35b70 (<_ZN2Js16RecyclableObject8FinalizeEb>: ret) R9 : 0x7fffff80b000 R10: 0x20 (' ') R11: 0x7ff7f1e21000 (movabs rax,0x55555610ad88) R12: 0x7ff7e8000ac0 --> 0x7ffff7e8f380 --> 0x800000001b R13: 0x7ffff7f2e850 --> 0x1 R14: 0x1000000000000 R15: 0x7ffff7ed2d80 --> 0x7ffff4a1e160 --> 0x7ffff3d35b70 (<_ZN2Js16RecyclableObject8FinalizeEb>: ret) EFLAGS: 0x10286 (carry PARITY adjust zero SIGN trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff4249b6f <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+31>: and rax,rsi 0x7ffff4249b72 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+34>: cmp rax,r14 0x7ffff4249b75 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+37>: je 0x7ffff4249ba4 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+84> => 0x7ffff4249b77 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+39>: mov rcx,QWORD PTR [rsi] 0x7ffff4249b7a <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+42>: lea rbx,[rip+0x841e0f] # 0x7ffff4a8b990 <_ZN16VirtualTableInfoIN2Js24JavascriptNativeIntArrayEE7AddressE> 0x7ffff4249b81 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+49>: cmp rcx,QWORD PTR [rbx] 0x7ffff4249b84 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+52>: jne 0x7ffff4249ba4 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+84> 0x7ffff4249b86 <_ZN2Js24JavascriptNativeIntArray4PushEPNS_13ScriptContextEPvi+54>: mov ebx,DWORD PTR [rsi+0x20] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcbf0 --> 0x7ff7f1e21000 (movabs rax,0x55555610ad88) 0008| 0x7fffffffcbf8 --> 0x7ffff7e8a180 --> 0x7ffff49d0c80 --> 0x7ffff4008400 (<_ZN2Js14EntryPointInfo8FinalizeEb>: push rbp) 0016| 0x7fffffffcc00 --> 0x555556135350 --> 0x7ffff49e4188 --> 0x7ffff3d35b70 (<_ZN2Js16RecyclableObject8FinalizeEb>: ret) 0024| 0x7fffffffcc08 --> 0x7ffff7ee4000 --> 0x7ffff49e3150 --> 0x7ffff3d35b70 (<_ZN2Js16RecyclableObject8FinalizeEb>: ret) 0032| 0x7fffffffcc10 --> 0x7fffffffcce0 --> 0x7fffffffcd10 --> 0x7fffffffcdb0 --> 0x7fffffffce20 --> 0x7fffffffcee0 (--> ...) 0040| 0x7fffffffcc18 --> 0x7ff7f1e21382 (mov rax,QWORD PTR [rbp-0x18]) 0048| 0x7fffffffcc20 --> 0x7ffff7ee4000 --> 0x7ffff49e3150 --> 0x7ffff3d35b70 (<_ZN2Js16RecyclableObject8FinalizeEb>: ret) 0056| 0x7fffffffcc28 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff4249b77 in Js::JavascriptNativeIntArray::Push(Js::ScriptContext*, void*, int) () from /home/zwjj/ChakraCore/out/Release/libChakraCore.so ``` Build on ubuntu 16.04 x86_64, latest git branch.
SegmentFault due to a type confusion bug in JavascriptNativeIntArray::Push
https://api.github.com/repos/chakra-core/ChakraCore/issues/6320/comments
0
2019-11-01T06:58:02Z
2019-11-25T22:53:44Z
https://github.com/chakra-core/ChakraCore/issues/6320
515,945,328
6,320
[ "chakra-core", "ChakraCore" ]
When throwing an error using JsSetException inside a for..of loop error.stack does point to the last line of the for loop instead of the line which has caused the real exception. for..in however does work properly throwing inside JavaScript works properly even inside for..of loop try..catch and rethrow works properly Example "for..of": ```javascript 1 function crash() { 2 Sys.CauseException(); 3 } 4 5 for (let x of [1,2,3]) { 6 crash(); 7 } ``` error.stack: ``` Error: Error invoking CLR method CauseException() at Global code (test.js:6:2) ``` Example "for..in": ```javascript 1 function crash() { 2 Sys.CauseException(); 3 } 4 5 for (let x in [1,2,3]) { 6 crash(); 7 } ``` error.stack: ``` Error: Error invoking CLR method CauseException() at crash (test.js:2:2) at Global code (test.js:6:2) ``` Example "rethrow": ```javascript 1 function crash() { 2 try { 3 Sys.CauseException(); 4 } catch(error) } { throw error; } 5 } 6 7 for (let x in [1,2,3]) { 8 crash(); 9 } ``` error.stack: ``` Error: Error invoking CLR method CauseException() at crash (test.js:4:19) at Global code (test.js:8:2)` ``` throwing the error in C#: ```csharp var error = JavaScriptValue.CreateError(JavaScriptValue.FromString("Error invoking CLR method CauseException()")); JavaScriptContext.SetException(error); return JavaScriptValue.Invalid; ```
Wrong stack trace in errors shown in combination of for..of loops and JsSetException
https://api.github.com/repos/chakra-core/ChakraCore/issues/6314/comments
6
2019-10-28T08:15:55Z
2020-03-26T22:45:05Z
https://github.com/chakra-core/ChakraCore/issues/6314
513,156,670
6,314
[ "chakra-core", "ChakraCore" ]
The following case triggers assertion failure. ```js (function foo() { function bar() { foo; } with (1) foo(); })(); ``` ``` ASSERTION 20300: (E:\ChakraCore\lib\Runtime\Language\InterpreterStackFrame.cpp, line 7558) scopeSlotCount != 0 Failure: (scopeSlotCount != 0) FATAL ERROR: ch.exe failed due to exception code c0000420 ``` Reproduced on commit `45de85381bbb83dda9899e88e115d0e99a69e99c`
ASSERTION Failure: (scopeSlotCount != 0)
https://api.github.com/repos/chakra-core/ChakraCore/issues/6313/comments
0
2019-10-28T03:33:32Z
2019-10-28T03:33:32Z
https://github.com/chakra-core/ChakraCore/issues/6313
513,078,826
6,313
[ "chakra-core", "ChakraCore" ]
``` var count = 0; var myEval = eval; function foo(){ myEval("var v" + count++); var y; } for(i = 0, v0 = 0; i < 100000; i += count, v0 += 400){ new foo(v0); } ``` platform: Ubuntu 18.04.3 LTS version: ChakraCore 1.12.0 commit hash: 39078423036150a32059b315ff4d7e8d2cbced87 (Date: Wed Oct 9 15:40:22 2019 -0700)
Segfault due to JIT is causig bad code gen in SCCLiveness::ProcessStackSymUse
https://api.github.com/repos/chakra-core/ChakraCore/issues/6311/comments
0
2019-10-23T01:37:57Z
2019-10-23T01:37:57Z
https://github.com/chakra-core/ChakraCore/issues/6311
511,019,039
6,311
[ "chakra-core", "ChakraCore" ]
The debug build of Chakacore crashes. ch version 1.11.13.0 ```javascript function main() { let v1 = "A"; do {} while (0 != v1); } main(); ```
Assertion failure in ib/Backend/BackwardPass.cpp, line 2511
https://api.github.com/repos/chakra-core/ChakraCore/issues/6310/comments
1
2019-10-16T05:05:57Z
2019-10-28T19:11:27Z
https://github.com/chakra-core/ChakraCore/issues/6310
507,616,490
6,310
[ "chakra-core", "ChakraCore" ]
Relates to https://github.com/Homebrew/homebrew-core/pull/45033 Trying to `ChakraCore` from `v1.11.13` to `v1.11.14`, but receiving these errors: ``` /tmp/chakra-20191009-92499-1eshv12/ChakraCore-1.11.14/lib/Backend/amd64/LinearScanMdA.S:54:34: error: unknown token in expression movups xmmword ptr [rax + 80h], xmm0 ``` I wonder if anyone has idea how to get it fixed. Jenkins build reference: https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/49696/version=mojave/console
chakra 1.11.15 compilation issue
https://api.github.com/repos/chakra-core/ChakraCore/issues/6309/comments
8
2019-10-14T00:04:56Z
2020-01-04T19:07:58Z
https://github.com/chakra-core/ChakraCore/issues/6309
506,400,777
6,309
[ "chakra-core", "ChakraCore" ]
I think that ES6 unicode mode may not be implemented 100% correctly (or maybe v8 has it wrong): ```js print(/\udf06/u.test('\ud834\udf06')); ``` eshost results: ``` #### V8 --harmony false #### Chakra true #### JavaScriptCore true #### chDev true #### SpiderMonkey false ``` V8 and SpiderMonkey seem to be recognising the string as a single surrogate pair and attempting to match the RegExp against the whole thing and failing whereas CC and JSC match against the second half. This issue results in CC failing the following test 262 case: https://github.com/tc39/test262/blob/master/test/built-ins/RegExp/prototype/exec/u-lastindex-adv.js
RegExp Unicode matching difference to v8
https://api.github.com/repos/chakra-core/ChakraCore/issues/6308/comments
1
2019-10-13T22:44:39Z
2020-03-25T08:17:59Z
https://github.com/chakra-core/ChakraCore/issues/6308
506,392,405
6,308
[ "chakra-core", "ChakraCore" ]
This `test.js` can trigger null pointer dereference . run `ch.exe -bgjit- test.js` ```javascript const v4 = [13.37, 13.37]; function v8() { const v15 = Math.round(Infinity); try { v8(); const v19 = new Uint32Array(); const v20 = typeof v19; } catch (v20) { v4.d = 1; } } v8(); ``` Version : v1.11.14 OS : Win10
null pointer dereference in JavascriptExceptionOperators::OP_TryCatch
https://api.github.com/repos/chakra-core/ChakraCore/issues/6307/comments
2
2019-10-11T08:04:52Z
2019-10-11T22:21:49Z
https://github.com/chakra-core/ChakraCore/issues/6307
505,701,575
6,307
[ "chakra-core", "ChakraCore" ]
let buggy = [1.1, {}, {}]; buggy.__proto__ = new Proxy([], buggy); buggy[0] = 5.5627483035514150e-309;
Out of stack space
https://api.github.com/repos/chakra-core/ChakraCore/issues/6306/comments
2
2019-10-10T03:32:22Z
2020-03-25T08:28:14Z
https://github.com/chakra-core/ChakraCore/issues/6306
505,011,458
6,306
[ "chakra-core", "ChakraCore" ]
```` var A = new Uint32Array(10000); function foo() { for (var i = 0; i < 10000; i++) { A[i] = 0x1234; } for (var i = 0; i < 10000; i++) { A[i] = foo; } } var r; for (var i = 0; i < 1000; i++) { print(i); r = foo(); } ````
DebugBreak in ThreadContext::AssertJsReentrancy
https://api.github.com/repos/chakra-core/ChakraCore/issues/6305/comments
0
2019-10-09T09:58:28Z
2019-10-09T09:58:28Z
https://github.com/chakra-core/ChakraCore/issues/6305
504,543,169
6,305
[ "chakra-core", "ChakraCore" ]
```` var array = Array(); for (var i = 0; i < 40000; ++i) array[i] = i; function test() { var src = 'var x=/'; src += array.join(function(){})+'/;'; eval(src); } test(); ````
DebugBreak in Js::GlobalObject::DefaultEvalHelper
https://api.github.com/repos/chakra-core/ChakraCore/issues/6304/comments
0
2019-10-09T09:39:10Z
2019-10-09T09:39:10Z
https://github.com/chakra-core/ChakraCore/issues/6304
504,532,408
6,304
[ "chakra-core", "ChakraCore" ]
the callApplyId of function foo didn't get profiled. ```` function main() { for (;;Array.prototype.sort.call(main,()=>{})()++){} Array.prototype.sort.call(main,()=>{}); } main(); ````
callApplyId didn't get profiled
https://api.github.com/repos/chakra-core/ChakraCore/issues/6303/comments
0
2019-10-09T08:43:08Z
2019-11-20T18:51:59Z
https://github.com/chakra-core/ChakraCore/issues/6303
504,502,155
6,303
[ "chakra-core", "ChakraCore" ]
Stage 3 proposal: https://github.com/tc39/proposal-promise-any Note that this includes `AggregateError` as well.
Implement Promise.any and AggregateError
https://api.github.com/repos/chakra-core/ChakraCore/issues/6299/comments
0
2019-10-04T06:35:38Z
2021-04-21T14:00:31Z
https://github.com/chakra-core/ChakraCore/issues/6299
502,456,114
6,299
[ "chakra-core", "ChakraCore" ]
The proposal reached stage 3 at today’s TC39 meeting. Repository: https://github.com/tc39/proposal-string-replaceall
Implement String.prototype.replaceAll
https://api.github.com/repos/chakra-core/ChakraCore/issues/6297/comments
6
2019-10-02T15:57:03Z
2020-03-25T23:03:55Z
https://github.com/chakra-core/ChakraCore/issues/6297
501,579,858
6,297
[ "chakra-core", "ChakraCore" ]
See #6295 When parsing modules, we are currently building the list of dependency specifiers in reverse source-code order (by using `list->Prepend`), and we are somehow dependent on that reverse order. Investigate whether we can build the list in the correct order from the start.
Refactor module code to keep dependency specifiers in source code order
https://api.github.com/repos/chakra-core/ChakraCore/issues/6296/comments
1
2019-09-27T16:45:03Z
2021-02-13T15:11:28Z
https://github.com/chakra-core/ChakraCore/issues/6296
499,544,664
6,296
[ "chakra-core", "ChakraCore" ]
hi, thank you for sharing . I have two questions : 1、I hope to add a JsDisposeContext API , it 's important just like JsDisposeRuntime . 2、report a error , that is a error of division by zero , js syntax doesn't display error , and result is zero .
I hope to add a JsDisposeContext API .
https://api.github.com/repos/chakra-core/ChakraCore/issues/6291/comments
4
2019-09-22T00:22:35Z
2020-03-25T08:25:03Z
https://github.com/chakra-core/ChakraCore/issues/6291
496,716,347
6,291
[ "chakra-core", "ChakraCore" ]
![image](https://user-images.githubusercontent.com/16331613/65225223-55a27c00-daf7-11e9-965a-25ff83a154f1.png)
Computer virus include Exp.CVE-2016-3377
https://api.github.com/repos/chakra-core/ChakraCore/issues/6289/comments
1
2019-09-19T08:06:39Z
2019-10-09T22:54:06Z
https://github.com/chakra-core/ChakraCore/issues/6289
495,639,562
6,289
[ "chakra-core", "ChakraCore" ]
SpiderMonkey throws an early error in the following case: ```js function f() {} function g() { 'use strict'; if (false) f() = 1; } ``` whereas CC and V8 do not. Should we throw early as well?
Should we throw an early error for function calls on LHS in strict mode?
https://api.github.com/repos/chakra-core/ChakraCore/issues/6283/comments
4
2019-09-12T17:34:26Z
2019-09-13T21:49:32Z
https://github.com/chakra-core/ChakraCore/issues/6283
492,937,978
6,283
[ "chakra-core", "ChakraCore" ]
Wrong Realization of Function.length by ChakraCore ```js function func01(a, b) { return a + b } print(func01.length) Object.defineProperty(func01, "length", { writable: true }) func01.length = "0x1234" print(func01.length) ``` the expected output: `2`<--Number ,`0x1234`<--String ChakraCore output : `2`<--Number ,`2`<--Number V8|JSC|SpiderMonkey output : `2`<--Number ,`0x1234`<--String
Wrong Realization of Function.length
https://api.github.com/repos/chakra-core/ChakraCore/issues/6282/comments
1
2019-09-12T06:16:37Z
2019-09-12T17:31:08Z
https://github.com/chakra-core/ChakraCore/issues/6282
492,606,952
6,282
[ "chakra-core", "ChakraCore" ]
### Version: [8fcb0f1](https://github.com/microsoft/ChakraCore/commit/8fcb0f1b5771fe8db855e85d7bf7c73c5d32c386), [ChakraCore v1.11.12](https://github.com/microsoft/ChakraCore/releases/tag/v1.11.12) ### Testcase: ```` var NISLFuzzingFunc = function(a, b, c) { [11] += a[11]; }; ```` ### Command: ```` ./ChakraCore/out/Debug/ch testcase.js ```` ### Output: ```` ```` ### Expected output: ```` SyntaxError: Invalid left-hand side in assignment (Line 2) ```` ### Description: For the ES2015 profile, the error must be thrown as a SyntaxError during the parsing, while chakra does not seem to do like this. In addition, other engines throw SyntaxError exception, such as v8, spiderMonkey, javascriptCore.
SyntaxError should be thrown during the parsing
https://api.github.com/repos/chakra-core/ChakraCore/issues/6278/comments
0
2019-09-10T09:39:02Z
2019-09-12T17:47:51Z
https://github.com/chakra-core/ChakraCore/issues/6278
491,562,038
6,278
[ "chakra-core", "ChakraCore" ]
The debug build of Chakacore crashes. PoC: ``` function inlinee() { Number.isSafeInteger(1.1 * 0); return inlinee.arguments[0]; } function opt(convert_to_var_array) { let stack_arr = []; stack_arr[20] = 1.1; stack_arr[10000] = 1.1; stack_arr[20000] = 2.2; let heap_arr = inlinee(stack_arr); } function main() { for (let i = 0; i < 50000; i++) { opt(new Function('')); inlinee(); inlinee(); } inlinee(); print(opt(heap_arr => { heap_arr[10000] = {}; inlinee(); inlinee(); })); } main(); ``` Version= v1.11.12 and `e79d68a` on master branch OS=Ubuntu 16.04.6 Arch=x86_64
ASSERTION failure in ChakraCore/lib/Runtime/Library/JavascriptArray.cpp, line 11954
https://api.github.com/repos/chakra-core/ChakraCore/issues/6277/comments
1
2019-09-10T04:47:03Z
2019-10-01T21:01:25Z
https://github.com/chakra-core/ChakraCore/issues/6277
491,447,707
6,277
[ "chakra-core", "ChakraCore" ]
The debug build of Chakracore crashes PoC: ``` var arr = [0, 1, 2, 3, 4, 5, 6, 7]; Array.prototype.push.apply(arr, []); ``` Version= v1.11.12 OS=Ubuntu 16.04.6 Arch=x86_64
Crash due to memory corruption in Js::JavascriptNativeIntArray::ValidateArray
https://api.github.com/repos/chakra-core/ChakraCore/issues/6276/comments
0
2019-09-10T04:34:14Z
2019-09-10T04:34:14Z
https://github.com/chakra-core/ChakraCore/issues/6276
491,444,559
6,276
[ "chakra-core", "ChakraCore" ]
The debug and release build of Chakracore crashes PoC: ``` var dnaInput = ">ONE Homo sapiens alu\n\ GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA\n\ TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT\n\ gagatacctttgcaattttt\n"; dnaInput = dnaInput + dnaInput + dnaInput + dnaInput + dnaInput + dnaInput; dnaInput += dnaInput + dnaInput + dnaInput + dnaInput + dnaInput + dnaInput; dnaInput += dnaInput + dnaInput + dnaInput + dnaInput + dnaInput + dnaInput; dnaInput += dnaInput + dnaInput + dnaInput + dnaInput + dnaInput + dnaInput; var ilen, seqs = [/agggtaaa|tttaccct/ig, /[cgt]gggtaaa|tttaccc[acg]/ig, /a[act]ggtaaa|tttacc[agt]t/ig, /ag[act]gtaaa|tttac[agt]ct/ig, /agg[act]taaa|ttta[agt]cct/ig, /aggg[acg]aaa|ttt[cgt]ccct/ig, /agggt[cgt]aa|tt[acg]accct/ig, /agggta[cgt]a|t[acg]taccct/ig, /agggtaa[cgt]|[acg]ttaccct/ig] seqs.push(dnaInput, seqs) var dnaOutputString = ''; for (i in seqs) { dnaOutputString += seqs[i].source + (dnaInput.match(seqs[i]) || []) } ``` Version= v1.11.12 and `e79d68a` on master branch OS=Ubuntu 16.04.6 Arch=x86_64
Crash due to buffer overrun in UnifiedRegex::RuntimeCharTrie::CloneFrom
https://api.github.com/repos/chakra-core/ChakraCore/issues/6275/comments
0
2019-09-10T04:27:41Z
2019-09-26T02:44:07Z
https://github.com/chakra-core/ChakraCore/issues/6275
491,443,000
6,275
[ "chakra-core", "ChakraCore" ]
The debug and release build of Chakracore crashes PoC: ``` function foo(f) { f(f); } function bar(f) { new foo(f); } bar(function () { foo(bar); }); ``` Version= v1.11.12 OS=Ubuntu 16.04.6 Arch=x86_64
Crash due to buffer overrun in Inline::BuildIRForInlinee
https://api.github.com/repos/chakra-core/ChakraCore/issues/6274/comments
0
2019-09-10T04:04:29Z
2019-09-10T04:25:33Z
https://github.com/chakra-core/ChakraCore/issues/6274
491,437,747
6,274