Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler: support pragmas on generic functions #3593

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Mar 23, 2023

Found this while playing around with some generic code. Luckily the fix is very simple.

@dgryski
Copy link
Member

dgryski commented Mar 24, 2023

CI failures.

@aykevl
Copy link
Member Author

aykevl commented Apr 4, 2023

This is very strange. It looks very much like a race condition of some sort.

EDIT 1:This crashes on macOS, sometimes: go test -short -v -p 1

EDIT 2: well that's great. It definitely looks like a race, but -race doesn't catch it.

@aykevl
Copy link
Member Author

aykevl commented Apr 4, 2023

Solid reproducer:

tinygo clean && tinygo build -o test -p 1 ./testdata/generics.go

@aykevl
Copy link
Member Author

aykevl commented Apr 4, 2023

Took me a few hours to create a solid reproducer, but here it is: golang/go#59427

@aykevl aykevl marked this pull request as draft May 2, 2023 14:36
@aykevl aykevl marked this pull request as ready for review May 2, 2023 17:47
@aykevl aykevl marked this pull request as draft May 2, 2023 17:47
@aykevl aykevl marked this pull request as ready for review May 2, 2023 20:20
@aykevl
Copy link
Member Author

aykevl commented May 2, 2023

I think I've fixed the issue. Let's see whether the CI passes this time.

@aykevl
Copy link
Member Author

aykevl commented May 2, 2023

...apparently not. But at least I know how to fix it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants