Skip to content

Create checks to avoid a StackOverflowError #53

@ronisbr

Description

@ronisbr

Hi!

I was using a structure inside a workspace for OrdinaryDiffEq and I was getting this error:

ERROR: StackOverflowError:
Stacktrace:
 [1] ismutable(::Type{T} where T) at /Users/ronisbr/.julia/packages/ArrayInterface/YFV07/src/ArrayInterface.jl:19 (repeats 79978 times)

It seems that something is not defined inside ArrayInterface. I can reproduce it with the following MWE:

julia> mutable struct A
       a
       end

julia> t = A(1)

julia> ArrayInterface.ismutable(t)
ERROR: StackOverflowError:
Stacktrace:
 [1] ismutable(::Type{T} where T) at /Users/ronisbr/.julia/packages/ArrayInterface/YFV07/src/ArrayInterface.jl:19 (repeats 79978 times)

Question: can we define a fallback function that prints an error when we do not know if the type is or isn't mutable?

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