Skip to content

Operations on StaticArrays give runtime BoundsError #860

@platawiec

Description

@platawiec

Possibly related to #837

This is on Julia 1.4, Zygote 0.6.0, and StaticArrays 0.12.5

using Zygote
using StaticArrays
using LinearAlgebra

Zygote.gradient(x -> norm(x), SVector(1.0, 1.0))

Beginning of stacktrace:

Internal error: encountered unexpected error in runtime:
BoundsError(a=Array{Any, (2,)}[
  Core.Compiler.VarState(typ=Zygote.Pullback{Tuple{typeof(StaticArrays._norm), StaticArrays.Size{(2,)}, StaticArrays.SArray{Tuple{2}, Float64, 1, 2}}, Any}, undef=false),
  Core.Compiler.VarState(typ=Float64, undef=false)], i=(3,))
jl_bounds_error_ints at /Users/julia/buildbot/worker/package_macos64/build/src/rtutils.c:183
stupdate! at /Applications/Julia-1.4.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions