Skip to content

World age assertion with setindex!(::SubArray) in a generated function #28595

Closed
@maleadt

Description

@maleadt

MWE reduced from Cassette (cc @jrevels):

bar(x::SubArray) = x[] = 42

@generated foo() = bar(whatever)

macro unused() end

foo()

The full thing used to work in the REPL too, but this MWE seems only to work when put in a file:

$ ./julia/usr/bin/julia src/main.jl
julia: /data/maleadt/Julia/creduce/julia/src/gf.c:1431: jl_method_instance_add_backedge: Assertion `callee->def.method->min_world <= caller->min_world && callee->max_world >= caller->max_world' failed.

release-1.0 built with only LLVM_ASSERTIONS=1 and FORCE_ASSERTIONS=1 set:

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions