exaloop / exaloop/codon

Incorrect type hints cause segfault.

Open
#355 3 comments 0 reactions 1 assignee Claimed by @inumanag View on GitHub
bug
Dominant language
Python
Stars
16.8k
Forks
603
Avg merge
4d 23h
Merged PRs (30d)
6

Description

The following code provides a type hint that indicates that the variable a should be a list of integers while the actual type is int. Then codon gets a segfault. CPython can normally print "1" with this test.

test.py
```
a = 1 # a: int
a: list[int]
print(a)
```
The actual output: Segmentation Fault
The expected output: 1

Reproduce step:
> download the Pre-built binaries for Linux
> Type " codon run --release test.py" in the console.

Environment:
Ubuntu 18.04
Codon v0.16.0
CPython 3.10.8

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.