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"
] |
Hi everyone,
I found an inconsistency when we try to set a getter-only property of an object.
OS: Ubuntu 16.04 x86
Chakra: 1.9
Step to reproduce:
```
try{
var a = {get "0"() {return 1;}, length: 1};
[].fill.call(a, 2);
throw new Error("should not reach this point")
}
catch(error){
if (!(error instanceof TypeError)) throw new Error('Should throw TypeError')
}
```
Actual results:
Error: Should throw TypeError
Expected results:
pass without errors
V8, SpiderMonkey and JavascriptCore throws a TypeError when attempted to assign to readonly property.
cinfuzz
|
Chakra should throw TypeError when try to set property of an object which has only a getter
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5033/comments
| 7 |
2018-04-24T00:08:18Z
|
2024-05-10T16:19:34Z
|
https://github.com/chakra-core/ChakraCore/issues/5033
| 317,024,838 | 5,033 |
[
"chakra-core",
"ChakraCore"
] |
Should be something embedders can disable without rebuilding.
|
Add FailFast that triggers when commit reaches "unreasonably large" value like 3GB
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5031/comments
| 9 |
2018-04-23T21:52:33Z
|
2018-05-11T19:18:31Z
|
https://github.com/chakra-core/ChakraCore/issues/5031
| 316,996,960 | 5,031 |
[
"chakra-core",
"ChakraCore"
] |
Using a shorthand method name in an object in a constructor with a super does not work in `Microsoft Edge 41.16299.371.0`, `Microsoft EdgeHTML 16.16299`. It results in a `Invalid use of the 'super' keyword` error.
Does not work (with shorthand method name):
```js
class A extends Object {
constructor() {
const b = {c() {}};
super();
}
};
```
Works (without shorthand method name):
```js
class A extends Object {
constructor() {
const b = {c: function() {}};
super();
}
};
```
|
Using shorthand method name in constructor with super
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5030/comments
| 4 |
2018-04-23T08:56:18Z
|
2018-05-04T22:19:54Z
|
https://github.com/chakra-core/ChakraCore/issues/5030
| 316,720,378 | 5,030 |
[
"chakra-core",
"ChakraCore"
] |
We'd like to catch allocations that are too large, and 2GB is not aggressive enough. Please experiment with something much smaller.
|
Reduce recycler egregious allocation size limit from 2GB to something smaller
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5025/comments
| 1 |
2018-04-20T22:45:39Z
|
2018-07-26T16:59:40Z
|
https://github.com/chakra-core/ChakraCore/issues/5025
| 316,432,299 | 5,025 |
[
"chakra-core",
"ChakraCore"
] |
Microbenchmark:
```js
"use strict";
const start = Date.now();
let length = 0;
for (var i = 0; i < 1e7; i++) {
length += "abCDef".toLowerCase().length;
}
print(`length: ${length}, time: ${Date.now() - start}`);
```
On my dev machine, jshost.exe with ICU takes about 2200ms to finish that test, while jshost.exe with WinGlob takes about 1200ms. These functions basically boil down to u_strToUpper/u_strToLower and LCMapStringEx, respectively, so there is evidence that ICU is simply a lot slower than Win32 in this case. /cc @Microsoft/target-dev
I will try to fix this with a fast-path for ASCII, but I would prefer to not revert to using LCMapStringEx on Windows+ICU, since that function still does not seem to properly handle all string-widening conversions (`"ß".toUpperCase() === "ß"` still, when it should be `=== "SS"`, at least in the invariant culture)
|
String.prototype.toLowerCase and toUpperCase are nearly 2x slower when using ICU
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5020/comments
| 0 |
2018-04-19T19:13:12Z
|
2018-04-20T17:06:17Z
|
https://github.com/chakra-core/ChakraCore/issues/5020
| 316,004,747 | 5,020 |
[
"chakra-core",
"ChakraCore"
] |
Hi folks,
I've noticed that `JsSetCurrentContext` seems to leak small amounts of memory; see the screenshot below for a backtrace from Instruments on macOS. We're using ChakraCore in a server process, and during stress testing yesterday I noticed that we were leaking memory. Instruments shows that `JsSetCurrentContext` calls appear to be the cause; all roads lead to `ThreadContextTLSEntry` in the backtraces.
Is it possible that there's some required cleanup that I'm missing here? In our current design, request threads "borrow" a runtime from a pool, so we end up calling `JsSetCurrentContext` at least once per request. Are we supposed to "un-set" the context when a thread is finished using a runtime?

