Skip to content

Accidentally "SIGSEGV: Illegal storage access" error after arc optimizations (#13325) #13709

Closed
@khchen

Description

@khchen

Recently, I am trying to update wNim to compile with --gc:arc.
I am almost done. Everything is fine except some bugs (already fixed, thanks to Araq).
I created a branch for my current effort: https://github.com/khchen/wNim/tree/arc

However, the things go bad after following commit:

commit fb641483f0e2ed974b89d629ea5ec28e5e6145ce
Author: Andreas Rumpf <[email protected]>
Date:   Wed Mar 18 16:57:34 2020 +0100

    arc optimizations (#13325)

    * scope based destructors
    * handle 'or' and 'and' expressions properly, see the new test arc/tcontrolflow.nim
    * make this branch mergable, logic is disabled for now

The worst thing is that I cannot find out why the error happens. Sometimes it is nonsense for me. For example, the following two code cause different error message:

import winim/winstr
import wNim/[wApp, wFrame, wPanel, wButton]

let frame = Frame()
let panel = Panel(frame)
let button = Button(panel)
import wNim/[wApp, wFrame, wPanel, wButton]

let frame = Frame()
let panel = Panel(frame)
let button = Button(panel)

Sorry for that I failed to simplify the problem, but I am sure both codes works before "arc optimizations (#13325)" commit. Maybe someone can help me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions