Skip to content

Infinite recursion after grouped objects are returned unlocked #4173

@mllg

Description

@mllg

11ab05a introduced an infinite recursion:

  # from the commit:
  runlock = function(x) {
    if (is.recursive(x)) {
      if (inherits(x, 'data.table')) .Call(C_unlock, x)
      else return(lapply(x, runlock))
    }
    return(invisible())
  }

# example input data
x = new.env()
x$a = 2
x$b = x

runlock(x)

Background: we are creating R6 objects (basically environments) from grouped subsets of the data. Some of these objects have references to each other (c.f. https://github.com/mlr-org/mlr3/blob/master/R/BenchmarkResult.R#L226).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions