-
Notifications
You must be signed in to change notification settings - Fork 18k
windows cross compile to linux,Run the program appears Segmentation fault #42227
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
Comments
Could you please provide stack trace of the panic or small steps to reproduce? |
gdb bt return this #0 0x00007f2869bb1607 in kill () from /lib64/libc.so.6 #1 0x00005601f5255636 in ?? () #2 0x00005601f5c687f0 in ?? () #3 0x00007f2869be8f5b in __GI__IO_file_doallocate () from /lib64/libc.so.6 #4 0x0000000000000000 in ?? () |
Can you provide the minimal code to reproduce? |
my program is a web service, using the following libraries require ( github.com/astaxie/beego v1.12.2 github.com/disintegration/imaging v1.6.2 github.com/gin-gonic/gin v1.6.3 github.com/spf13/viper v1.7.1 ) I run this cmd in windows env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -gcflags "-N -l" -a -o image_server . and run the binary program image_server in linux, env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -gcflags "-N -l" -a -o image_server.exe . and use dumpbin image_server.exe return this File Type: EXECUTABLE IMAGE Image has the following dependencies: kernel32.dll Summary 8F000 .data 1000 .debug_gdb_scripts 1000 .idata 5C4000 .rdata 43000 .reloc 123000 .symtab 6A6000 .text 1000 .zdebug_abbrev 35000 .zdebug_frame 159000 .zdebug_info E8000 .zdebug_line EC000 .zdebug_loc 7000 .zdebug_pubnames 17000 .zdebug_pubtypes 53000 .zdebug_ranges |
problem solved |
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
Outputgo env
OutputWhat did you expect to see?
What did you see instead?
Segmentation fault
The text was updated successfully, but these errors were encountered: