Quantcast
Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog



Channel Description:

ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

older | 1 | .... | 110 | 111 | (Page 112) | 113 | 114 | 115 | newer

    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!

    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!

    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!

    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.

    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.

    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.

    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.

    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!

    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.

    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.

    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.

    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.

    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.

    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!

    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!

    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.

    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.

    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.

    0 0
  • 02/09/17--22:14: New Post: Script Security
  • 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

    0 0
  • 02/10/17--11:37: New Post: Script Security
  • 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!

older | 1 | .... | 110 | 111 | (Page 112) | 113 | 114 | 115 | newer