Skip to content

Segfault with deserialize #198

@dionisos2

Description

@dionisos2

Working example that will segfault :

using SymEngine
using Serialization
@vars x
serialize("serial_file", Dict(x=>1))
deserialize("serial_file")

Expected behavior : Throw a error about it being impossible to serialize/deserialize Basic object or make it works.

Probable cause : Julia reconstructs the Basic object x containing a pointer. To build the Dict , it then hashes x . Hashing of a Basic type is defined by basic_hash(ex::Basic) = ccall((:basic_hash, libsymengine), UInt, (Ref{Basic}, ), ex)

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