-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
CGO Unsetenv does not work on macOS 10.15.2 #36705
Comments
It seems the argument passed https://golang.org/src/runtime/cgo/gcc_setenv.c is incorrect |
x_cgo_unsetenv did not properly deference the arg pointer when calling unsetenv. Fixes golang#36705
x_cgo_unsetenv did not properly deference the arg pointer when calling unsetenv. Fixes golang#36705
Change https://golang.org/cl/215941 mentions this issue: |
Yep, this is indeed a bug. I don't think this ever worked. |
Change https://golang.org/cl/215942 mentions this issue: |
Simultaneous CLs, oops. |
@randall77 It's probably easier if I just hand off the process to your team, right? |
Sure, that's fine. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Print out empty string in both
C.getenv
callsWhat did you see instead?
I see "bar" as a result of the first
C.getenv
callIt looks like the argument to
unsetenv
is corrupted when called fromos.Unsetenv
Take a look at the argument dump from breaking on
getenv()
originating fromos.Unsetenv
andC.unsetenv
The text was updated successfully, but these errors were encountered: