Skip to content
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

Segfault on Intel mac #5

Open
mcdallas opened this issue Sep 29, 2023 · 0 comments · May be fixed by #7
Open

Segfault on Intel mac #5

mcdallas opened this issue Sep 29, 2023 · 0 comments · May be fixed by #7

Comments

@mcdallas
Copy link

> cargo run 
    Finished dev [optimized + debuginfo] target(s) in 0.21s
     Running `target/debug/chrs`
[1]    46448 segmentation fault  cargo run

Something to do with the RNG

> lldb target/debug/chrs 
(lldb) target create "target/debug/chrs"
Current executable set to '/Users/mike/dev/chess-rs/target/debug/chrs' (x86_64).
(lldb) run
Process 44958 launched: '/Users/mike/dev/chess-rs/target/debug/chrs' (x86_64)
2023-09-29 16:50:22.391904+0100 chrs[44958:854203] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=44958
2023-09-29 16:50:22.392002+0100 chrs[44958:854203] SecTaskCopyDebugDescription: chrs[44958]/0#-1 LF=0
Process 44958 stopped
* thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x0000000100567e69 chrs`rand_chacha::guts::refill_wide::impl_avx2::hfed09f57a1cc3a1f at guts.rs:121:36 [opt]
   118 	) {
   119 	    let k = m.vec([0x6170_7865, 0x3320_646e, 0x7962_2d32, 0x6b20_6574]);
   120 	    let mut pos = state.pos64(m);
-> 121 	    let d0: Mach::u32x4 = m.unpack(state.d);
   122 	    pos = pos.wrapping_add(1);
   123 	    let d1 = d0.insert((pos >> 32) as u32, 1).insert(pos as u32, 0);
   124 	    pos = pos.wrapping_add(1);
Target 0: (chrs) stopped.
warning: chrs was compiled with optimization - stepping may behave oddly; variables may not be available.

it works fine with trunk serve

@mcdallas mcdallas linked a pull request Sep 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant