8000 Fix alignment of stack args on macOS by TotallyGamerJet · Pull Request #310 · ebitengine/purego · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix alignment of stack args on macOS #310

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

Merged
merged 10 commits into from
Apr 11, 2025

Conversation

TotallyGamerJet
Copy link
Collaborator

What issue is this addressing?

Closes #309

What type of issue is this addressing?

bug

What this PR does | solves

fixes issue with alignment on macOS

@TotallyGamerJet
Copy link
Collaborator Author

@hajimehoshi Have you seen this Windows error before with t.TempDir()?

func_test.go:141: Build C:\Users\USER~1\AppData\Local\Temp\TestABI524339155\001\abitest.so
    testing.go:1225: TempDir RemoveAll cleanup: remove C:\Users\USER~1\AppData\Local\Temp\TestABI524339155\001\abitest.so: Access is denied.

Appears similar to golang/go#50051

assert(i != 0);
assert(strcmp(i, "test") == 0);
return a | b | c | d | e | f | g | h;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line.

@hajimehoshi
Copy link
Member

Have you seen this Windows error before with t.TempDir()?

I don't think so. Is there any other process having file handlers in the directory?

@hajimehoshi
Copy link
Member
hajimehoshi commented Apr 11, 2025
	libFileName := filepath.Join(t.TempDir(), "abitest.so")
	t.Logf("Build %v", libFileName)

	if err := buildSharedLib("CC", libFileName, filepath.Join("testdata", "abitest", "abi_test.c")); err != nil {
		t.Fatal(err)
	}
	defer os.Remove(libFileName)

	lib, err := load.OpenLibrary(libFileName)

I guess the test itself opens the lib in the current temporary directory and keeps the handle to it. Would CloseHandle work?

EDIT: os.Remove might return an error.

Copy link
Member
@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@TotallyGamerJet TotallyGamerJet merged commit 9059adf into ebitengine:main Apr 11, 2025
28 checks passed
@TotallyGamerJet TotallyGamerJet deleted the issue-309 branch April 11, 2025 14:47
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.

segfault w/ many args
2 participants
0