Quantcast
Channel: ClearScript
Viewing all 2297 articles
Browse latest View live

Commented Unassigned: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.
Comments: Hi again, We're still unable to reproduce a memory leak using your test application on Windows 7 or 10. Clicking on the "Test VB-Script" button multiple times increases memory usage at first, but it levels off after a few dozen iterations and then remains stable through several hundred additional iterations. Please see the attached screenshot from Windows 10. We've also run a different test that uses a single `VBScriptEngine` instance to evaluate random `x ± y` expressions _millions_ of times, with similar results. Memory usage goes up initially but levels off quickly. Unfortunately we can't explain why our results differ from yours. VBScript is a COM component and therefore subject to registry-based redirection, but that's just a wild guess. Would it be possible for you to run the test on a different machine or clean VM to determine whether you can reproduce the leak consistently? Thanks!

Commented Unassigned: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.
Comments: Hi, now, I've tested my test application under a fresh installed virtual machine with Windows 7x32 and in addition with Windows 10 x64 and in both machines I get now the same result as you - no memory leak at all. I guess that the problem on my development machine is located as you already described. So this issue isn't one of ClearScript. Nervertheless, thank you very much for your efforts!

Closed Unassigned: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.
Comments: No problem at all. Thank you!

Edited Issue: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.

Reopened Issue: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.

Edited Issue: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.

Closed Issue: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.

Commented Issue: [BUG] [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.
Comments: No problem at all. Thank you!

Edited Issue: [VBScriptEngine] Process memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.

Edited Issue: Memory leak when re-evaluating scripts with VBScriptEngine [117]

0
0
In version 5.4.7 and 5.4.8 there's still a memory leak related to script evaluations with the VBScriptEngine.
I've attached a test project, where 1000 predefined equations can be evaluated with VBScriptEngine or with the V8 engine. When re-evaluating the equations with V8 engine, the used process memory keeps stable, but not with the VBScriptEnginge. It seems to be an unmanaged memory leak.
To run the attached test project properly, ClearScript has to be added via nuget first.

Created Unassigned: V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable in quick succession [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.

Edited Unassigned: [BUG] V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable multiple times [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.

Edited Unassigned: [BUG] V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable multiple times [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.

Commented Unassigned: [BUG] V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable multiple times [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.
Comments: Hello! This appears to be the same issue that was reported [here](https://clearscript.codeplex.com/discussions/658021). Please try ClearScript 5.4.8. If you're using a NuGet package that hasn't been updated, we recommend that you contact its owners. Thanks!

Commented Unassigned: [BUG] V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable multiple times [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.
Comments: Hello! This appears to be the same issue that was reported [here](https://clearscript.codeplex.com/discussions/658021). Please try ClearScript 5.4.8. If you're using a NuGet package that hasn't been updated, we recommend that you contact its owners or build ClearScript yourself using the procedure outlined in the [ReadMe](https://clearscript.codeplex.com/SourceControl/latest#ReadMe.txt). Thanks!

Closed Unassigned: [BUG] V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable multiple times [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.

Edited Issue: [BUG] V8 crashes with an AccessViolationException when using for (.. of ..) on an IEnumerable multiple times [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.

Edited Issue: [BUG] [V8] Crash during IEnumerable iteration [118]

0
0
The following script crashes consistently when using 3 iterations in the outer for loop, but runs fine when using 2 iterations.

for (var i = 0; i < 3 /*2 is fine*/; ++i)
{
for (var test of list)
{
}
}

where list is a List<int>. Necessary initialization code is:
var engine = new V8ScriptEngine();
var list = new List<int>();
engine.AddHostObject("list", list);
engine.Execute(...);

Spreading out the enumerator accesses over multiple engine.Execute calls does not seem to cause the problem.

New Post: Script Security

0
0
Hello,

I would like implement some security feature to prevent user from executing malicious script.
like scripts contains some script to delete file.Is any code access security is option available in java script. Any is there any way to achieve this?

Thanks
Praveen

New Post: Script Security

0
0
Hello Praveen,

Initially a ClearScript JavaScript engine provides no access to the file system. It exposes no APIs except JavaScript intrinsics such as Object, Function, and Math. For script code to have access to the file system, the host must expose objects or types that provide such access, and these resources can impose whatever security restrictions are required.

However, be aware that V8 is not a sandbox. Malicious JavaScript code running in V8 may not have file access, but it can easily crash its host process. V8 was designed specifically for Chrome, which has a multi-process architecture and can withstand such crashes. Therefore, if your plan is to use V8 to run unknown or untrusted script code, consider doing so in a dedicated process.

Good luck!
Viewing all 2297 articles
Browse latest View live




Latest Images