Skip to content

SIGSEGV using from/import, not using import #9

@maxux

Description

@maxux

Hello,

I hit a weird behavior when I try to import one module I wrote in Nim.

First case

The file mymodule.so is on the current directory.

import mymodule
mymodule.doSomeStuff()

Everything is fine during the process of doSomeStuff

Second case

The file mymodule.so is in a directory called mymodule next to an empty __init__.py file.

from mymodule import mymodule
mymodule.doSomeStuff()

I hit a SIGSEGV during the process of doSomeStuff (GC issue during the middle of a string manipulation).

Is this behavior normal or does I missed something ?
Thanks

EDIT:
Using this method works fine too:

import mymodule.mymodule
mymodule.mymodule.doSomeStuff()

I guess using import ... from ... remap some stuff and break something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions