You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my operating system is debian10
$ cat /etc/debian_version
10.3
$ uname -a
Linux i5debain 4.19.0-8-amd64 feat(layout) www.rust-lang.org#1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
cargo version
i5debain:projects/issue/something $ cargo --version
cargo 1.42.0 (8633429 2020-01-31)
cargo run get "Segmentaion fault"
i5debain:projects $ mkdir issue
i5debain:projects $ cd issue/
i5debain:projects/issue $ ls
i5debain:projects/issue $ cargo new something
Created binary (application) something package
i5debain:projects/issue $ cd something/
i5debain:projects/issue/something$ cargo run
Compiling something v0.1.0 (/home/zoujie/projects/issue/something)
Finished dev [unoptimized + debuginfo] target(s) in 0.20s
Running target/debug/something
Segmentation fault
rustc works ok
i5debain:projects/issue/something $ rustc src/main.rs
i5debain:projects/issue/something $ ./main
Hello, world!
Steps
Possible Solution(s)
Notes
Output of cargo version:
The text was updated successfully, but these errors were encountered:
Reading symbols from ./something/target/debug/something...done.
(gdb) b 2
Breakpoint 1 at 0x9: file src/main.rs, line 2.
(gdb) r
Starting program: /home/zoujie/projects/issue/something/target/debug/something
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000001 in ?? ()
(gdb)
with someone's help,I figure out .
Because I had add follow two line to my ~/.cargo/config
#[target.'cfg(target_os = "linux")']
#rustflags = ["-C", "link-arg=-nostartfiles"]
so binary can't find main enterpoint.
my operating system is debian10
$ cat /etc/debian_version
10.3
$ uname -a
Linux i5debain 4.19.0-8-amd64 feat(layout) www.rust-lang.org#1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
cargo version
i5debain:projects/issue/something $ cargo --version
cargo 1.42.0 (8633429 2020-01-31)
cargo run get "Segmentaion fault"
i5debain:projects $ mkdir issue
i5debain:projects $ cd issue/
i5debain:projects/issue $ ls
i5debain:projects/issue $ cargo new something
Created binary (application) something package
i5debain:projects/issue $ cd something/
i5debain:projects/issue/something$ cargo run
Compiling something v0.1.0 (/home/zoujie/projects/issue/something)
Finished dev [unoptimized + debuginfo] target(s) in 0.20s
Running target/debug/something
Segmentation fault
rustc works ok
i5debain:projects/issue/something $ rustc src/main.rs
i5debain:projects/issue/something $ ./main
Hello, world!
Steps
Possible Solution(s)
Notes
Output of
cargo version
:The text was updated successfully, but these errors were encountered: