I'm running a simple 'hello world' style program written in Go, and when I run it from the command line I get the compiled file blocked, and a false positive hit on a virus.
Steps to reproduce on Windows 10 , latest build:
- Install Go Lang from the official site
- Install Visual Studio Code
- Enable Go support in Visual Studio
- Create this program (saved as main.go) in Visual Studio Code:
package main
import "fmt"
func main() {
fmt.Println("Hi there!")
}
- Go to a command prompt into that directory and type
- go run main.go
There will be an 'Access Denied' error as BitDefender blocks the program from running with the following message:
C:\dev\udemy\helloworld>go run main.go
open C:\Users\Someone\AppData\Local\Temp\go-build276929322\b001\exe\main.exe: Access is denied.
go: failed to remove work dir: remove C:\Users\Someone\AppData\Local\Temp\go-build276929322\b001\exe: The process cannot access the file because it is being used by another process.
The message in BitDefender is:
Antivirus
The file C:\Users\Someone\AppData\Local\Temp\go-build276929322\b001\exe\main.exe is infected with Gen:Variant.Bulz.334385. The threat has been successfully blocked, your device is safe.
I performed a full scan, and there is no such virus on the machine.
It seems to be a false positive.
When I run code directly in the IDE, it works fine, being in Visual Studio Code or in WebStorm GoLand.
Can this please be fixed?