exaloop / exaloop/codon

Segmentation fault is caused with pyext mode when a method takes an object of another class as input

Open
#439 2 comments 0 reactions 2 assignees Claimed by @arshajii View on GitHub
Dominant language
Python
Stars
16.8k
Forks
603
Avg merge
4d 23h
Merged PRs (30d)
6

Description

Hi, thank you for maintaining this fantastic software.

I found that the following codon code compiled with `-pyext`:
```python
@dataclass(python=True, repr=True)
class Foo:
a: float

@dataclass(python=True, repr=True)
class Bar:
def func(self, foo: Foo):
print(foo)

def func(foo: Foo):
print(foo)
```
can cause segmentation fault by the following Python code
```python
from codon_module import Foo, Bar

Bar().func(Foo())
```
I also found the following code properly works:

```python
from codon_module import Foo, func

func(Foo())
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.