Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal: Value receiver for function call is dead. #1965

Open
lopopolo opened this issue Jul 23, 2022 · 4 comments
Open

fatal: Value receiver for function call is dead. #1965

lopopolo opened this issue Jul 23, 2022 · 4 comments
Labels
A-memory-management Area: Memory management and garbage collection. A-vm Area: Interpreter VM implementations. B-mruby Backend: Implementation of artichoke-core using mruby. C-bug Category: This is a bug. E-hard Call for participation: Experience needed to fix: Hard / a lot.

Comments

@lopopolo
Copy link
Member

Got this Artichoke bug / fatal output when running the class specs:

An exception occurred during: loading core/class/new_spec.rb
fatal: Value receiver for function call is dead. This indicates a bug in the mruby garbage collector. Please leave a comment at https://github.com/artichoke/artichoke/issues/1336.

(eval):590:in each
/artichoke/virtual_root/src/lib/spec_runner.rb:74:in run_specs
(eval):1

This was the spec config:

# This config file lists the largest set of ruby/specs from the `core` group
# that will let Artichoke Ruby run the spec-runner harness to completion.
#
# Valid values for `include` are:
#
# - all - run all specs. When `include` is set to `all`, the optional `skip`
#   field may list specs to skip.
# - none - run no specs, equivalent to the section not being present in this
#   config file.
# - `set` - run an enumerated set of specs. When `include` is set to `set`, the
#   set of specs must be listed in the required `specs` field, which is a list
#   of strings.

## Ruby Core

[specs.core.argf]
include = "all"

[specs.core.array]
include = "set"
specs = [
  "any",
  "append",
  "array",
  "assoc",
  "at",
  "clear",
  "collect",
  "combination",
  "compact",
  "concat",
  "constructor",
  "count",
  "cycle",
  "delete",
  "delete_at",
  "delete_if",
  "drop",
  "drop_while",
  "each",
  "each_index",
  "empty",
  "first",
  "frozen",
  "include",
  "last",
  "length",
  "map",
  "multiply",
  "plus",
  "prepend",
  "push",
  "rassoc",
  "replace",
  "reverse",
  "reverse_each",
  "shift",
  "size",
  "sort_by",
  "to_ary",
  "try_convert",
  "unshift",
]

[specs.core.basicobject]
include = "all"

[specs.core.binding]
include = "none"

[specs.core.builtin_constants]
include = "all"

[specs.core.class]
include = "all"

[specs.core.comparable]
include = "none"

[specs.core.complex]
include = "none"

[specs.core.dir]
include = "none"

[specs.core.encoding]
include = "none"

[specs.core.enumerable]
include = "none"

[specs.core.enumerator]
include = "none"

[specs.core.env]
include = "none"

[specs.core.exception]
include = "none"

[specs.core.false]
include = "none"

[specs.core.fiber]
include = "none"

[specs.core.file]
include = "none"

[specs.core.filetest]
include = "none"

[specs.core.float]
include = "none"

[specs.core.gc]
include = "none"

[specs.core.hash]
include = "none"
skip = [
  # This generates a `SystemStackError` on recursive hashes that takes an
  # eternity to print out when running with the `artichok` or `yaml` formatter.
  "eql",
  # This generates a `SystemStackError` on recursive hashes that takes an
  # eternity to print out when running with the `artichok` or `yaml` formatter.
  "equal_value",
]

[specs.core.integer]
include = "none"

[specs.core.io]
include = "none"

[specs.core.kernel]
include = "none"

[specs.core.main]
include = "none"

[specs.core.marshal]
include = "none"

[specs.core.matchdata]
include = "none"

[specs.core.math]
include = "none"

[specs.core.method]
include = "none"

[specs.core.module]
include = "none"

[specs.core.mutex]
include = "none"

[specs.core.nil]
include = "none"

[specs.core.numeric]
include = "none"

[specs.core.objectspace]
include = "none"

[specs.core.proc]
include = "none"

[specs.core.process]
include = "none"

[specs.core.queue]
include = "none"

[specs.core.random]
include = "none"

[specs.core.range]
include = "none"

[specs.core.rational]
include = "none"

[specs.core.regexp]
include = "none"

[specs.core.signal]
include = "none"

[specs.core.sizedqueue]
include = "none"

[specs.core.string]
include = "none"

[specs.core.struct]
include = "none"

[specs.core.symbol]
include = "none"

[specs.core.systemexit]
include = "none"

[specs.core.thread]
include = "none"

[specs.core.threadgroup]
include = "none"

[specs.core.time]
include = "none"

[specs.core.tracepoint]
include = "none"

[specs.core.true]
include = "none"

[specs.core.unboundmethod]
include = "none"

[specs.core.warning]
include = "none"
@lopopolo lopopolo added C-bug Category: This is a bug. A-vm Area: Interpreter VM implementations. A-memory-management Area: Memory management and garbage collection. B-mruby Backend: Implementation of artichoke-core using mruby. labels Jul 23, 2022
@lopopolo
Copy link
Member Author

Also see this in ARGF when creating fixtures from text files.

Array#first when doing implicit conversion to int.

I think we might be missing an arena in the implicit conversion functions.

@lopopolo lopopolo added the E-hard Call for participation: Experience needed to fix: Hard / a lot. label Jul 23, 2022
@lopopolo
Copy link
Member Author

lopopolo commented Jul 23, 2022

Some of these appear to be from codegen errors that are not really catchable.

See below for one example:

@lopopolo
Copy link
Member Author

lopopolo commented Aug 23, 2022

This PR fixes a bunch of these:

@lopopolo
Copy link
Member Author

Backports for codegen and syntax error fixes is tracked here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-memory-management Area: Memory management and garbage collection. A-vm Area: Interpreter VM implementations. B-mruby Backend: Implementation of artichoke-core using mruby. C-bug Category: This is a bug. E-hard Call for participation: Experience needed to fix: Hard / a lot.
Development

No branches or pull requests

1 participant