Skip to content

Random Storage_Error in Libadalang.Implementation.Inc_Ref during Libadalang.Rewriting #953

Closed
@dsauvage

Description

@dsauvage

Environment
Debian GNU/Linux 10/11 x86_64
GNAT 12.1.2 (66b989b5)
Libadalang 22.0.0 (5f365aa4)

Bug description
After Libadalang.Rewriting.Apply is done successfully, calls to Libadalang.Rewriting.Unit are made to generate new source files.
However Storage_Error is raised in Libadalang.Implementation.Inc_Ref as it is called by Libadalang.Analysis.Wrap_Context.

Changing Analysis_Context_Type.Ref_Count type from Natural to aliased GNATCOLL.Atomic.Atomic_Counter, and updating Inc_Ref and Dec_Ref accordingly fixes the issue.

Note: This issue occurs randomly.

184001354-ref_count.patch.gz

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