Jump to content

Ricardo D.

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

2 Neutral
  1. I found a workaround for this: https://stackoverflow.com/questions/34033790/go-programs-hanging-on-windows-10 The trick is to set this environment variable: go env -w GOTMPDIR="C:\Users<user>\go\tmp" Now go run creates the executable there instead of in /tmp. Kaspersky doesn't seem to be bothered by that. I had disabled Kaspersky and was using Windows Defender when I applied that solution, and it still complained, but then I added an exclusion to that folder and it fixed the issue. Now I've reinstalled Kaspersky and it is also working fine with go run now.
  2. I think I'm facing a similar issue. This program: // Copyright © 2016 Alan A. A. Donovan & Brian W. Kernighan. // License: https://creativecommons.org/licenses/by-nc-sa/4.0/ // See page 4. //!+ // Echo1 prints its command-line arguments. package main import ( "fmt" "os" ) func main() { var s, sep string for i := 1; i < len(os.Args); i++ { s += sep + os.Args[i] sep = " " } fmt.Println(s) } //!- runs normally like this: > go run main.go one two three one two three But when I modify it to debug the sep variable: package main import ( "fmt" "os" ) func main() { var s, sep string fmt.Println("{", sep, "}") for i := 1; i < len(os.Args); i++ { fmt.Println("<", sep, ">") s += sep + os.Args[i] sep = " " } fmt.Println(s) } then I get this: PS C:\Users\Ricardo\Documents\workspace\go\rdirani\gopl.io\ch1\echo1> go run echo1.go one two three fork/exec C:\Users\Ricardo\AppData\Local\Temp\go-build1657779692\b001\exe\echo1.exe: Access is denied. And Kaspersky records this: Event: Application placed in restricted group Component: Application Control Name: VHO:Backdoor.MSIL.Crysan.gen Object name: Untrusted Reason: Detected: VHO:Backdoor.MSIL.Crysan.gen and it doesn't give me any option to report this as a false positive. Interestingly, if I build it, it doesn't get flagged: PS C:\Users\Ricardo\Documents\workspace\go\rdirani\gopl.io\ch1\echo1> ./echo1 one two three { } < > < > < > one two three
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.