|
Memory leak in JsSetCurrentContext
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5017/comments
| 12 |
2018-04-19T18:25:52Z
|
2019-06-07T18:52:55Z
|
https://github.com/chakra-core/ChakraCore/issues/5017
| 315,989,490 | 5,017 |
[
"chakra-core",
"ChakraCore"
] |
Found during CI of mono WebAssembly.
This is on 64bits linux and ChakraCore 1.8.3.
Build log: https://jenkins.mono-project.com/job/test-mono-pull-request-wasm/7/parsed_console/log.html
Error:
```
WASM: TestToList 66/1183
WASM: TestToListOrdered 66/1184
WASM: UnorderedTakeTestCase 66/1185
WASM: WhereTestCase 66/1186
WASM: ZipTestCase 66/1187
WASM: CtorNull 66/1188
WASM: DefaultCtor 66/1189
WASM: TransformCtor 66/1190
make[1]: *** [run-ch-system-core] Segmentation fault (core dumped)
make: *** [run-all-system-core] Error 2
```
To reproduce it you need to build & run mono in the wasm configuration.
Instructions here: https://github.com/mono/mono/blob/master/sdks/wasm/README.md
|
crash running System.Core under mono+wasm
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5015/comments
| 5 |
2018-04-19T14:42:02Z
|
2018-04-21T01:25:13Z
|
https://github.com/chakra-core/ChakraCore/issues/5015
| 315,908,711 | 5,015 |
[
"chakra-core",
"ChakraCore"
] |
Hi all,
I'm looking for a bit more clarity on using the JSRT Promise API.
I've read the Promise overview in the embedded JSRT overview (https://github.com/Microsoft/ChakraCore/wiki/JavaScript-Runtime-%28JSRT%29-Overview#promises)
and the PR involving JsCreatePromise (https://github.com/Microsoft/ChakraCore/pull/2581#issuecomment-281875736)
From what I've gathered so far, the following process is sane:
- ChakraCore makes a function call to native code
- The native code creates promise, resolve, and reject value refs, with JsCreatePromise.
- The native code can block here as it calculates something expensive, and then can JsCallFunction the resolve ref, with the expensive calculation as a parameter.
- The native code can then return the promise object back to ChakraCore, and JS execution will resume.
- After JS script execution has finished, the native host will process all items produced by the EnqueuePromiseCallback, in FIFO order.
- JS evaluation is now complete.
This does work, though the native code blocks script execution during its expensive computation. Wanting a better approach, I try this method:
- ChakraCore makes a function call to native code
- The native code creates promise, resolve, and reject value refs, and adds a reference to each to prevent Chakra from garbage collecting them.
- The native code forks a background thread. This thread will compute an expensive operation, and then execute the resolve function with JsCallFunction
- The native code does not wait for the background thread to complete. It returns the promise object back to Chakra immediately.
- ...
This doesn't work. JS execution, including the EnqueuePromiseCallback processing, can complete and terminate before the background thread is ready to resolve the promise, at which point the runtime can already have been cleaned up, and the refs invalidated (despite JsAddRef-ing the refs)
Afaict ChakraCore doesn't have specific provisions for evaluating promises in this manner.
Instead, the host must implement its own eventloop, that waits for pending native background tasks to finish completing and calls into their respective resolve functions, after initial script execution and EnqueuePromiseCallback processing.
Is this thinking correct? Are there any code examples of this?
|
Native background processing + ChakraCore Promise API
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/5013/comments
| 1 |
2018-04-19T02:02:26Z
|
2018-04-19T18:01:06Z
|
https://github.com/chakra-core/ChakraCore/issues/5013
| 315,701,247 | 5,013 |
[
"chakra-core",
"ChakraCore"
] |
Rather minor issue but annoying for xplat contributors (like me)
runtests.py doesn't honour the flag "exclude_ch" this flag is currently used only once:
https://github.com/Microsoft/ChakraCore/blob/1df947920775b7a91a1eb3ca35f83ae8992a778d/test/es5/rlexe.xml#L197
This specific test will reliably fail when run offline with runtests.py as it's meant to be excluded.
I'll submit a fix for this.
|
runtests.py isn't aware of "exclude_ch" flag
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4999/comments
| 0 |
2018-04-17T16:44:25Z
|
2018-04-20T19:49:48Z
|
https://github.com/chakra-core/ChakraCore/issues/4999
| 315,143,874 | 4,999 |
[
"chakra-core",
"ChakraCore"
] |
Arrow functions argument deconstruction seems to exhibit a bug with deconstructing arguments with default values when the first argument isn't deconstructed. It works so long as the first argument is deconstructed with a default value, else all subsequent deconstructions will not allow setting a default value to the argument.
Here's an example that works:
```
(function({ a = 1 }, { b = 2 }) { return a + b; })({}, {}); // returns 3
(function(x = 4, { a = 1 }, { b = 2 }) { return a + b; })(undefined, {}, {}); // returns 3
(function({ a = 1 }, x = 4, { b = 2 }) { return a + b; })({}, undefined, {}); // returns 3
(function({ a = 1 }, { b = 2 }, x = 4) { return a + b; })({}, {}, undefined); // returns 3
```
Here's the same example with arrow functions:
```
(({ a = 1 }, { b = 2 }) => a + b)({}, {}); // returns 3
((x = 4, { a = 1 }, { b = 2 }) => a + b)(undefined, {}, {}); // should return 3, instead throws "Expected ':'"
(({ a = 1 }, x = 4, { b = 2 }) => a + b)({}, undefined, {}); // returns 3
(({ a = 1 }, { b = 2 }, x = 4) => a + b)({}, {}, undefined); // returns 3
```
Removing **both** default assignments for destructuring in the second arrow function example fixes the problem:
```
((x, { a }, { b }) => a + b)(undefined, {}, {}); // returns NaN, as expected
```
|
Argument deconstruction and default assignment broken for functions with more than one argument
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4998/comments
| 3 |
2018-04-17T09:55:17Z
|
2018-04-17T15:34:50Z
|
https://github.com/chakra-core/ChakraCore/issues/4998
| 314,987,572 | 4,998 |
[
"chakra-core",
"ChakraCore"
] |
While investigating another issue I came across the following situation:
```javascript
function foo() {
function bar() {
// Deferred function
}
return bar;
}
// Create two deferred functions
var func1 = foo();
var func2 = foo();
// Set the prototype of `func2` to `func1`
Object.setPrototypeOf(func2, func1);
// Set a property of `func2` first causing it to be undeferred
func2.x = 1;
// Set a property of `func1` second causing it to share the type of `func2`
func1.x = 2;
// Try to access an undefined property, this will loop infinitely
console.log(undefined === func1.y);
```
What appears to be happening is that since the types of `func1` and `func2` are deferred, the order that they are undeferred can create a self-referential prototype loop. From what I was seeing when `func2` gets undeferred it will create a type with a prototype pointing to `func1` (which is still deferred). When `func1` finally gets undeferred the type sharing logic ends up assigning the type of `func2` to `func1`. Since `func2.__proto__ === func1` it creates a reference loop where `func1.__proto__ == func1`.
The infinite loop occurs when accessing a non-existent property of `func1`, the function `chakracore!Js::JavascriptOperators::GetProperty_Internal<0>` tries to search the prototype chain, but never finds an terminating condition.
Thanks @digitalinfinity and @boingoing for the investigation help!
|
Infinite loop in get property for shared deferred types
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4997/comments
| 4 |
2018-04-17T04:47:40Z
|
2018-04-18T05:49:05Z
|
https://github.com/chakra-core/ChakraCore/issues/4997
| 314,903,825 | 4,997 |
[
"chakra-core",
"ChakraCore"
] |
ChakraCore MSVC debug build (x64) currently fails with the following errors/warnings:
```
Severity Code Description Project File Line Suppression State
Error C2065 'ENABLE_VIRTUAL_TERMINAL_PROCESSING': undeclared identifier wabt d:\src\chakracore\lib\wabt\src\color.cc 57
Warning MIDL1007 switch specified more than once on command line : target Chakra.JITIDL D:\src\ChakraCore\lib\JITIDL\midl 1
Error C2660 'SetConsoleMode': function does not take 1 arguments wabt d:\src\chakracore\lib\wabt\src\color.cc 57
Error LNK1181 cannot open input file 'D:\src\ChakraCore\Build\VcBuild\obj\x64_debug\wabt\wabt.lib' ChakraCore D:\src\ChakraCore\bin\ChakraCore\LINK 1
Error LNK1181 cannot open input file 'D:\src\ChakraCore\Build\VcBuild\bin\x64_debug\ChakraCore.lib' NativeTests D:\src\ChakraCore\bin\NativeTests\LINK 1
Error LNK1181 cannot open input file 'D:\src\ChakraCore\Build\VcBuild\bin\x64_debug\ChakraCore.lib' ch D:\src\ChakraCore\bin\ch\LINK 1
```
Release build is fine.
|
Cannot build ChakraCore in debug mode in MSVC
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4991/comments
| 4 |
2018-04-15T14:44:37Z
|
2018-04-18T02:09:47Z
|
https://github.com/chakra-core/ChakraCore/issues/4991
| 314,421,648 | 4,991 |
[
"chakra-core",
"ChakraCore"
] |
......
|
bound proxy - Regression since 1.7
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4989/comments
| 3 |
2018-04-13T23:00:49Z
|
2018-04-17T22:25:46Z
|
https://github.com/chakra-core/ChakraCore/issues/4989
| 314,273,117 | 4,989 |
[
"chakra-core",
"ChakraCore"
] |
Hello everyone,
this is a case of "inconsistent treatment/check of pre-conditions" with long numbers on String.repeat function.
Chakra version: 1.9.0.0
OS: Ubuntu 16.04 x64
Steps to reproduce:
1. Run this code
`print( "foo".repeat(657604378) === "foofoofoo" );`
Expected output:
An exception with an invalid string length (RangeError)
Actual results:
core dumps
V8 and SpiderMonkey raises a `RangeError` and JavascriptCore returns `false`.
cinfuzz
|
core dumps on String.repeat function
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4979/comments
| 5 |
2018-04-12T17:36:04Z
|
2018-08-07T11:49:21Z
|
https://github.com/chakra-core/ChakraCore/issues/4979
| 313,822,356 | 4,979 |
[
"chakra-core",
"ChakraCore"
] |
Hello everyone,
I found a bug that could be one case of "inconsistent treatment/check of pre-conditions" with long negative number.
Chakra version: 1.9.0.0
OS: Ubuntu 16.04 x64
Steps to reproduce:
1. Run this code
```
var buffer = new ArrayBuffer(64);
var view = new DataView(buffer);
view.setInt8(0,0x80);
print(view.getInt8(-1770523502845470856862803727694) === -0x80);
```
Expected output:
An exception with an invalid or out-of-range index
Actual results:
true
V8, SpiderMonkey and JavascriptCore shows expected results. Chakra always returns the value `-128` for a long negative number on getInt8 function, note that converting `-0x80` to decimal value we obtain -128 too.
cinfuzz
|
Inconsistent treatment with long negative number
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4978/comments
| 1 |
2018-04-12T17:20:56Z
|
2018-08-07T11:49:10Z
|
https://github.com/chakra-core/ChakraCore/issues/4978
| 313,817,631 | 4,978 |
[
"chakra-core",
"ChakraCore"
] |
When a legacy, empty, constructor does not explicitly return `this`, usually considered a redundant operation pretty much nobody wrote in ES3 to ES5.1 times, the `super()` call in MS Edge breaks like a charm, considering `undefined` a valid return value for a `super()` call, instead of the current context.
You can [test this in Code Pen](https://codepen.io/WebReflection/pen/pLYBea?editors=0010) or through Edge HTML console.
```js
function OldSchool() {}
function OldSchoolReturn() { return this; }
OldSchool.prototype.method =
OldSchoolReturn.prototype.method = function () {
document.body.appendChild(
document.createElement('p')
).textContent = this.constructor.name;
};
class Shenanigans extends OldSchool {
constructor() {
try { super().method(); }
catch (o_O) { console.error(o_O); }
}
}
class ShenanigansReturn extends OldSchoolReturn {
constructor() {
try { super().method(); }
catch (o_O) { console.error(o_O); }
}
}
new Shenanigans;
new ShenanigansReturn;
```
Thanks for fixing this.
|
super() call breaks when extending legacy classes
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4970/comments
| 2 |
2018-04-11T16:06:06Z
|
2018-04-11T16:46:12Z
|
https://github.com/chakra-core/ChakraCore/issues/4970
| 313,390,392 | 4,970 |
[
"chakra-core",
"ChakraCore"
] |
When running a script that has a line like `throw 'some error';` no additional information seems to be returned in `JavaScriptScriptException`. Its `Error.ValueType` is string, so it's unclear where additional information (stack, line, column) can be extracted from.
Is there a way to find this additional information and basically get the same result as what `throw new Error('some error');` produces?
|
Getting error information from throw 'some error'
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4967/comments
| 6 |
2018-04-11T00:13:35Z
|
2018-10-30T00:44:49Z
|
https://github.com/chakra-core/ChakraCore/issues/4967
| 313,131,174 | 4,967 |
[
"chakra-core",
"ChakraCore"
] |
It seems that clang treat all enum variable as unsigned, so compare unsigned to 0 should always be >=
```
[ 0%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.Singular.dir/shmemory/shmemory.cpp.o
/home/xm1994/ChakraCore/pal/src/shmemory/shmemory.cpp:904:16: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare]
if(element < 0 || element >= SIID_LAST)
~~~~~~~ ^ ~
/home/xm1994/ChakraCore/pal/src/shmemory/shmemory.cpp:946:16: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare]
if(element < 0 || element >= SIID_LAST)
~~~~~~~ ^ ~
2 errors generated.
```
|
Compile failed with build.sh and clang 6.0
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4961/comments
| 5 |
2018-04-10T09:42:27Z
|
2018-04-19T04:59:08Z
|
https://github.com/chakra-core/ChakraCore/issues/4961
| 312,847,315 | 4,961 |
[
"chakra-core",
"ChakraCore"
] |
Hi,
I am hosting a multi-context, single runtime ChakraCore in my C++ application. I provide a "setInterval" method just as in a browser. In my C++ code I hold the reference to the javascript callback combined with the calling context,. I have a single thread which checks whether an interval elapses. When it does, I set the according context as the current one and trigger the JS callback. Unfortunately, when I have multiple short intervals at some point the code raises an "Read Access Violation" exception (most of the time when setting the current context, but also sometimes when doing the callback). There is just this single "timer" thread communicating with the engine.
As what I have seen from the examples, I guess this is the right way to implement a setInterval right? Is there some other obvious things which I haven't done yet do make it work correctly?
|
Hosting: How to prevent Sporadic Read Access Violation
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4960/comments
| 2 |
2018-04-10T09:09:50Z
|
2018-04-12T08:01:34Z
|
https://github.com/chakra-core/ChakraCore/issues/4960
| 312,835,619 | 4,960 |
[
"chakra-core",
"ChakraCore"
] |
This is a better way to achieve what #4954 intends to do.
|
Fold ArgIn0 and LdThis into a single bytecode
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4955/comments
| 0 |
2018-04-09T18:11:54Z
|
2019-06-07T19:00:07Z
|
https://github.com/chakra-core/ChakraCore/issues/4955
| 312,632,253 | 4,955 |
[
"chakra-core",
"ChakraCore"
] |
ChakraCore version: 1.10.0.0-beta
ChakraCore mode: Debug
OS: Ubuntu 16.04.1 LTS, x86_64
```
$ git log | head
commit 9e617e7b52cb474fc8812f9ac3d2c2291ed78410
Merge: dcecda5 7f1ab68
Author: Kyle Farnung <[email protected]>
Date: Sun Apr 8 19:57:11 2018 -0700
[1.9>master] [MERGE #4952 @kfarnung] Set `U_USING_ICU_NAMESPACE` to 0 by default
Merge pull request #4952 from kfarnung:icu61
ICU61 updated the value of `U_USING_ICU_NAMESPACE` to 0 by default. In
$ ./build.sh --debug
$ ./Debug/ch --version
ch version 1.10.0.0-beta
```
POC:
```
$ cat test.js
WScript.LoadScriptFile("test2.js");
function assert() {}
assert.throws = function (a, b) {};
assert.throws(ReferenceError, function() { foo });
let foo;
$ cat test2.js
function foo(){}
```
```
$ gdb -q --args ./Debug/ch test.js
gdb$ r
Starting program: /ChakraCore/out/Debug/ch test.js
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ff7f2229700 (LWP 23091)]
[New Thread 0x7ff7f1a28700 (LWP 23092)]
[New Thread 0x7ff7f1227700 (LWP 23093)]
ASSERTION 23085: (/ChakraCore/lib/Runtime/./Language/InlineCache.inl, line 236) !isRoot || RootObjectBase::FromVar(object)->GetRootPropertyIndex(propertyId) == DynamicObject::FromVar(object)->GetTypeHandler()->InlineOrAuxSlotIndexToPropertyIndex(u.local.slotIndex, false)
Failure: (!isRoot || RootObjectBase::FromVar(object)->GetRootPropertyIndex(propertyId) == DynamicObject::FromVar(object)->GetTypeHandler()->InlineOrAuxSlotIndexToPropertyIndex(u.local.slotIndex, false))
Thread 1 "ch" received signal SIGILL, Illegal instruction.
-----------------------------------------------------------------------------------------------------------------------[regs]
RAX: 0x0000000000000000 RBX: 0x0000000000000000 RBP: 0x00007FFFFFFF8E60 RSP: 0x00007FFFFFFF8C00 o d I t s Z a P c
RDI: 0x00007FFFF49E794C RSI: 0x00007FFFF691B770 RDX: 0x0000000000000000 RCX: 0x00007FFFF49E794C RIP: 0x00007FFFF37EADA8
R8 : 0x00007FFFF691B770 R9 : 0x00007FFFF7FCB740 R10: 0x0000000000000058 R11: 0x00007FFFF65C27A0 R12: 0x000055555555C070
R13: 0x00007FFFFFFFDB50 R14: 0x0000000000000000 R15: 0x0000000000000000
CS: 0033 DS: 0000 ES: 0000 FS: 0000 GS: 0000 SS: 002B
-----------------------------------------------------------------------------------------------------------------------[code]
=> 0x7ffff37eada8 <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2936>: ud2
0x7ffff37eadaa <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2938>: data16 lea rdi,[rip+0x11f6ede] # 0x7ffff49e1c90
0x7ffff37eadb2 <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2946>: data16 data16 call 0x7ffff29d5610 <__tls_get_addr@plt>
0x7ffff37eadba <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2954>: mov DWORD PTR [rax],0x0
0x7ffff37eadc0 <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2960>: jmp 0x7ffff37eadc5 <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2965>
0x7ffff37eadc5 <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2965>: jmp 0x7ffff37eadca <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2970>
0x7ffff37eadca <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2970>: mov rax,QWORD PTR [rbp-0x18]
0x7ffff37eadce <Js::InlineCache::TrySetProperty<true, false, false, false>(Js::RecyclableObject*, int, void*, Js::ScriptContext*, Js::PropertyCacheOperationInfo*, Js::PropertyOperationFlags)+2974>: mov rcx,QWORD PTR [rax]
-----------------------------------------------------------------------------------------------------------------------------
0x00007ffff37eada8 in Js::InlineCache::TrySetProperty<true, false, false, false> (this=0x7ffff7f2df30, object=0x7ffff7ec0000, propertyId=0x2e2, propertyValue=0x7ffff7ec4030, requestContext=0x5555561ae8d8, operationInfo=0x0, propertyOperationFlags=Js::PropertyOperationFlags::PropertyOperation_Root) at /ChakraCore/lib/Runtime/./Language/InlineCache.inl:236
236 Assert(!isRoot || RootObjectBase::FromVar(object)->GetRootPropertyIndex(propertyId) == DynamicObject::FromVar(object)->GetTypeHandler()->InlineOrAuxSlotIndexToPropertyIndex(u.local.slotIndex, false));
gdb$ bt
#0 0x00007ffff37eada8 in Js::InlineCache::TrySetProperty<true, false, false, false> (this=0x7ffff7f2df30, object=0x7ffff7ec0000, propertyId=0x2e2, propertyValue=0x7ffff7ec4030, requestContext=0x5555561ae8d8, operationInfo=0x0, propertyOperationFlags=Js::PropertyOperationFlags::PropertyOperation_Root) at /ChakraCore/lib/Runtime/./Language/InlineCache.inl:236
#1 0x00007ffff37ea1fa in Js::CacheOperators::TrySetProperty<true, false, false, false, false, true, false, false> (object=0x7ffff7ec0000, isRoot=0x1, propertyId=0x2e2, propertyValue=0x7ffff7ec4030, requestContext=0x5555561ae8d8, propertyOperationFlags=Js::PropertyOperationFlags::PropertyOperation_Root, operationInfo=0x0, propertyValueInfo=0x7fffffff8f70) at /ChakraCore/lib/Runtime/./Language/CacheOperators.inl:157
#2 0x00007ffff380359f in Js::InterpreterStackFrame::TrySetPropertyLocalFastPath<Js::OpLayoutT_ElementRootCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > const> (this=0x7fffffffc190, playout=0x7ff7f09e0069, pid=0x2e2, instance=0x7ffff7ec0000, inlineCache=@0x7fffffff9048: 0x7ffff7f2df30, flags=Js::PropertyOperationFlags::PropertyOperation_Root) at /ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:4323
#3 0x00007ffff38042e1 in Js::InterpreterStackFrame::DoInitLetFld<Js::OpLayoutT_ElementRootCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > (this=0x7fffffffc190, playout=0x7ff7f09e0069, instance=0x7ffff7ec0000, flags=Js::PropertyOperationFlags::PropertyOperation_Root) at /ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:4712
#4 0x00007ffff37cf86f in Js::InterpreterStackFrame::OP_InitRootLetFld<Js::OpLayoutT_ElementRootCP<Js::LayoutSizePolicy<(Js::LayoutSize)0> > > (this=0x7fffffffc190, playout=0x7ff7f09e0069) at /ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:4787
#5 0x00007ffff368fba7 in Js::InterpreterStackFrame::ProcessProfiled (this=0x7fffffffc190) at /ChakraCore/lib/Runtime/Language/InterpreterHandler.inl:209
#6 0x00007ffff361dcad in Js::InterpreterStackFrame::Process (this=0x7fffffffc190) at /ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:3251
#7 0x00007ffff361c9d9 in Js::InterpreterStackFrame::InterpreterHelper (function=0x7ffff7e642a0, args=..., returnAddress=0x7ff7f09c0fa2, addressOfReturnAddress=0x7fffffffc6d8, asmJsReturn=0x0) at /ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1946
#8 0x00007ffff361bb9b in Js::InterpreterStackFrame::InterpreterThunk (layout=0x7fffffffc6f0) at /ChakraCore/lib/Runtime/Language/InterpreterStackFrame.cpp:1658
#9 0x00007ff7f09c0fa2 in ?? ()
#10 0x00007fffffffc700 in ?? ()
#11 0x00007ffff3ca396e in amd64_CallFunction () at /ChakraCore/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100
Backtrace stopped: frame did not save the PC
```
|
ChakraCore crashes with assertion failure in InlineCache.inl
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4953/comments
| 4 |
2018-04-09T15:43:54Z
|
2018-05-01T22:41:15Z
|
https://github.com/chakra-core/ChakraCore/issues/4953
| 312,583,501 | 4,953 |
[
"chakra-core",
"ChakraCore"
] |
Hello everyone,
I'm testing some JS engines and I found this inconsistency when getting the name property without function name defined.
Chakra version: 1.9.0.0
OS: Ubuntu 16.04
Steps to reproduce
1. Run this code:
```
let foo = function() {};
let bar = function baz() {};
print(foo.name);
print(bar.name);
```
Expected output
```
foo
baz
```
Actual output
```
baz
```
V8, SpiderMonkey and JavascriptCore prints the expected values.
cinfuzz
|
Get name property with empty function name
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4951/comments
| 5 |
2018-04-09T00:20:14Z
|
2020-03-25T17:12:30Z
|
https://github.com/chakra-core/ChakraCore/issues/4951
| 312,356,259 | 4,951 |
[
"chakra-core",
"ChakraCore"
] |
Error Details:
Activity ID69a92aeb-0f68-4906-c5db-c965e1fd6f16
Request IDa4b98965-1797-5319-d3ed-1701c8ac76cc
Correlation IDcb7af31b-5bb7-f696-d17b-c45ba618eeac
Status code500
TimeSun Apr 08 2018 20:04:35 GMT+0530 (India Standard Time)
Version13.0.4898.201
Cluster URIhttps://wabi-us-north-central-redirect.analysis.windows.net
|
Issue in loading data
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4950/comments
| 2 |
2018-04-08T14:49:44Z
|
2018-04-11T23:11:55Z
|
https://github.com/chakra-core/ChakraCore/issues/4950
| 312,311,836 | 4,950 |
[
"chakra-core",
"ChakraCore"
] |
I'm having a bizarre issue where `JsDiagGetStackTrace()` returns an empty trace even when there's something on the stack. This only seems to happen on Linux and what's very strange is that it appears to depend on optimization settings; I can't reproduce it in an unoptimized build at all (this being strange because ChakraCore itself is a fully optimized shared-library build in all cases, so the optimization settings of the host shouldn't matter).
To verify there was indeed something on the stack, I gave my debugger the following code:
```js
function doStuff()
{
print("Checkpoint 1");
debugger;
print("Checkpoint 2");
}
doStuff();
```
Running this code, execution pauses at the debugger statement but the backtrace is completely empty--and remains empty even as I step through the remainder of the code.
To rule out that this isn't a bug in one of my abstractions, I added some instrumentation at the point I actually retrieve the stack:
```
if (JsDiagGetStackTrace(&backtrace) != JsNoError)
return false;
JsPropertyIdRef propId;
JsValueRef propValue;
int length;
JsCreatePropertyId("length", 6, &propId);
JsGetProperty(backtrace, propId, &propValue);
JsGetValueType(propValue, &type);
JsNumberToInt(propValue, &length);
printf("%d: %d\n", type, length);
```
The output was `2: 0` (`2` being JsNumber); so it seems that I've indeed been handed back a zero-length array. If I recompile the host with `-g` instead of an optimization flag, this same code prints `2: 2` upon hitting the debugger statement. It's very, very strange.
|
JsDiagGetStackTrace returns empty array when stack is not empty
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4944/comments
| 6 |
2018-04-06T14:59:23Z
|
2018-06-27T03:49:06Z
|
https://github.com/chakra-core/ChakraCore/issues/4944
| 312,008,859 | 4,944 |
[
"chakra-core",
"ChakraCore"
] |
The string "fatal" in these symbols triggers !analyze to skip these frames when looking for blame frames. We should choose new names that do not include "fatal" to play nice with !analyze.
|
Rename MarkStack_OOM_fatal_error and OutOfMemory_fatal_error
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4927/comments
| 3 |
2018-04-03T15:35:22Z
|
2018-04-23T20:47:08Z
|
https://github.com/chakra-core/ChakraCore/issues/4927
| 310,888,558 | 4,927 |
[
"chakra-core",
"ChakraCore"
] |
The simplest of microbenchmarks for proof:
```js
const start = Date.now();
let result = 0;
for (var i = 0; i < 1e5; ++i) {
result -= "a".localeCompare("A");
}
const end = Date.now();
print(`Elapsed: ${end - start}, result: ${result}`);
```
This takes ~22ms in WinGlob and ~100ms in ICU on my machine using jshost.exe x64_test_pogo.
For a real world case, this 4x regression is visible in a 70% regression in JetStream's CDjs benchmark, which uses localeCompare for comparing nodes in a particularly hot red-black tree.
|
Intl-ICU: String.prototype.localeCompare(other) is 4x slower than with WinGlob
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4921/comments
| 2 |
2018-04-02T21:11:03Z
|
2018-04-04T17:13:30Z
|
https://github.com/chakra-core/ChakraCore/issues/4921
| 310,612,930 | 4,921 |
[
"chakra-core",
"ChakraCore"
] |
Example:
Open this in Edge, you will see an error in console
Fiddle: https://jsfiddle.net/c8rfL49t/4/
`
function getHelloFn() {
const helloFn = ((cacheAccessor2, { name = "foo" }) => {
});
return helloFn;
}
`
Version: Microsoft Edge 41.16299.248.0
Same works fine in other browsers (Chrome, Firefox, IE11)
|
Error SCRIPT1003: Expected ':' This is when object deconstruction is used with default values as a function parameter
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4919/comments
| 4 |
2018-04-02T17:15:10Z
|
2018-05-18T18:09:49Z
|
https://github.com/chakra-core/ChakraCore/issues/4919
| 310,544,491 | 4,919 |
[
"chakra-core",
"ChakraCore"
] |
The following test case throws `TypeError: 'newTarget' is not a constructor`.
```javascript
body() {
let constructionCount = 0;
function a(arg1, arg2) {
this[arg1] = arg2;
}
const b = new Proxy(a, {
construct: function (x, y, z) {
++constructionCount;
return Reflect.construct(x, y, z);
}
});
const boundObject = {};
const c = b.bind(boundObject, "prop-name");
{
const obj = new c("prop-value");
assert.areNotEqual(boundObject, obj, "bound function should ignore bound this when constructing");
assert.areEqual("prop-value", obj["prop-name"], "bound function should keep bound arguments when constructing");
assert.areEqual(1, constructionCount, "bound proxy should be constructed once");
assert.areEqual(a.prototype, obj.__proto__, "constructed object should be instance of original function");
}
{
constructionCount = 0;
class newTarget {}
const obj = Reflect.construct(c, ["prop-value-2"], newTarget);
assert.areEqual(newTarget.prototype, obj.__proto__, "bound function should use explicit newTarget if provided");
assert.areEqual("prop-value-2", obj["prop-name"], "bound function should keep bound arguments when constructing");
assert.areEqual(1, constructionCount, "bound proxy should be constructed once");
assert.areEqual(newTarget.prototype, obj.__proto__, "constructed object should be instance of original function");
}
}
```
|
exception when attempting to construct bound proxy
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4918/comments
| 2 |
2018-04-02T16:52:48Z
|
2018-05-16T18:18:01Z
|
https://github.com/chakra-core/ChakraCore/issues/4918
| 310,538,267 | 4,918 |
[
"chakra-core",
"ChakraCore"
] |
Hi,
I hope this is the right place to ask this question, I am trying to implement Array/Map like object, but I can't find how to set Indexed/Named Property getter /setter callback or something similar to that. JsDefineProperty doesn't look very useful in my case.
For example if I have:
var obj = new MyCppObject();
obj[3] = 4; <- I want to intercept this and run my c++ code.
obj["newProp"] = 4 <- and this too (where newProp is not part of my object prototype)
Can anyone share what is the best way to achieve this with public API. I can use js Proxy object, but looks like very poor decision.
|
Indexed/Named property API
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4904/comments
| 3 |
2018-03-29T16:09:52Z
|
2018-05-31T19:48:19Z
|
https://github.com/chakra-core/ChakraCore/issues/4904
| 309,815,494 | 4,904 |
[
"chakra-core",
"ChakraCore"
] |
My Edge easily getting stuck when open several pages with a high CPU consuming. i can still select different page but no page can respond my operation anymore.
Edge might back online with a loooooong time wait.
<img width="1015" alt="pic" src="https://user-images.githubusercontent.com/12831220/38092922-1f5f4186-339c-11e8-9792-2b5f7c734de9.png">
OS: Surface Laptop & Win10 Pro
|
Edge getting stuck now and then.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4903/comments
| 2 |
2018-03-29T14:03:20Z
|
2018-04-01T02:43:25Z
|
https://github.com/chakra-core/ChakraCore/issues/4903
| 309,767,482 | 4,903 |
[
"chakra-core",
"ChakraCore"
] |
Chakra failed with error C3861 when build with permissive- on Windows, I use latest source on master branch. Could you please help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.
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 x86 prompt and browse to D:\Chakra\src
3. set CL=-wd4471 /permissive-
4. msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.16299.0 Build\Chakra.Core.sln /t:Rebuild
Failure like:
"D:\Chakra\src\Build\Chakra.Core.sln" (Rebuild target) (1) ->
"D:\Chakra\src\Build\..\bin\ChakraCore\ChakraCore.vcxproj.metaproj" (Rebuild target) (2) ->
"D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj" (Rebuild target) (6) ->
d:\chakra\src\lib\common\datastructures\basedictionary.h(1452,33): error C3861: 'ValueToKey': identifier not found [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1452,33): error C3861: return __super::Add(ValueToKey<TKey, TElement>::ToKey(element), element); [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1452,33): error C3861: ^ [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1458,36): error C3861: 'ValueToKey': identifier not found [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1458,36): error C3861: return __super::AddNew(ValueToKey<TKey, TElement>::ToKey(element), element); [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1458,36): error C3861: ^ [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1463,34): error C3861: 'ValueToKey': identifier not found [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1463,34): error C3861: return __super::Item(ValueToKey<TKey, TElement>::ToKey(element), element); [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1463,34): error C3861: ^ [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1491,32): error C3861: 'ValueToKey': identifier not found [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1491,32): error C3861: return ContainsKey(ValueToKey<TKey, TElement>::ToKey(element)); [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1491,32): error C3861: ^ [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1505,36): error C3861: 'ValueToKey': identifier not found [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1505,36): error C3861: return __super::Remove(ValueToKey<TKey, TElement>::ToKey(element)); [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
d:\chakra\src\lib\common\datastructures\basedictionary.h(1505,36): error C3861: ^ [D:\Chakra\src\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj]
"D:\Chakra\src\Build\Chakra.Core.sln" (Rebuild target) (1) ->
"D:\Chakra\src\Build\..\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj.metaproj" (Rebuild target) (10) ->
"D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj" (Rebuild target) (11) ->
d:\chakra\src\lib\common\datastructures\dictionaryentry.h(85,17): error C3861: 'ClearValue': identifier not found [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\dictionaryentry.h(85,17): error C3861: ClearValue<TValue>::Clear(&this->value); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\dictionaryentry.h(85,17): error C3861: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\dictionaryentry.h(98,39): error C3861: 'ValueToKey': identifier not found [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\dictionaryentry.h(98,39): error C3861: TKey Key() const { return ValueToKey<TKey, TValue>::ToKey(this->value); } [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\dictionaryentry.h(98,39): error C3861: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\smallheapblockallocator.h(72,51): error C2039: 'IsConcurrentSweepState': is not a member of 'Memory::Recycler' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\smallheapblockallocator.h(72,51): error C2039: return IsFreeListAllocMode() && recycler->IsConcurrentSweepState(); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\smallheapblockallocator.h(72,51): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(90,33): error C2039: 'CreateWeakReferenceHandle': is not a member of 'Memory::Recycler' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(90,33): error C2039: weakRef = recycler->CreateWeakReferenceHandle((T*)this); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(90,33): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(355,47): error C2039: 'FindHeapBlock': is not a member of 'Memory::Recycler' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(355,47): error C2039: entry->strongRefHeapBlock = recycler->FindHeapBlock(strongReference); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(355,47): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(358,50): error C2039: 'FindHeapBlock': is not a member of 'Memory::Recycler' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(358,50): error C2039: HeapBlock * weakRefHeapBlock = recycler->FindHeapBlock(entry); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\memory\recyclerweakreference.h(358,50): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\weakreferencedictionary.h(232,20): error C3861: 'values': identifier not found [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\weakreferencedictionary.h(232,20): error C3861: return values[i]; [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\weakreferencedictionary.h(232,20): error C3861: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\weakreferencedictionary.h(239,20): error C3861: 'values': identifier not found [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\weakreferencedictionary.h(239,20): error C3861: return values[i]; [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\common\datastructures\weakreferencedictionary.h(239,20): error C3861: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\parser\scan.h(670,17): error C2065: 'ULongMult': undeclared identifier [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\parser\scan.h(670,17): error C2065: if (FAILED(ULongMult(m_cchMax, sizeof(OLECHAR) * 2, &cbNew))) [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\parser\scan.h(670,17): error C2065: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\parser\scan.h(670,17): error C3861: 'ULongMult': identifier not found [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\parser\scan.h(670,17): error C3861: if (FAILED(ULongMult(m_cchMax, sizeof(OLECHAR) * 2, &cbNew))) [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\parser\scan.h(670,17): error C3861: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(139,18): error C2039: 'GetPropertyRecord': is not a member of 'Js::JavascriptString' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(139,18): error C2039: str->GetPropertyRecord(&propRecord); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(139,18): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(143,36): error C2039: 'GetString': is not a member of 'Js::JavascriptString' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(143,36): error C2039: return Equals(str->GetString(), str->GetLength()); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(143,36): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(143,54): error C2039: 'GetLength': is not a member of 'Js::JavascriptString' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(143,54): error C2039: return Equals(str->GetString(), str->GetLength()); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\propertyrecord.h(143,54): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\crosssite.h(29,41): error C3861: 'CrossSiteObject': identifier not found [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\crosssite.h(29,41): error C3861: BOOL ret = VirtualTableInfo<CrossSiteObject<T>>::HasVirtualTable(obj); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\crosssite.h(29,41): error C3861: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\inlinecache.h(412,62): error C2039: 'GetLibrary': is not a member of 'Js::ScriptContext' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\inlinecache.h(412,62): error C2039: *propertyValue = IsMissing ? requestContext->GetLibrary()->GetFalse() : requestContext->GetLibrary()->GetTrue(); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\inlinecache.h(412,62): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\inlinecache.h(412,105): error C2039: 'GetLibrary': is not a member of 'Js::ScriptContext' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\inlinecache.h(412,105): error C2039: *propertyValue = IsMissing ? requestContext->GetLibrary()->GetFalse() : requestContext->GetLibrary()->GetTrue(); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\inlinecache.h(412,105): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\functionbody.h(3470,20): error C3861: 'GetSlot': identifier not found [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\functionbody.h(3470,20): error C3861: fn(GetSlot[i]); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\base\functionbody.h(3470,20): error C3861: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\prototypechaincache.h(197,28): error C2039: 'InvalidateStoreFieldCaches': is not a member of 'Js::ScriptContext' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\prototypechaincache.h(197,28): error C2039: scriptContext->InvalidateStoreFieldCaches(propertyId); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\language\prototypechaincache.h(197,28): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(66,28): error C2039: 'FindPropertyRecord': is not a member of 'Js::ScriptContext' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(66,28): error C2039: scriptContext->FindPropertyRecord(value, N - 1, &propertyRecord); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(66,28): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(69,35): error C2039: 'GetPropertyString': is not a member of 'Js::ScriptContext' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(69,35): error C2039: return scriptContext->GetPropertyString(propertyRecord->GetPropertyId()); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(69,35): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(73,120): error C2039: 'GetRecycler': is not a member of 'Js::ScriptContext' [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(73,120): error C2039: return LiteralString::New(stringTypeStatic, value, N - 1 /*don't include terminating NUL*/, scriptContext->GetRecycler()); [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
d:\chakra\src\lib\runtime\library\stringcache.h(73,120): error C2039: ^ [D:\Chakra\src\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj]
|
Chakra failed to build with MSVC + permissive- on windows
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4902/comments
| 2 |
2018-03-29T10:26:54Z
|
2018-08-24T09:22:19Z
|
https://github.com/chakra-core/ChakraCore/issues/4902
| 309,701,795 | 4,902 |
[
"chakra-core",
"ChakraCore"
] |
I'm running ChakraCore in an ASP.NET core app, using the JavascriptEngineSwitcher.(https://github.com/Taritsyn/JavaScriptEngineSwitcher).
I have managed to reproduce the error on my local machine running in a Linux Docker container.
The error crashes the process with the following output:
```
Process is terminating due to StackOverflowException.
*** stack smashing detected ***: dotnet terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7f699ad8fbfb]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f699ae181f7]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x0)[0x7f699ae181c0]
/web.api/code/WebApi/bin/Debug/netcoreapp2.0/publish/runtimes/linux-x64/native/libChakraCore.so(+0x17eda2)[0x7f66bcb19da2]
```
I am instantiating a single instance of the JS engine and actually the process crashes before I make use of it. After instantiating the engine I'm loading quite a large amount of data into memory before throwing an exception.
The process seems to crash at the point that the c# exception is raised. The exception would normally be caught but unfortunately this bug is bringing down the application before reaching that point. If I remove the JS engine code then I don't run into any problems.
Can anyone suggest how I can attempt to debug this error?
Thanks,
Stuart
|
Process is terminating due to StackOverflowException.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4893/comments
| 3 |
2018-03-28T19:55:37Z
|
2018-05-07T23:56:22Z
|
https://github.com/chakra-core/ChakraCore/issues/4893
| 309,508,561 | 4,893 |
[
"chakra-core",
"ChakraCore"
] |
Currently, formatting to parts with these calendars has a few issues
1) The "year" field is returned as "wu-xu", which is different from Firefox ~60, which returned 35. This may or may not actually be an issue
2) The first part returned is { type: "unknown", value: "2018" } because the ICU type returned in the field position iterator is a UDAT_RELATED_YEAR_TYPE, which is an internal type (Should ICU be returning this at all? The enum value isn't even exposed in Windows Kit ICU, thanks to it being an internal field)
3) The formatted string is "2018(wu-xu)", but the parts only reconstruct to "2018(wu-xu" because we don't account for literals at the end of the string
/cc @dilijev , @jefgen
|
Update Intl.DateTimeFormat to use relatedYear
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4885/comments
| 7 |
2018-03-27T23:46:36Z
|
2019-06-07T18:37:08Z
|
https://github.com/chakra-core/ChakraCore/issues/4885
| 309,172,358 | 4,885 |
[
"chakra-core",
"ChakraCore"
] |
Trying to access `https://aka.ms/chakracore/install` gives an error:
```
<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:...
Time:...</Message><AuthenticationErrorDetail>Signature did not match. String to sign used was r
2017-02-22T15:31:00Z
2050-01-01T00:01:00Z
/file/chakratestx/chakrashare/share/install_ch.sh
2015-12-11
</AuthenticationErrorDetail></Error>
```
|
ChakraCore binary install script is inaccessible
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4883/comments
| 7 |
2018-03-27T20:44:39Z
|
2018-03-28T00:53:34Z
|
https://github.com/chakra-core/ChakraCore/issues/4883
| 309,126,855 | 4,883 |
[
"chakra-core",
"ChakraCore"
] |
Hi,
I hope this is the right place to ask this question, but anyways: I created a lot of contexts via the JSRT API and I am wondering how the memory and resources allocated for that context gets cleaned up. The JSRT API doesn't have anything like clear context. Is the context garbage collected?
Thanks for the answer...
|
Clearing a context via JSRT API
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4875/comments
| 3 |
2018-03-26T12:32:07Z
|
2018-04-03T17:09:54Z
|
https://github.com/chakra-core/ChakraCore/issues/4875
| 308,552,444 | 4,875 |
[
"chakra-core",
"ChakraCore"
] |
I found this commit, where some JIT mitigations were added for Spectre:
https://github.com/Microsoft/ChakraCore/commit/08b82b8d33e9b36c0d6628b856f280234c87ba13
I'm interested in understanding, practically, what these changes protect against and don't protect against. Is there any writeup or description anywhere explaining the mitigations that have been added? Are there any other mitigations related to Meltdown/Spectre that have been added but are not included in this commit?
Thanks,
Chris
|
What mitigations have been added for Spectre/Meltdown
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4859/comments
| 9 |
2018-03-22T11:56:22Z
|
2018-05-31T19:48:13Z
|
https://github.com/chakra-core/ChakraCore/issues/4859
| 307,612,810 | 4,859 |
[
"chakra-core",
"ChakraCore"
] |
Chakra failed with error error C4596: '{ctor}': illegal qualified name in member declaration when build with permissive- on Windows, I use latest source on master branch. Could you please help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.
**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 x86 prompt (C:\windows\syswow64\cmd.exe) and browse to D:\Chakra\src
3. set _CL_=-wd4471 /permissive-
4. msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.16299.0 Build\Chakra.Core.sln /t:Rebuild
**Error info:**
D:\Chakra\src\lib\Runtime\PlatformAgnostic\Platform\Windows\HiResTimer.cpp(25): error C4596: '{ctor}': illegal qualified name in member declaration
D:\Chakra\src\lib\Runtime\PlatformAgnostic\Platform\Windows\HiResTimer.cpp(71): error C4596: 'QuantizedQPC': illegal qualified name in member declaration
|
Chakra failed with error C4596 when build with permissive- + MSVC on windows.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4849/comments
| 3 |
2018-03-21T09:42:25Z
|
2018-07-18T23:44:09Z
|
https://github.com/chakra-core/ChakraCore/issues/4849
| 307,174,369 | 4,849 |
[
"chakra-core",
"ChakraCore"
] |
Chakra failed with error error C2760: syntax error: unexpected token 'char', expected 'expression' and error C7510: 'Tick': use of dependent type name must be prefixed with 'typename' when build with permissive- on Windows, I use latest source on master branch. Could you please help take a look at this? Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.
**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 x86 prompt (C:\windows\syswow64\cmd.exe) and browse to D:\Chakra\src
3. set _CL_=-wd4471 /permissive-
4. msbuild /m /p:Platform=x86 /p:Configuration=Test /p:WindowsTargetPlatformVersion=10.0.16299.0 Build\Chakra.Core.sln /t:Rebuild
**Error info:**
d:\chakra\src\lib\common\Memory/SmallHeapBlockAllocator.h(146): error C2760: syntax error: unexpected token 'char', expected 'expression'
d:\chakra\src\lib\common\Memory/SmallHeapBlockAllocator.h(146): note: This diagnostic occurred in the compiler generated function 'char *Memory::SmallHeapBlockAllocator<TBlockType>::InlinedAllocImpl(Memory::Recycler *,size_t,Memory::ObjectInfoBits)'
Jobs.i
D:\Chakra\src\lib\Common\Common/Jobs.inl(121): error C2760: syntax error: unexpected token 'identifier', expected ';'
D:\Chakra\src\lib\Common\Common/Jobs.inl(121): note: This diagnostic occurred in the compiler generated function 'void JsUtil::ForegroundJobProcessor::PrioritizeManagerAndWait(TJobManager *const ,const unsigned int)'
D:\Chakra\src\lib\Common\Common/Jobs.inl(121): error C7510: 'Tick': use of dependent type name must be prefixed with 'typename'
D:\Chakra\src\lib\Common\Common/Jobs.inl(121): note: This diagnostic occurred in the compiler generated function 'void JsUtil::ForegroundJobProcessor::PrioritizeManagerAndWait(TJobManager *const ,const unsigned int)'
D:\Chakra\src\lib\Common\Common/Jobs.inl(260): error C2760: syntax error: unexpected token 'identifier', expected ';'
D:\Chakra\src\lib\Common\Common/Jobs.inl(260): note: This diagnostic occurred in the compiler generated function 'void JsUtil::BackgroundJobProcessor::PrioritizeManagerAndWait(TJobManager *const ,const unsigned int)'
D:\Chakra\src\lib\Common\Common/Jobs.inl(260): error C7510: 'Tick': use of dependent type name must be prefixed with 'typename'
D:\Chakra\src\lib\Common\Common/Jobs.inl(260): note: This diagnostic occurred in the compiler generated function 'void JsUtil::BackgroundJobProcessor::PrioritizeManagerAndWait(TJobManager *const ,const unsigned int)'
|
Chakra failed when build with permissive- + MSVC on windows.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4848/comments
| 2 |
2018-03-21T09:38:47Z
|
2019-11-26T08:19:24Z
|
https://github.com/chakra-core/ChakraCore/issues/4848
| 307,173,309 | 4,848 |
[
"chakra-core",
"ChakraCore"
] |
These tests are never run because they require an explicit, opt-in build configuration.
|
Move PlatformAgnostic::UnicodeText::LogicalStringCompare tests to native tests
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4844/comments
| 7 |
2018-03-19T19:07:22Z
|
2018-05-07T22:39:04Z
|
https://github.com/chakra-core/ChakraCore/issues/4844
| 306,594,222 | 4,844 |
[
"chakra-core",
"ChakraCore"
] |
These functions will fail if strings have embedded null characters.
|
Convert PlatformAgnostic::UnicodeText::LogicalStringCompare to take explicit buffer lengths
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4843/comments
| 0 |
2018-03-19T19:05:43Z
|
2018-07-19T20:30:41Z
|
https://github.com/chakra-core/ChakraCore/issues/4843
| 306,593,639 | 4,843 |
[
"chakra-core",
"ChakraCore"
] |
Including but not limited to
CompareStringW => CompareStringEx
GetDateFormatW => GetDateFormatEx
GetLocaleInfoW => GetLocaleInfoEx
GetTimeFormat => GetTimeFormatEx
GetUserDefaultLCID => GetUserDefaultLocaleName
LCMapStringW => LCMapStringEx
|
Investigate usage of legacy Win32 functions, move to PlatformAgnostic as necessary
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4842/comments
| 0 |
2018-03-19T19:02:44Z
|
2018-05-07T22:30:41Z
|
https://github.com/chakra-core/ChakraCore/issues/4842
| 306,592,394 | 4,842 |
[
"chakra-core",
"ChakraCore"
] |
Convert JavascriptString::EntryLocaleCompare to use PlatformAgnostic::UnicodeText::LogicalCompareString when Intl is not enabled
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4841/comments
| 0 |
2018-03-19T18:59:54Z
|
2018-07-19T20:30:41Z
|
https://github.com/chakra-core/ChakraCore/issues/4841
| 306,591,397 | 4,841 |
|
[
"chakra-core",
"ChakraCore"
] |
Currently, Array.prototype.toLocaleString() uses ", " as the separator in every locale on xplat. This should probably be factored into a new PlatformAgnostic::Arrays module similar to PlatformAgnostic::Numbers.
|
Implement JavascriptArray::GetLocaleSeparator for Linux/macOS
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4840/comments
| 2 |
2018-03-19T18:50:49Z
|
2018-06-28T15:41:15Z
|
https://github.com/chakra-core/ChakraCore/issues/4840
| 306,587,978 | 4,840 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
This is more question rather than issue. If I call JsCreateExternalObject twice, pass same pointer to data argument and set same prototype, JsEqual and operator == at JS runtime for created objects will always return false. I know, you may say "what do you expect, these are physically different objects!" Yes, I partially agree. But from other side, these are different projection wrappers to same core object, they have same prototype and even you can call JsPreventExtension to prevent any data binding at JS runtime. So everything is same except memory block that holds this data and GC state.
Suppose you want to create JS projection to large C++ object model. Sometimes you may have different interfaces which may return pointer to same object in their methods. You wrap these objects with projection wrappers and return to JS script. In this case JS script will not have way to check whether these objects are the same. The only way to archive this - keep map of alive JS objects and return existing projection wrapper instead of creating new. From my look this is expensive lookup considering fact that JS script may not even attempt to compare these object, because it doesn't require this. it will also require expensive locks in multithreaded environment.
So is that mapping is the only way to solve the problem? Are you going to add some API?
Thanks.
|
Compare objects created using JsCreateExternalObject at JS runtime.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4839/comments
| 4 |
2018-03-18T12:10:07Z
|
2018-05-31T19:46:38Z
|
https://github.com/chakra-core/ChakraCore/issues/4839
| 306,234,780 | 4,839 |
[
"chakra-core",
"ChakraCore"
] |
We make heavy use of properties identified by `Symbol`, but on Edge it appears such properties are unable to invoke a property getter on `super`.
```
const prop = Symbol('prop');
class A {
// A property identified by a Symbol.
get [prop]() {
return this;
}
}
class B extends A {
get [prop]() {
// This should be `this`, but is undefined.
return super[prop];
}
}
```
See https://codepen.io/JanMiksovsky/pen/OvRXXN?editors=0011. That works in Chrome, Safari, and Firefox, but not Edge.
|
Property getters identified by Symbol can't invoke super
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4835/comments
| 6 |
2018-03-16T18:15:41Z
|
2018-10-17T18:07:36Z
|
https://github.com/chakra-core/ChakraCore/issues/4835
| 306,029,255 | 4,835 |
[
"chakra-core",
"ChakraCore"
] |
Running the following in ch will print `false` rather than `true` as expected:
```js
function testreturner(){
return function test(){};
}
var t = testreturner();
Object.defineProperty(t, "a", {value: 1});
var t2 = testreturner();
var o = {};
Object.setPrototypeOf(t2, o);
Object.defineProperty(t2, "b", {value: 1});
WScript.Echo(o === t2.__proto__);
```
Looks like this might have been introduced by f3c5f9f215
|
Undeferring a deferred function type handler can change its prototype
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4829/comments
| 2 |
2018-03-15T18:39:26Z
|
2018-03-23T23:29:03Z
|
https://github.com/chakra-core/ChakraCore/issues/4829
| 305,673,700 | 4,829 |
[
"chakra-core",
"ChakraCore"
] |
The JSRT method `JsSerialize` accepts either `ExternalArrayBuffer`s or `JavascriptString`s, which can be encoded in utf8 or utf16. If it is given a `JavascriptString`, then it will incorrectly use the string length (that is, number of characters) as the number of bytes, leading to issues. It also looks like it tries to support utf8 strings, but (until another PR lands) all javascript strings will be utf16 encoded, so that looks suspect as well.
|
JsSerialize miscalculates script size if passed a JavascriptString
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4824/comments
| 0 |
2018-03-14T22:17:21Z
|
2018-03-29T16:00:15Z
|
https://github.com/chakra-core/ChakraCore/issues/4824
| 305,348,920 | 4,824 |
[
"chakra-core",
"ChakraCore"
] |
Hi, I'm occasionally seeing segfaults when running our unit tests which embed ChakraCore. I don't have a Chakra build with debug symbols in it, unfortunately, but managed to catch it in LLDB:
```
Process 92371 stopped
* thread #3, stop reason = EXC_BAD_ACCESS (code=2, address=0x80280c068)
frame #0: 0x000000010035413f chakbox_tests`Memory::RecyclerWriteBarrierManager::WriteBarrier(void*) + 15
chakbox_tests`Memory::RecyclerWriteBarrierManager::WriteBarrier:
-> 0x10035413f <+15>: orb $0x1, (%rax,%rdi)
0x100354143 <+19>: popq %rbp
0x100354144 <+20>: retq
0x100354145 <+21>: nopw %cs:(%rax,%rax)
```
This happens only rarely, and less frequently when run under a debugger, which very much looks like a race condition. We hit this when invoking `JsSerialize`:
```
(lldb) bt
* thread #3, stop reason = EXC_BAD_ACCESS (code=2, address=0x80280c068)
* frame #0: 0x000000010035413f chakbox_tests`Memory::RecyclerWriteBarrierManager::WriteBarrier(void*) + 15
frame #1: 0x000000010014dedc chakbox_tests`JsSerializeScriptCore(unsigned char const*, unsigned long, LoadScriptFlag, unsigned char*, int, unsigned char*, unsigned int*, void*) + 236
frame #2: 0x000000010015132e chakbox_tests`JsSerialize + 206
...
```
Register values:
```
(lldb) register read
General Purpose Registers:
rax = 0x0000000102800000
rbx = 0x000000000001000f
rcx = 0x0000000101401b00
rdx = 0x0000000000000000
rdi = 0x000000070000c068
rsi = 0xffffffffffffffff
rbp = 0x000070000c068b20
rsp = 0x000070000c068b20
r8 = 0x00000001017752c0
r9 = 0x0000000000000000
r10 = 0x0000000000000001
r11 = 0x0000000000000012
r12 = 0x00000009033005e0
r13 = 0x0000000000000140
r14 = 0x0000000000000000
r15 = 0x0000000000000108
rip = 0x000000010035413f chakbox_tests`Memory::RecyclerWriteBarrierManager::WriteBarrier(void*) + 15
rflags = 0x0000000000010203
cs = 0x000000000000002b
fs = 0x0000000000000000
gs = 0x0000000000000000
```
I just observed this on a local dev build, built with clang on macOS Sierra. Compiler versions are:
```
> clang++ --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```
I'm happy to provide any more information that might be helpful here.
|
Segfault in RecyclerWriteBarrierManager
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4822/comments
| 21 |
2018-03-14T20:38:06Z
|
2019-05-31T18:36:36Z
|
https://github.com/chakra-core/ChakraCore/issues/4822
| 305,319,575 | 4,822 |
[
"chakra-core",
"ChakraCore"
] |
Hello,
I would like to kindly request for adding support for handling scripts which use [commonJS modules](http://wiki.commonjs.org/wiki/Modules/1.1.1).
I like the current module API with the asynchronous callback when the module is ready, it would be great if this will be extended with commonJS syntax.
Some background: currently I'm trying to use JS script, which uses commonJS modules, from the native application (written in C++) with bundled ChakraCore library in version 1.8.1 (I'm using the official nuget).
My goal is to call specific functions from the script. As module.exports is not supported in the ChakraCore I've tried to access the global object, get its parameters (in this case the function which I'm interested in). Then prepare arguments and use function reference to execute it.
Unfortunately, during invoking `JsCallFunction` I'm receiving an exception with a well-known access violation (0xC0000005).
**The question is**: does usage of a script with module.exports can cause undefined behavior? Is working on a solution with global object worth trying?
The code is simple, I'm inserting a PoC function, result checks are removed for readability purposes but all functions are returning JsNoError (0).
Code snippet:
```
void jsTest(const std::string & defJson, const std::string & fsItem)
{
JsRuntimeHandle runtime;
JsContextRef context;
unsigned currentSourceContext = 0;
JsValueRef scriptResult;
JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime);
JsCreateContext(runtime, &context);
JsSetCurrentContext(context);
JsRunScript(script.c_str(), currentSourceContext++, L"", &scriptResult);
// script is saved in string variable, JsRunScript doesn't return error code
JsValueRef uicObject;
JsGetGlobalObject(&uicObject);
JsPropertyIdRef propId;
JsGetPropertyIdFromName(L"ScriptObj", &propId);
JsValueRef objRef;
JsGetProperty(uicObject, propId, &objRef);
bool hasProperty = false;
jsErr = JsHasProperty(uicObject, propId, &hasProperty); // property is found
// Internal property of property got above:
JsPropertyIdRef propInside;
jsErr = JsGetPropertyIdFromName(L"ObjectsFunctionName", &propInside); // name of the function to execute
JsValueRef functionRef;
jsErr = JsGetProperty(objRef, propInside, &functionRef);
JsHasProperty(uicObject, propId, &hasProperty); // function ref found
JsValueRef defJsStr;
jsErr = JsCreateString(defJson.c_str(), defJson.length(), &defJsStr); // string length: 10897 B
JsValueRef fsItemJsStr;
jsErr = JsCreateString(fsItem.c_str(), fsItem.length(), &fsItemJsStr); // string length: 128 B
JsValueRef argsArray;
unsigned short argCount = 3;
jsErr = JsCreateArray(argCount, &argsArray);
if (jsErr == JsNoError) {
JsValueRef valueHolder;
for (int argIndex = 0; argIndex < argCount; ++argIndex) {
switch (argIndex) {
case 0:
valueHolder = objRef;
break;
case 1:
valueHolder = defJsStr;
break;
case 2:
valueHolder = fsItemJsStr;
break;
default:
break;
}
JsValueRef jsIndex;
JsDoubleToNumber(argIndex, &jsIndex);
JsSetIndexedProperty(argsArray, jsIndex, valueHolder);
}
}
JsValueRef functionResult;
jsErr = JsCallFunction(functionRef, &argsArray, argCount, &functionResult);
// during this call exception occurs - access violation
JsSetCurrentContext(JS_INVALID_REFERENCE);
JsDisposeRuntime(runtime);
}
```
Disassembled view:
Address: Unhandled exception at 0x52AA94BE.
ContextAPIWrapper_Core<0,<lambda_1384bd1e534aad1012a12767fca3a5e8> >(ContextAPIWrapper::__l2::<lambda_1384bd1e534aad1012a12767fca3a5e8>)
ASM:
```
}
END_ENTER_SCRIPT
512071B8 lea ecx,[__enterScriptObject] ; this line throws
}
END_ENTER_SCRIPT
512071BB mov dword ptr [errCode],eax
```
What's interesting: when I replace `argsArray` initialization done via `JsCreateArray` with just simple:
`JsValueRef argsArray[] = {objRef, defJsStr, fsItemJsStr};` I'm receiving:
> Unable to get property 'indexOf' of undefined or null reference
as expected, so is my use of JsCreateArray invalid?
I would appreciate any other ideas on how to access the desired function.
Thanks,
Piotr
|
Request for adding support for commonJS' module.exports
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4811/comments
| 11 |
2018-03-13T14:54:54Z
|
2018-03-15T15:34:58Z
|
https://github.com/chakra-core/ChakraCore/issues/4811
| 304,799,107 | 4,811 |
[
"chakra-core",
"ChakraCore"
] |
I have a Javascript function that I want to complete synchronously, from a Javascript perspective. However, I would like to bind that Javascript function to a native function where I want to do some I/O asynchronously. While waiting on the I/O, I want to unload/disassociate the Context and Runtime from the current thread, work with a different Context and Runtime, and then resume the original Context once the I/O is complete.
How would I do that? I was thinking it might just be about calling JsSetCurrentContext (to switch to a different context) within the bound native function, but I'm not sure.
|
Implementing a synchronous Javascript operation asynchronously
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4801/comments
| 2 |
2018-03-09T18:12:44Z
|
2018-05-31T19:46:20Z
|
https://github.com/chakra-core/ChakraCore/issues/4801
| 303,931,883 | 4,801 |
[
"chakra-core",
"ChakraCore"
] |
This was added with Intl 2018 and should ship alongside the rest of the ICU implementation of Intl.
|
Implement Intl versions of String.prototype.toLocale{Upper|Lower}Case
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4800/comments
| 1 |
2018-03-09T01:22:53Z
|
2018-03-28T05:59:56Z
|
https://github.com/chakra-core/ChakraCore/issues/4800
| 303,691,623 | 4,800 |
[
"chakra-core",
"ChakraCore"
] |
This was standardized with Intl 2018 and should launch alongside the rest of the ICU implementation of Intl.
|
Implement Intl.PluralRules
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4799/comments
| 2 |
2018-03-09T01:21:36Z
|
2018-05-08T16:51:26Z
|
https://github.com/chakra-core/ChakraCore/issues/4799
| 303,691,417 | 4,799 |
[
"chakra-core",
"ChakraCore"
] |
Most of our failfasts are there to predict against unknown states, however Intl is not particularly vulnerable code -- if we are in a state we don't expect, its likely due to bad assumptions about the system configuration of the locales and formats that we weren't expecting. As a result, it may not be worth it to crash the Chakra process and render sites that use Intl on that computer unusable if we can at least let userland JS code work around any such issues itself.
I know that @dilijev is in favor of this but am open to alternate opinions.
|
Intl: Convert AssertOrFailFast to AssertOrThrow where applicable
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4798/comments
| 4 |
2018-03-09T01:18:58Z
|
2018-08-17T17:33:44Z
|
https://github.com/chakra-core/ChakraCore/issues/4798
| 303,691,009 | 4,798 |
[
"chakra-core",
"ChakraCore"
] |
First of all, if I'm reporting this issue at the wrong location, feel free to tell me where I should do it instead, I'll be happy to move it there and close this one.
Versions:
```
Microsoft Edge 38.14393.2068.0
Microsoft EdgeHTML 14.14393
```
**Note** At home I have `EdgeHTML 15.xxx` and it was not working either, going to update with latest info when I get home.
So, with this piece of code below, Edge does not display `Works` as expected. Instead, the rendering and execution of JavaScript simply stop completely and the page remain empty. No issue is written to console and no way to further know the problem is available.
```
<html>
<body>
<script>
const func = console.log;
func('Test');
document.write('Works');
</script>
</body>
</html>
```
If the `Developer Tools` is opened however, the page loads correctly without issue.
The problem seems to be the reference to the `console.log` function which is probably a native reference. By doing directly a `console.log(...)` or a function reference to pure JavaScript function instead, the problem is not exhibited (of course and hopefully :)).
|
Function reference to console functions make Edge to rendering the page at all
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4795/comments
| 2 |
2018-03-08T21:45:03Z
|
2018-03-08T22:36:51Z
|
https://github.com/chakra-core/ChakraCore/issues/4795
| 303,643,436 | 4,795 |
[
"chakra-core",
"ChakraCore"
] |
**Suggestion**
Implement Array.prototype.sort as an additional JsBuiltin within JsBuiltins.js - OR at the minimum the sort it uses when it is called with a comparison function.
Motivation is performance and compatibility (the current implementation sometimes errors out with "Out of stack space" when sorting large arrays with a custom comparison)
Further details including cross engine comparisons below.
**Current status of Array.prototype.sort**
Currently Array.prototype.sort in ChakraCore is very fast when called without a custom comparison method.
BUT with a custom comparison method it is not quick. For arrays of length < 10,000 it's reasonable but for larger arrays it becomes either too slow or it crashes with "out of stack space"
**Comparison to other engines - observed behaviour**
Chakra's performance is similar to v8 - quick with the built in comparison - slow with custom methods - BUT v8 does not crash with "out of stack space" for large arrays.
SM and JSC on the other hand perform sorts with custom comparisons in very short amounts of time. - see illustrative test case below.
**Comparison to other engines - internals**
JSC and Spidermonkey both implement array.prototype.sort as a self-hosted javascript built in - this means that when using a custom comparison method it can assumedly be inlined within the sort - resulting in the much higher observed performance.
v8 and ChakraCore both implement array.prototype.sort in C++ hence the observed issue of very slow handling for sorting large arrays using a custom comparison - as the C++ sort method has to repeatedly call into the Javascript comparison method.
**Illustrative test cases**
Firstly - array of length 100,000
```js
let foo = [];
let names = ["bar", "foo", "test", "adam", "jeff"];
for (let i = 0, id = 0.1; i < 10000; ++i)
{
id = Math.random();
foo[i] = {
id : id,
name : names[Math.floor(id * 5)]
};
}
let bar = Date.now();
function compare ( a, b)
{
return a.name < b.name ? -1 : 1;
}
foo.sort(compare);
print("Time taken is " + (Date.now() - bar));
```
**eshost results**
```
#### JavaScriptCore
Time taken is 53
#### SpiderMonkey
Time taken is 104
#### Chakra
Time taken is 24559
#### V8 --harmony
Time taken is 29243
```
Secondly - repeat the same changing the length to 500,000
```
#### JavaScriptCore
Time taken is 252
#### SpiderMonkey
Time taken is 482
#### Chakra
Error: out of stack space
#### V8 --harmony
Time taken is 649802
```
|
Suggestion: implement array.prototype.sort in javascript
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4793/comments
| 7 |
2018-03-08T19:21:25Z
|
2018-03-13T22:00:54Z
|
https://github.com/chakra-core/ChakraCore/issues/4793
| 303,599,576 | 4,793 |
[
"chakra-core",
"ChakraCore"
] |
The problem is on lines 523-524:
```
BUILD_RELATIVE_DIRECTORY=$(python -c "import os.path;print \
os.path.relpath('${CHAKRACORE_DIR}', '$BUILD_DIRECTORY')")
```
This fails for me because `python` invokes python3, where `print foo` is no longer legal syntax. If I manually change the invocation to `python2.7` (valid on my system), things work as expected. I hit this failure after some system update or other updated the interpreter pointed to by `python` to version 3.4.
I notice that we only use python here, to get a relative path, and we only use the resulting relative path as an argument to `cmake`. Is it strictly necessary to give `cmake` a relative path? Could we get away with just passing `CHAKRACORE_DIR` instead? It seems to work on my machine, but I don't know enough about CMake to be confident here.
If we can't get away with using the absolute path, would we consider using perl here instead? We can do the same thing with a one-liner, and perl has (IMO) better distribution on platforms that run bash. Increasingly, we won't be able to rely on python2 being available. For so minor a use-case, we may not want to bet on it.
Thanks!
|
build.sh breaks when python 3 is the default interpreter
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4791/comments
| 4 |
2018-03-08T00:49:43Z
|
2018-03-08T22:37:39Z
|
https://github.com/chakra-core/ChakraCore/issues/4791
| 303,315,178 | 4,791 |
[
"chakra-core",
"ChakraCore"
] |
#4763 has tightened type checking for ParseNode's which exposed two cases in PrintPnodeWIndent when ParseNodeCall was interpreted as ParseNodeBin (and previously succeeded due to partial match in class layout).
Should use the proper casting methods from ParseNode for knopCall and knopNew.
|
-trace:parse fails on knopCall and knopNew
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4788/comments
| 0 |
2018-03-07T21:53:21Z
|
2018-03-08T15:37:50Z
|
https://github.com/chakra-core/ChakraCore/issues/4788
| 303,273,666 | 4,788 |
[
"chakra-core",
"ChakraCore"
] |
This code fails with the error `Invalid calling object`:
```js
[1,2].forEach(console.log);
```
This fixes the issue:
```js
[1,2].forEach((x) => console.log(x));
```
Please note this only happens **if the devtools are closed**.
Related: https://github.com/fable-compiler/Fable/issues/1357#issuecomment-371275788
|
console.log passed as function value fails
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4787/comments
| 3 |
2018-03-07T20:45:46Z
|
2018-03-07T23:24:36Z
|
https://github.com/chakra-core/ChakraCore/issues/4787
| 303,252,850 | 4,787 |
[
"chakra-core",
"ChakraCore"
] |
I know that ChakraCore can be built for Linux, but I wondering what the experience running on Linux will be like.
Are there known limitations with running on Linux, compared to Windows?
Does the Linux build undergo the same testing as Windows?
Are there known projects out there running ChakraCore on Linux?
|
Question about Linux support
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4784/comments
| 2 |
2018-03-06T11:09:59Z
|
2018-03-22T01:04:47Z
|
https://github.com/chakra-core/ChakraCore/issues/4784
| 302,658,435 | 4,784 |
[
"chakra-core",
"ChakraCore"
] |
Right now, there are two PlatformAgnostic folders -- one in lib\Common and one in lib\Runtime. These should be merged, ridded of Js:: namespace dependencies, and have a pluggable architecture similar to the Utf8Codex,
Sub-items of annoyance:
- [ ] lib\Common\PlatformAgnostic files aren't editable from within VS
- [ ] lib\Runtime\PlatformAgnostic files _shouldn't_ be used by ch and jshost, considering their internal dependencies, but in practice they are needed.
- [ ] Separating PlatformAgnostic out would make it much clearer that we can use the standard library in the implementation, since there is no risk of colliding with our garbage collector.
|
Refactor PlatformAgnostic interface into top-level module with no internal dependencies
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4782/comments
| 0 |
2018-03-05T23:17:15Z
|
2018-03-05T23:17:15Z
|
https://github.com/chakra-core/ChakraCore/issues/4782
| 302,502,395 | 4,782 |
[
"chakra-core",
"ChakraCore"
] |
TypedArrays are Integer-Indexed Exotic Objects
Integer-Indexed Exotic Objects override GetOwnProperty to **configurable:false** for numeric Indexes
[[Delete]] of configurable:false property should return false
delete Operator should throw TypeError in 'use strict' mode if [[Delete]] returns false
=>
'use strict'
var ta = Int8Array(42);
delete ta[0];
should throw TypeError
It doesn't.
Notes: the index property on typed arrays is correctly set to "configurable:false".
|
delete of indexed property of TypedArray doesn't throw in strict mode
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4781/comments
| 1 |
2018-03-05T22:55:56Z
|
2018-03-07T20:07:44Z
|
https://github.com/chakra-core/ChakraCore/issues/4781
| 302,497,181 | 4,781 |
[
"chakra-core",
"ChakraCore"
] |
Line # | Process | Provider Name | Task Name | Opcode Name | Id | RecyclerID (Field 1) | Time (s) | ThreadId | Event Name | Cpu | UsedBytes (Field 2) | ReservedBytes (Field 3) | Count
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --
146 | | | Memprotect_GC_Heap_Size | win:Info | 241 | 0x000001AF1A813270 | | | | | | | 378
147 | | | | | | | 38.919101864 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 2 | 2691072 | 0 | 1
148 | | | | | | | 39.815763451 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 2981888 | 0 | 1
149 | | | | | | | 39.826664244 | 27420 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 6 | 2891776 | 0 | 1
150 | | | | | | | 40.163629370 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 3 | 6537216 | 0 | 1
151 | | | | | | | 40.172919750 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 0 | 6557696 | 0 | 1
152 | | | | | | | 40.238435139 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 7 | 8503296 | 0 | 1
153 | | | | | | | 40.243852318 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 8093696 | 0 | 1
154 | | | | | | | 40.286348047 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 9945088 | 0 | 1
155 | | | | | | | 40.291074927 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 9584640 | 0 | 1
156 | | | | | | | 40.523374361 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 1 | 11300864 | 0 | 1
157 | | | | | | | 40.531159827 | 34924 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 4 | 10678272 | 0 | 1
158 | | | | | | | 40.657594600 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 7 | 12787712 | 0 | 1
159 | | | | | | | 40.665940061 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 7 | 12234752 | 0 | 1
160 | | | | | | | 40.730305237 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 0 | 13955072 | 0 | 1
161 | | | | | | | 40.734957413 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 7 | 14098432 | 0 | 1
162 | | | | | | | 40.744719683 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 2 | 13787136 | 0 | 1
163 | | | | | | | 41.002421606 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 0 | 15224832 | 0 | 1
164 | | | | | | | 41.023728207 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 14680064 | 0 | 1
165 | | | | | | | 41.076349461 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 0 | 14766080 | 0 | 1
166 | | | | | | | 41.378407299 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 15110144 | 0 | 1
167 | | | | | | | 41.534146561 | 37544 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 15855616 | 0 | 1
168 | | | | | | | 41.551458780 | 13704 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 3 | 14630912 | 18446744073709420544 | 1
169 | | | | | | | 41.569443905 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 5 | 14778368 | 18446744073709420544 | 1
170 | | | | | | | 41.789691193 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 4 | 15171584 | 18446744073709420544 | 1
171 | | | | | | | 41.935109615 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 2 | 16039936 | 18446744073709420544 | 1
172 | | | | | | | 41.954382956 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 0 | 16121856 | 18446744073709420544 | 1
173 | | | | | | | 41.964476547 | 37196 | Microsoft-JScript/Memprotect_GC_Heap_Size/win:Info | 2 | 16171008 | 18446744073709420544 | 1
|
Memprotect_GC_Heap_Size sometimes shows nonsensical values
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4779/comments
| 0 |
2018-03-05T19:06:25Z
|
2019-06-07T19:01:01Z
|
https://github.com/chakra-core/ChakraCore/issues/4779
| 302,422,608 | 4,779 |
[
"chakra-core",
"ChakraCore"
] |
Hi All,
We have created an WPF C# Application Which embeds ChakraCore. We wanted to debug javascript files that are loaded in chakra core engine.
Please help me. Feel free to ask any required information.
Thanks,
Pallam Madhukar
|
How can I debug JS code running in an WPF app which embeds ChakraCore?
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4778/comments
| 1 |
2018-03-05T09:22:38Z
|
2018-03-22T01:06:08Z
|
https://github.com/chakra-core/ChakraCore/issues/4778
| 302,223,962 | 4,778 |
[
"chakra-core",
"ChakraCore"
] |
Hi folks,
Have you considered using ccache to speed up repeat builds on linux and mac machines? It caches built object files, allowing them to be reused if the underlying source hasn't changed. For us, this speeds our CI builds dramatically - we're building ChakraCore as a static library, and adopting ccache has taken our build from 30 minutes to one.
I'm proposing adding the following to the root CMakeLists.txt:
```cmake
if(USE_CCACHE) # set by build.sh
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM})
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM})
endif()
endif()
```
Would you be amenable to such a change?
|
Use ccache (optionally) in CMake builds
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4775/comments
| 12 |
2018-03-03T00:25:26Z
|
2018-03-15T17:14:13Z
|
https://github.com/chakra-core/ChakraCore/issues/4775
| 301,947,046 | 4,775 |
[
"chakra-core",
"ChakraCore"
] |
I have a pretty complex regex with ranges which hangs chakra String.replace.
See https://github.com/Microsoft/ChakraCore/pull/4773
|
String.replace exponential backtracking behavior on certain regular expressions
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4774/comments
| 10 |
2018-03-02T21:17:11Z
|
2019-06-07T19:06:59Z
|
https://github.com/chakra-core/ChakraCore/issues/4774
| 301,907,820 | 4,774 |
[
"chakra-core",
"ChakraCore"
] |
I'm investigating a multi-tenant use of ChakraCore where there would be many instances of the same process running, and the incremental memory usage of each additional process is important.
In doing some memory profiling of a simple hello-world-type program embedding ChakraCore, I'm seeing a private memory size (as reported by the Activity Monitor on OS X and /proc/pid/smaps on Linux) of around 10MB. I expect this private memory size to be the incremental memory cost of multiple processes.
Doing some heap profiling with Valgrind's Massif tool, it looks like most of the memory is being allocated in the RecyclerWriteBarrierManager code, and specifically in X64WriteBarrierCardTableManager::Initialize() where it allocates memory for a card table.
I'm interested in learning about what the CardTable and WriteBarrierCardTableManager are used for, and if there is a way to tune down or disable this large memory allocation.
Any help would be appreciated.
Thanks,
Chris
|
Question about reducing private memory size
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4772/comments
| 6 |
2018-03-02T19:21:26Z
|
2018-03-13T16:59:08Z
|
https://github.com/chakra-core/ChakraCore/issues/4772
| 301,876,119 | 4,772 |
[
"chakra-core",
"ChakraCore"
] |
See discussion in: https://github.com/Microsoft/ChakraCore/pull/4765#discussion_r171715468
|
Disabled tests in test/Lib/rlexe.xml referencing Product Studio Bug 190575
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4770/comments
| 0 |
2018-03-02T01:34:42Z
|
2018-03-02T01:34:42Z
|
https://github.com/chakra-core/ChakraCore/issues/4770
| 301,622,453 | 4,770 |
[
"chakra-core",
"ChakraCore"
] |
One is ch's Helpers::LoadScriptFromFile, but there are a handful of others that might be issues.
|
ASAN: WASM tests cause a handful of leaks
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4760/comments
| 3 |
2018-02-28T21:17:48Z
|
2019-06-07T19:08:03Z
|
https://github.com/chakra-core/ChakraCore/issues/4760
| 301,186,671 | 4,760 |
[
"chakra-core",
"ChakraCore"
] |
ASAN: -GenerateLibraryByteCodeHeader config flag causes leaks in HostConfigFlags::Parse
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4759/comments
| 1 |
2018-02-28T21:13:10Z
|
2018-05-07T23:24:00Z
|
https://github.com/chakra-core/ChakraCore/issues/4759
| 301,185,218 | 4,759 |
|
[
"chakra-core",
"ChakraCore"
] |
ASAN: AutoString in ch causes leaks in 262/262test.js
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4758/comments
| 3 |
2018-02-28T21:10:30Z
|
2018-03-01T02:50:09Z
|
https://github.com/chakra-core/ChakraCore/issues/4758
| 301,184,359 | 4,758 |
|
[
"chakra-core",
"ChakraCore"
] |
See discussion of #4756
|
Normalize usage of WScript.Platform.* and exclude_ tags
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4757/comments
| 0 |
2018-02-28T20:22:34Z
|
2018-03-13T17:01:22Z
|
https://github.com/chakra-core/ChakraCore/issues/4757
| 301,169,478 | 4,757 |
[
"chakra-core",
"ChakraCore"
] |
Compile Chakra.ICU.Data with RC.exe to simplify the build system and support ARM
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4755/comments
| 0 |
2018-02-28T17:36:35Z
|
2019-06-07T18:37:12Z
|
https://github.com/chakra-core/ChakraCore/issues/4755
| 301,115,969 | 4,755 |
|
[
"chakra-core",
"ChakraCore"
] |
I think it is possible to remove the return value from `Lower*::LowerWasmArrayBoundsCheck`.
We are basically adding all the checks above instr and the returned label is not needed and confusing.
|
Wasm: LowerWasmArrayBoundsCheck return value
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4751/comments
| 0 |
2018-02-28T01:11:48Z
|
2019-06-07T19:08:07Z
|
https://github.com/chakra-core/ChakraCore/issues/4751
| 300,853,961 | 4,751 |
[
"chakra-core",
"ChakraCore"
] |
ChakraICU option does not compile on x86
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4746/comments
| 0 |
2018-02-27T19:57:02Z
|
2018-03-13T17:02:35Z
|
https://github.com/chakra-core/ChakraCore/issues/4746
| 300,771,274 | 4,746 |
|
[
"chakra-core",
"ChakraCore"
] |
[WebAssembly original tracking table](https://github.com/WebAssembly/design/blob/master/FutureFeatures.md)
| Feature | Spec issue | Status | Spec Phase | Chakra Phase | Chakra Issue |
|--------------------------------------------------|------------|-------------|-----------------------|----------------|--------------|
| Threads | [1073][] | in progress | Feature proposal | Implementation | #3477 |
| Fixed-width SIMD | [1075][] | in progress | Feature proposal | Experimental | #3482 |
| Exception handling | [1078][] | in progress | Feature proposal | | #3483 |
| Garbage collection | [1079][] | in progress | Feature proposal | | #3481 |
| Bulk memory operations | [1114][] | in progress | Feature proposal | | #3476 |
| Web Content Security Policy | [1122][] | in progress | Pre-proposal | | |
| ECMAScript module integration | [1087][] | not started | Pre-proposal | | |
| Tail Call | [1144][] | in progress | Feature proposal | | #3484 |
| Non-trapping float-to-int conversions | [1143][] | in progress | Implementation phase | release/1.10 | #3228 |
| Multi-value | [1146][] | in progress | Implementation phase | Implementation | #3478 |
| Host bindings | [1148][] | in progress | Feature proposal | | |
| Sign-extension operators | [1178][] | in progress | Standardize phase | release/1.10 | #3741 |
| Import/Export Mutable Globals | [1179][] | in progress | Implementation phase | | |
| Type Reflection for WebAssembly JavaScript API | [1181][] | in progress | Feature proposal | | |
| Unmanaged closures | [1182][] | in progress | Feature proposal | | |
| JavaScript BigInt to WebAssembly i64 integration | [1186][] | in progress | Feature proposal | | |
[1073]: https://github.com/WebAssembly/design/issues/1073
[1075]: https://github.com/WebAssembly/design/issues/1075
[1078]: https://github.com/WebAssembly/design/issues/1078
[1079]: https://github.com/WebAssembly/design/issues/1079
[1087]: https://github.com/WebAssembly/design/issues/1087
[1114]: https://github.com/WebAssembly/design/issues/1114
[1122]: https://github.com/WebAssembly/design/issues/1122
[1143]: https://github.com/WebAssembly/design/issues/1143
[1144]: https://github.com/WebAssembly/design/issues/1144
[1146]: https://github.com/WebAssembly/design/issues/1146
[1148]: https://github.com/WebAssembly/design/issues/1148
[1178]: https://github.com/WebAssembly/design/issues/1178
[1179]: https://github.com/WebAssembly/design/issues/1179
[1181]: https://github.com/WebAssembly/design/issues/1181
[1182]: https://github.com/WebAssembly/design/issues/1182
[1186]: https://github.com/WebAssembly/design/issues/1186
|
WebAssembly Language Features Tracking
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4745/comments
| 1 |
2018-02-27T19:20:27Z
|
2018-05-29T22:12:35Z
|
https://github.com/chakra-core/ChakraCore/issues/4745
| 300,759,190 | 4,745 |
[
"chakra-core",
"ChakraCore"
] |
Slightly odd issue I stumbled to when profiling some code recently - seemingly:
```js
someVar = 1;
//or
let someVar = 1;
```
Is a source of significant slowdown in CC.
Assuming the above is in a hot path replacing the 1 with a different number or with a variable already set to 1 causes significant speed up - even setting the variable to 2 and then multiplying by a half seems faster than initialising it as 1.
I've written a slightly extended test case which uses 3 functions to calculate a factorial each one initialises a variable then multiplies it in a loop to produce the answer.
factorialA() - initialises to 1
factorialB() - initialises to one - a constant pre-defined to 1.
factorialC() - initialises to 2 and returns the result multiplied by 0.5
I've included warmup calls to endeavour to ensure that the code is jitted properly - factorialA() takes twice as long to run as the other 2 cases in CC - in other engines results are comparable for all 3 cases - results table using eshost posted below test case.
```js
function factorialA(n)
{
let result = 1;
for(let i = 0; i < n; ++i)
{
result *= (n - i)
}
return result;
}
const one = 1;
function factorialB(n)
{
let result = one;
for(let i = 0; i < n; ++i)
{
result *= (n - i)
}
return result;
}
function factorial2(n)
{
let result = 2;
for(let i = 0; i < n; ++i)
{
result *= (n - i)
}
return (result * 0.5);
}
function testFactA()
{
let result = 0;
for (let i = 0; i < 1000; ++i)
{
result += factorialA(i);
}
return result;
}
function testFactB()
{
let result = 0;
for (let i = 0; i < 1000; ++i)
{
result += factorialB(i);
}
return result;
}
function testFactC()
{
let result = 0;
for (let i = 0; i < 1000; ++i)
{
result += factorial2(i);
}
return result;
}
//warmup
let start = 0;
for(let j = 0; j < 10000; ++j)
{
testFactA();
testFactB();
testFactB();
}
//test
start = Date.now();
for(let j = 0; j < 1000; ++j)
{
testFactA();
}
print("factorialA time = " + (Date.now() - start));
start = Date.now();
for(let j = 0; j < 1000; ++j)
{
testFactB();
}
print("factorialB time = " + (Date.now() - start));
start = Date.now();
for(let j = 0; j < 1000; ++j)
{
testFactC();
}
print("factorialC time = " + (Date.now() - start));
```
Results using eshost:
```
#### SpiderMonkey
factorialA time = 700
factorialB time = 699
factorialC time = 701
#### V8 --harmony
factorialA time = 705
factorialB time = 703
factorialC time = 708
#### JavaScriptCore
factorialA time = 714
factorialB time = 712
factorialC time = 709
#### Chakra
factorialA time = 1412
factorialB time = 678
factorialC time = 669
```
|
Use of 1 numeric literal is slow
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4744/comments
| 4 |
2018-02-26T20:17:14Z
|
2018-03-29T18:35:23Z
|
https://github.com/chakra-core/ChakraCore/issues/4744
| 300,380,940 | 4,744 |
[
"chakra-core",
"ChakraCore"
] |
This code fails with
> SCRIPT1028: Expected identifier, string or number
in line 21:15 of
```html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
function test1() {
var async = 1;
console.log(async);
}
function test2() {
var object = {p: 42, async: true};
var {p, async} = object;
console.log(p);
console.log(async);
}
function test3() {
var object = {p: 42, async: true};
var {async, p} = object;
console.log(p);
console.log(async);
}
test1();
test2();
test3();
</script>
</body>
</html>
```
using
Microsoft Edge 41.16299.248.0
Microsoft EdgeHTML 16.16299
See also #4158
|
Error when using name "async" in destructuring assignment
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4741/comments
| 4 |
2018-02-26T19:17:22Z
|
2018-02-26T21:46:49Z
|
https://github.com/chakra-core/ChakraCore/issues/4741
| 300,361,743 | 4,741 |
[
"chakra-core",
"ChakraCore"
] |
Currently for any embedder to implement ESModules with CC they have to create a map (key = normalised specifier, value = module record) of module records which they have to hold.
**Whenever a module is requested the host must always perform the following steps:**
1. Normalise the specifier
2. Check if a module record with this normalised specifier is in the map
2. If yes return existing module record
3. If no:
a) Initialise a new module record (providing the normalised specifier as one of the parameters)
b) Schedule a call to ParseModuleSource for the new record
c) add the module record to map
d) return the record
**Suggestion**
Considering that the module record map will be functionally identical for all hosts I propose that it should be internalised into ChakraCore.
**Steps this would entail:**
1. Add a module record map (key = normalised specifier, value = module record) as an internal property of a SourceContext
2. When JsInitializeModuleRecord is called check the internal map for the record - if it exists return it instead of creating a new record
3. When JsParseModuleSource is called do an early return of JsNoError if it's already Parsed rather than JsErrorModuleParsed (optional change as this point could just be documented instead) - point being to allow the host to always schedule a JsParseModuleSource job when asked for a module and not need to check first simply relying on CC to only do it if it's needed
**Impact**
1. Face of the API would remain the same
2. If used in the current "correct" way would still function the same way -i.e. this is not a breaking change
3. This would remove the requirement for boilerplate code from host implementations AND make the API simpler to understand
4. A host would now be able to perform the following simpler steps when a module is requested:
1. Normalise the specifier
2. Initialise a module record (no existence check required as CC would now do it)
3. Schedule a call to JsParseModuleSource for the record (no already-parsed check required as CC can do that)
4. return the record
|
Suggestion: Internalise Module record map
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4740/comments
| 14 |
2018-02-24T19:19:14Z
|
2018-02-28T22:14:24Z
|
https://github.com/chakra-core/ChakraCore/issues/4740
| 299,965,357 | 4,740 |
[
"chakra-core",
"ChakraCore"
] |
If you go to the releases page https://github.com/Microsoft/ChakraCore/releases and attempt to download you will get an error
```xml
<Error>
<Code>AuthenticationFailed</Code>
<Message>
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:2ecb0da1-a01a-008e-4cf5-ac5923000000 Time:2018-02-23T22:30:55.2871499Z
</Message>
<AuthenticationErrorDetail>
Signature did not match. String to sign used was r 2018-02-12T06:03:00Z 2025-02-13T06:03:00Z /file/chakratestx/chakrashare 2017-04-17
</AuthenticationErrorDetail>
</Error>
```
|
Releases CDN exhibiting authn errors
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4738/comments
| 3 |
2018-02-23T22:31:21Z
|
2018-02-24T08:15:34Z
|
https://github.com/chakra-core/ChakraCore/issues/4738
| 299,871,085 | 4,738 |
[
"chakra-core",
"ChakraCore"
] |
If we are going to support this configuration, well, we should actually support it. This includes both marking existing tests that fail without ICU/WinGlob as exclude as well as adding the CI definition.
Right now, theres a tag exclude_noicu, that should be sufficient for marking the current failures (All of the Intl tests, an es6 test, and an es6module test currently fail).
|
Add CI for `build.sh --no-icu`
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4734/comments
| 0 |
2018-02-23T17:44:05Z
|
2018-02-26T23:58:20Z
|
https://github.com/chakra-core/ChakraCore/issues/4734
| 299,794,039 | 4,734 |
[
"chakra-core",
"ChakraCore"
] |
repro steps:
1.run script from https://github.com/JohnMasen/ChakraCore.NET/blob/master/source/RunScript/Scripts/Debugging/app.js
make sure line 14 [`eval("let cc=10;");`] is uncommented.
2.set breakpoint at line 9 (it actually effects on whole root stack)
3.call JsDiagGetStackProperties when breakpoint hit
expected result:
`{"thisObject":{"name":"this","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":2},"arguments":{"name":"arguments","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":3},"locals":[{"name":"a","type":"string","value":"abc","propertyAttributes":1,"handle":4},{"name":"b","type":"string","value":"abc","propertyAttributes":1,"handle":5},{"name":"c","type":"string","value":"abcabc","propertyAttributes":1,"handle":6},{"name":"f","type":"string","value":"abcabcabcabc","propertyAttributes":1,"handle":7},{"name":"o","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":8},{"name":"o2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":9},{"name":"ff","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":10},{"name":"ff2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":11}],"scopes":[],"globals":{"handle":12}}`
Actual result
`{"thisObject":{"name":"this","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":2},"locals":[{"name":"arguments","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":3},{"name":"a","type":"string","value":"abc","propertyAttributes":1,"handle":4},{"name":"b","type":"string","value":"abc","propertyAttributes":1,"handle":5},{"name":"c","type":"string","value":"abcabc","propertyAttributes":1,"handle":6},{"name":"f","type":"string","value":"abcabcabcabc","propertyAttributes":1,"handle":7},{"name":"o","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":8},{"name":"o2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":9},{"name":"ff","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":10},{"name":"ff2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":11}],"scopes":[{"index":0,"handle":12},{"index":1,"handle":13}],"globals":{"handle":14}}`
### Screenshot for result compare: (arguments becomes part of local variables after eval() function uncommented)
## With Eval() function


## Without Eval() function


|
eval() function will cause "arguments" property missing in JsDiagGetStackProperties result
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4733/comments
| 3 |
2018-02-23T13:04:03Z
|
2019-06-07T18:43:40Z
|
https://github.com/chakra-core/ChakraCore/issues/4733
| 299,705,026 | 4,733 |
[
"chakra-core",
"ChakraCore"
] |
```js
var a = function() {}
var p = new Proxy(a, {})
Function.prototype.toString.call(p)
// TypeError: Function.prototype.toString: 'this' is not a Function object
typeof p // "function"
Object.prototype.toString.call(p) // [object Function]
```
With at least Safari passing a proxied function to `Function.prototype.toString.call` will work.
<img width="455" src="https://user-images.githubusercontent.com/4303/36560441-90f3d82c-17c5-11e8-891a-9c921cb6c9a6.png">
Related: https://bugs.chromium.org/p/v8/issues/detail?id=7484
|
Proxied functions aren't considered functions by Function.prototype.toString.call
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4730/comments
| 8 |
2018-02-22T19:41:16Z
|
2018-06-19T18:37:11Z
|
https://github.com/chakra-core/ChakraCore/issues/4730
| 299,481,886 | 4,730 |
[
"chakra-core",
"ChakraCore"
] |
Using NodeChakra
```js
const EventEmitter = new Proxy(require("events"), {})
class B extends EventEmitter {
constructor() {
super();
console.log(this.a, this)
}
a() {
return "a"
}
}
new B // logs `undefined` for `this.a` and the `this` of `EventEmitter` instead of `B`.
```
|
Inheriting from proxied class causes `this` mixup
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4729/comments
| 3 |
2018-02-22T18:55:43Z
|
2018-04-12T21:37:17Z
|
https://github.com/chakra-core/ChakraCore/issues/4729
| 299,467,818 | 4,729 |
[
"chakra-core",
"ChakraCore"
] |
```js
p = new Proxy(function(){}, {})
Object.prototype.toString.call(p)
// => [object Object] but should be [object Function]
```
Firefox and Chrome have `[object Function]` while Safari has `[object Object]`.
Related to: https://bugs.chromium.org/p/v8/issues/detail?id=7485
|
Proxied function reports wrong Object.prototype.toString.call result
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4728/comments
| 2 |
2018-02-22T07:42:57Z
|
2018-06-19T18:37:11Z
|
https://github.com/chakra-core/ChakraCore/issues/4728
| 299,250,146 | 4,728 |
[
"chakra-core",
"ChakraCore"
] |
Per spec if the target of a Proxy object is not constructible then the Proxy object should not have a construct method i.e. should not be constructible even if supplied with a construct method.
See Note 1 here: [#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget](https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget)
And 7. b) here: [#sec-proxycreate](https://tc39.github.io/ecma262/#sec-proxycreate)
This doesn't work in CC - any Proxy created in CC if supplied with a construct method will be callable with new:
```js
let obj = new Proxy(()=>{}, {construct: ()=>({})});
new obj();//expected error -> actual no error
```
```js
let obj = new Proxy(async function foo(){}, {construct: ()=>({})});
new obj();//expected error -> actual no error
```
Both of these cases error as I'd expect in v8.
EDIT: I've made a PR to fix this.
|
Proxy Object can be constructible when its target was not
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4724/comments
| 0 |
2018-02-22T01:00:00Z
|
2018-02-22T23:02:30Z
|
https://github.com/chakra-core/ChakraCore/issues/4724
| 299,185,818 | 4,724 |
[
"chakra-core",
"ChakraCore"
] |
Today, ``UnifiedRegex::Parser::CompileProgram`` asserts or fails fast upon encountering a regex with more than 2^15 - 1 (give or take) capturing groups. However, various places in the regex system use an int rather than a uint16 or size_t to represent the number of capturing groups, such as ``UnifiedRegex::RegexPattern::NumGroups``; see PR #4721 for other examples.
Improve the situation in the following ways:
* switch to a uint16 or size_t to represent the number of capturing groups. ``Parser::nextGroupId`` needs some attention to make sure it doesn't overflow during parsing -- either leave it as an ``int``, in which case overflow is impossible because the input to the parser is limited to 2G characters and can therefore have no more than 1G capturing groups, or change it to a ``uint16`` with appropriate overflow detection. But all other representations of the number of capturing groups should be ``uint16`` or ``size_t``.
* Explore the possibility of providing better error behavior to the user than just failing fast with an AV/segfault. This is possibly as simple as calling ``Fail(JSERR_RegExpSyntax)``.
|
Improve API, UX around capturing groups in RegexParser
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4722/comments
| 2 |
2018-02-22T00:23:59Z
|
2018-02-23T03:29:05Z
|
https://github.com/chakra-core/ChakraCore/issues/4722
| 299,179,187 | 4,722 |
[
"chakra-core",
"ChakraCore"
] |
I looked but couldn't find this documented anywhere.
In https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/ConfigFlagsList.h there are lots of config flags with default values set.
Is there any API or convenient method an embedder can use to adjust these when creating a runtime?
There doesn't seem to be anything for it in Jsrt other than the one Enable Experimental flag to turn on all experimental features.
|
Question: How do you use config flags?
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4718/comments
| 5 |
2018-02-21T21:52:29Z
|
2018-02-23T01:02:32Z
|
https://github.com/chakra-core/ChakraCore/issues/4718
| 299,142,400 | 4,718 |
[
"chakra-core",
"ChakraCore"
] |
Throws from a non-ICU call where the caller uses the ICU C API can cause the appropriate u*_close function to not be called. #4703 introduces a new RAII wrapper to help address that.
|
Audit code that uses ICU for memory leaks, use new RAII classes introduced by #4703
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4714/comments
| 0 |
2018-02-21T01:25:11Z
|
2018-03-01T21:07:21Z
|
https://github.com/chakra-core/ChakraCore/issues/4714
| 298,810,193 | 4,714 |
[
"chakra-core",
"ChakraCore"
] |
gfffgfgfgf
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4708/comments
| 0 |
2018-02-20T06:30:51Z
|
2018-02-20T07:06:06Z
|
https://github.com/chakra-core/ChakraCore/issues/4708
| 298,485,335 | 4,708 |
|
[
"chakra-core",
"ChakraCore"
] |
I was wondering how you are able to clean up objects created on the heap and used via `JsCreateExternalObject`.
I tried using the FinalizerCallback (in my previous issue #4679) but whenever i have that referenced in my `JsCreateExternalObject` call (and not even do anything) I get all sorts of crashes and corruptions happening. So I must be doing something wrong.
I tried looking at [one of the hosting samples](https://github.com/Microsoft/Chakra-Samples/blob/master/ChakraCore%20Samples/OpenGL%20Engine/OpenGLEngine/ChakraCoreHost.cpp) and that doesn't `delete` the `GLPoint` objects created so it must be leaking unless `JsCreateExternalObject` auto-cleans up?
|
How do objects created using JsCreateExternalObject get cleared up
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4706/comments
| 12 |
2018-02-19T22:44:55Z
|
2018-02-21T16:49:58Z
|
https://github.com/chakra-core/ChakraCore/issues/4706
| 298,420,443 | 4,706 |
[
"chakra-core",
"ChakraCore"
] |
Update build instructions to account for new ICU integration
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4705/comments
| 0 |
2018-02-19T07:16:16Z
|
2018-03-06T00:25:25Z
|
https://github.com/chakra-core/ChakraCore/issues/4705
| 298,180,136 | 4,705 |
|
[
"chakra-core",
"ChakraCore"
] |
Hi, I am doing some migration from V8 to ChakraCore. Some of JS code requires to be able to read file synchronously from its relative location (like `require` in CommonJS), so I have to figure out which script called the native function.
After some hacking, I noticed it is related to `JsSourceContext` but it is introduced as just debugging purpose in documentation. And there is no exposed JSRT api for that (excluding debug API).
If it is intended feature, then, could you suggest a way (either pure JS or native) to solve the problem?
|
How to get current script context
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4702/comments
| 2 |
2018-02-19T03:57:43Z
|
2018-02-22T03:51:41Z
|
https://github.com/chakra-core/ChakraCore/issues/4702
| 298,155,293 | 4,702 |
[
"chakra-core",
"ChakraCore"
] |
After #4688 was merged `--no-icu` will no longer work on Ubuntu, I receive the following output:
```
fatcerberus@pigcult-vm:~/src/ChakraCore$ ./build.sh -j=8 --no-icu
```
```
Searching for Clang...
Clang++ found at /usr/bin/clang++
Build path: /home/fatcerberus/src/ChakraCore/out/Release
-- /home/fatcerberus/src/ChakraCore/bin/ch/DbgController.js.h is up to date. skipping.
Compile Target : System Default
Generating Release makefiles
-- Looking for include file unicode/uchar.h
-- Looking for include file unicode/uchar.h - not found
CMake Error at pal/src/configure.cmake:919 (message):
Cannot find ICU. Try installing libicu-dev or the appropriate packages for
your platform. You may also disable icu/unicode with '--no-icu' argument
Call Stack (most recent call first):
CMakeLists.txt:489 (include)
-- Configuring incomplete, errors occurred!
See also "/home/fatcerberus/src/ChakraCore/out/Release/CMakeFiles/CMakeOutput.log".
See also "/home/fatcerberus/src/ChakraCore/out/Release/CMakeFiles/CMakeError.log".
CMake Error at CMakeLists.txt:47 (message):
Couldn't detect target processor, try `--arch` argument with build.sh
-- Configuring incomplete, errors occurred!
See also "/home/fatcerberus/src/ChakraCore/out/Release/CMakeFiles/CMakeOutput.log".
See also "/home/fatcerberus/src/ChakraCore/out/Release/CMakeFiles/CMakeError.log".
Makefile:524: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
See error details above. Exit code was 2
```
Ubuntu 16.04.3, if it makes a difference.
|
`--no-icu` broken on Ubuntu after #4688
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4701/comments
| 5 |
2018-02-19T01:38:24Z
|
2018-02-23T01:08:36Z
|
https://github.com/chakra-core/ChakraCore/issues/4701
| 298,140,451 | 4,701 |
[
"chakra-core",
"ChakraCore"
] |
Hi.
Once the JsDiagStartDebugging call is done with a certain callback, and a call to [JSRun](https://github.com/Microsoft/ChakraCore/wiki/JsRun) is in the process of the provided code, the provided callback is called with the event JsDiagDebugEventSourceCompile.
That's ok.
But the code provided to JSRun is always runned before taking into account any call to JsDiagSetBreakpoint, or JsDiagRequestAsyncBreak, even if these functions are called inside the callback, or called before JSRun.
And so I always end with the JsErrorDiagNotAtBreak error code.
Furthermore with more complex code, any "echo" in the JS code is done (and visible in the console) when the call to [JSRun](https://github.com/Microsoft/ChakraCore/wiki/JsRun) is completed. So anything done after the [JSRun](https://github.com/Microsoft/ChakraCore/wiki/JsRun) completion seems to be useless as the JS code will be executed.
Can you tell how to start the debugging and stop at the first line ?
P.S.: You can find below, one of my many attempts to get it right.
````cpp
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include "ChakraCore.h"
#define EXCEPTION_MAX_LENGTH 255
class ErrorCode
{
bool withException;
JsErrorCode errCode;
public:
explicit ErrorCode(bool withException = true):withException(withException), errCode(JsNoError){}
explicit ErrorCode(JsErrorCode errCode, bool withException = true):withException(withException)
{
(*this) = errCode;
}
ErrorCode(const ErrorCode& errorCode)
:withException(errorCode.withException), errCode(errorCode.errorCode())
{}
operator bool() const
{
return errCode == JsNoError;
}
JsErrorCode errorCode() const{return errCode;}
ErrorCode& operator()(JsErrorCode errorCode, const char* errorMessage) noexcept (false)
{
this->errCode = errorCode;
if (errorCode == JsNoError)
return *this;
char buffer [EXCEPTION_MAX_LENGTH + 1];
size_t actualLength;
JsErrorCode error;
JsValueRef exception;
if ((error = JsGetAndClearException(&exception)) != JsNoError)
{
printf("Error on Error! Original error code=%d, new error code=%d; extra info=%s\n",errorCode, error, errorMessage);
exit(EXIT_FAILURE);
}
JsPropertyIdRef messageName;
if ((error = JsCreatePropertyId("message", strlen("message"), &messageName)) != JsNoError)
{
printf("Error on Error! Original error code=%d, new error code=%d; extra info=%s\n",errorCode, error, errorMessage);
exit(EXIT_FAILURE);
}
JsValueRef messageValue;
if ((error = JsGetProperty(exception, messageName, &messageValue)) != JsNoError)
{
printf("Error on Error! Original error code=%d, new error code=%d; extra info=%s\n",errorCode, error, errorMessage);
exit(EXIT_FAILURE);
}
if ((error = JsCopyString(messageValue, buffer, EXCEPTION_MAX_LENGTH, &actualLength)) != JsNoError)
{
printf("Error on Error! Original error code=%d, new error code=%d; extra info=%s\n",errorCode, error, errorMessage);
exit(EXIT_FAILURE);
}
buffer[actualLength] = 0;
printf("Error=%s; extra info=%s\n", buffer, errorMessage);
exit(EXIT_FAILURE);
}
ErrorCode& operator=(JsErrorCode errorCode) noexcept (false)
{
return (*this)(errorCode, "");
}
ErrorCode& operator=(const ErrorCode& errorCode) noexcept (true)
{
this->errCode = errorCode.errCode;
this->withException = errorCode.withException;
return *this;
}
};
unsigned retrieveId(JsValueRef value);
static unsigned scriptId ;
static JsRuntimeHandle runtime;
static JsContextRef context;
static JsValueRef globalObject;
static ErrorCode errCode;
static JsValueRef breakpoint;
void debugCallback(JsDiagDebugEvent debugEvent, JsValueRef eventData, void* callbackState)
{
printf("debugCallback called on %d\n", debugEvent);
fflush(stdout);
static bool allBreakDone = false;
scriptId = retrieveId(eventData);
if (!allBreakDone)
{
errCode = JsDiagRequestAsyncBreak(runtime);
errCode = JsDiagSetBreakpoint(scriptId, 0, 0, &breakpoint);
allBreakDone = true;
}
}
int main()
{
errCode = JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime);
errCode = JsCreateContext(runtime, &context);
errCode = JsSetCurrentContext(context);
errCode = JsGetGlobalObject(&globalObject);
errCode = JsDiagStartDebugging(runtime, debugCallback, nullptr);
const char code[] = R"END(
var a = 0;
for(var i = 0; i < 10 ; i++)
a += i;
a++;
)END";
unsigned currentSourceContext = 1;
JsValueRef fname;
JsValueRef jsResult;
errCode = JsCreateString("", 0, &fname);
JsValueRef scriptSource;
errCode = JsCreateString(code,strlen(code), &scriptSource);
errCode = JsRun(scriptSource, currentSourceContext++, fname, JsParseScriptAttributeNone, &jsResult);
JsValueRef breakpoint;
errCode = JsDiagSetBreakpoint(scriptId, 0, 0, &breakpoint);
errCode = JsDiagRequestAsyncBreak(runtime);
errCode = JsDiagSetStepType(JsDiagStepTypeContinue);
return EXIT_SUCCESS;
}
````
|
How to use ChakraCore Debug API
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4699/comments
| 18 |
2018-02-18T21:23:03Z
|
2021-01-25T22:01:47Z
|
https://github.com/chakra-core/ChakraCore/issues/4699
| 298,119,477 | 4,699 |
[
"chakra-core",
"ChakraCore"
] |
If ICU can't be found as the user-provided path, the build fails on Linux and falls back to --no-icu on macOS. We should probably choose 1 and stick with it.
|
ICU configuration is inconsistent across Linux and macOS
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4695/comments
| 3 |
2018-02-17T00:27:49Z
|
2019-06-07T18:37:20Z
|
https://github.com/chakra-core/ChakraCore/issues/4695
| 297,959,758 | 4,695 |
[
"chakra-core",
"ChakraCore"
] |
Found this while investigating #3096. As a result of that bug, we don't have any tests for timeZone or timeZoneName in ChakraCore, and so we never noticed that the implementation is broken with ICU.
|
Intl.DateTimeFormat with timeZone and timeZoneName options crashes
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4694/comments
| 0 |
2018-02-17T00:24:33Z
|
2018-02-21T17:54:24Z
|
https://github.com/chakra-core/ChakraCore/issues/4694
| 297,959,372 | 4,694 |
[
"chakra-core",
"ChakraCore"
] |
From https://github.com/Microsoft/ChakraCore/issues/3575
> I think a lot of integrators would like to get the default "built-ins" before the script mess with it on the global.
|
Add JSRT API to get default built-ins regardless of changes a script makes.
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4690/comments
| 16 |
2018-02-16T03:28:33Z
|
2018-02-23T20:04:42Z
|
https://github.com/chakra-core/ChakraCore/issues/4690
| 297,672,552 | 4,690 |
[
"chakra-core",
"ChakraCore"
] |
test description
test edit please ignore -PWiz
|
Test issue
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4689/comments
| 0 |
2018-02-16T01:36:04Z
|
2018-02-16T01:40:57Z
|
https://github.com/chakra-core/ChakraCore/issues/4689
| 297,656,438 | 4,689 |
[
"chakra-core",
"ChakraCore"
] |
I couldn't find anywhere that this was a known issue, but regex look ahead/behind is not supported. But it is in Chrome which caused me some headaches :-)
This gives an 'Unexpected quantifier' error (taken from a [SO answer](https://stackoverflow.com/a/15099212/1478) to find single digits):
`var reSingleDigits = /(?<!\S)\d(?![^\s.,?!])/;`
|
RegEx Look Ahead/Behind Not Supported
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4687/comments
| 4 |
2018-02-15T11:12:54Z
|
2018-02-17T01:21:50Z
|
https://github.com/chakra-core/ChakraCore/issues/4687
| 297,408,477 | 4,687 |
[
"chakra-core",
"ChakraCore"
] |
I am trying to store some binary data for other callers of the function but i cant see how this can be done. I have tried CreateExternalObject and Get/SetExternalData but i just get exceptions. I am using the Hosting code, but it just calls into native calls.
What I am trying to emulate is a set of image manipulation functions on an object/class/function like, so when i construct my Image object i stream an image and then i can perform other operations on that image data before i save and close it:
```
var img = new Image( filepath );
img.quality = 100;
img.resize(1000,500);
img.save(newfilepath);
img.close();
```
This is what i have tried so far:
```
DefineFunctionCallback( globalObject, "Image", ImageDelegate, IntPtr.Zero );
var delegateFuncId = globalObject.GetProperty( JavaScriptPropertyId.FromString( "ImageDelegate" ) );
DefineFunctionCallback( delegateFuncId, "save", SaveDelegate, IntPtr.Zero );
public static JavaScriptValue ImageDelegate( JavaScriptValue callee, bool isConstructCall, JavaScriptValue[] arguments, ushort argumentCount, IntPtr callbackData )
{
// First argument is the function name, so start looking at arguments from index 1...
if( argumentCount < 1 )
{
ChakraScriptRunner.ThrowJavascriptException( "Invalid number of arguments to ImageDelegate( info )" );
return JavaScriptValue.Invalid;
}
try
{
var info = arguments[ 1 ].ConvertToString().ToString();
var obj = new MyImageObject( info );
var objHandle = GCHandle.Alloc( obj );
// This throws and InvalidArgument Exception
callee.ExternalData = (IntPtr)objHandle;
// This works but i cant get the data back out from 'save' function
JavaScriptValue val = ChakraScriptHelpers.CreateExternalObject( (IntPtr)objHandle, PawaImageFinalizeCallback );
callee.SetProperty( JavaScriptPropertyId.FromString( "imageData" ), val, true );
return callee;
}
catch( Exception ex )
{
// we must catch normal exceptions and throw them as JS ones when in delegates otherwise we get issues further downstream
ChakraScriptRunner.ThrowJavascriptException( ex.Message );
return JavaScriptValue.Invalid;
}
}
public static JavaScriptValue SaveDelegate( JavaScriptValue callee, bool isConstructCall, JavaScriptValue[] arguments, ushort argumentCount, IntPtr callbackData )
{
try
{
// infoPtr is always Zero
IntPtr infoPtr = callee.HasExternalData ? callee.ExternalData : IntPtr.Zero;
if( infoPtr != IntPtr.Zero )
{
var imageHandle = (GCHandle)infoPtr;
var image = ( imageHandle.Target as MyImageObject );
}
JavaScriptValue imageVal = callee.GetProperty( JavaScriptPropertyId.FromString( "imageData" ) );
IntPtr imagePtr2 = ChakraScriptHelpers.GetExternalData( imageVal );
// imagePtr2 is also Zero
if( imagePtr2 != IntPtr.Zero )
{
var imageHandle = (GCHandle)imagePtr2;
var image = ( imageHandle.Target as MyImageObject );
}
return callee;
}
catch( Exception ex )
{
// we must catch normal exceptions and throw them as JS ones when in delegates otherwise we get issues further downstream
ChakraScriptRunner.ThrowJavascriptException( ex.Message );
return JavaScriptValue.Invalid;
}
}
```
|
How Can I Store Some C# Object Data on a Function Instance
|
https://api.github.com/repos/chakra-core/ChakraCore/issues/4679/comments
| 11 |
2018-02-14T16:57:50Z
|
2018-02-16T17:42:59Z
|
https://github.com/chakra-core/ChakraCore/issues/4679
| 297,170,894 | 4,679 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.