Skip to content

Issue detecting loop #7

@amonaco

Description

@amonaco

Hello Thiago,

Thanks for the great work and effort in this library. I have an issue detecting loops when the loop is inside an async library call:

async.parallel([function(cb) { cb (null, true); }], function(error, result) {

  var arr_a = [0, 1, 2, 3, 4];
  var arr_b = [];

  arr_b = arr_a;
  // arr_b = _.clone(arr_a);

  // infinite loop
  for (i = 0; i < arr_a.length; i++) {
    arr_b.push("foo");
  }
});

Any clues on why is the loop not being detected?

Since I'm building a sandbox for running 'untrusted' code I'm trying to find the best way to avoid a resource bomb like this.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions