[rust-dev] Bus error: 10
I am getting a Bus error - please see the following.Should I file this as an issue in github? amitava:learn amitava$ cat app.rs // vi:ts=4:sw=4:nu fn main() { // should not compile - infinite size, needs redirection struct Foo { child: OptionFoo }; let c = Foo {child: None}; let p = Foo {child : Some(c) }; //printfln!(%?, p); } amitava:learn amitava$ make rustc -Z debug-info -o app app.rs app.rs:10:5: 10:6 warning: unused variable: `p` [-W unused-variable (default)] app.rs:10 let p = Foo {child : Some(c) }; ^ make: *** [app] Bus error: 10 amitava:learn amitava$ rustc --version rustc 0.8-pre (da96b3e 2013-08-28 14:15:37 -0700) host: x86_64-apple-darwin amitava:learn amitava$ uname -a Darwin amitava.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64 Thanks Regards, Amitava ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] Bus error: 10
That's covered by https://github.com/mozilla/rust/issues/4363https://github.com/mozilla/rust/issues/4363in the issue tracker. Cheers, Josh On 28 August 2013 19:39, Amitava Shee amitava.s...@gmail.com wrote: I am getting a Bus error - please see the following.Should I file this as an issue in github? amitava:learn amitava$ cat app.rs // vi:ts=4:sw=4:nu fn main() { // should not compile - infinite size, needs redirection struct Foo { child: OptionFoo }; let c = Foo {child: None}; let p = Foo {child : Some(c) }; //printfln!(%?, p); } amitava:learn amitava$ make rustc -Z debug-info -o app app.rs app.rs:10:5: 10:6 warning: unused variable: `p` [-W unused-variable (default)] app.rs:10 let p = Foo {child : Some(c) }; ^ make: *** [app] Bus error: 10 amitava:learn amitava$ rustc --version rustc 0.8-pre (da96b3e 2013-08-28 14:15:37 -0700) host: x86_64-apple-darwin amitava:learn amitava$ uname -a Darwin amitava.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May 1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64 Thanks Regards, Amitava ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev
Re: [rust-dev] Bus error: 10
This is a known bug: https://github.com/mozilla/rust/issues/3779 The fix, which you probably realized, is to change OptionFoo to Option~Foo or Option@Foo. Cheers, Tim -- Tim Chevalier * http://catamorphism.org/ * Often in error, never in doubt Being queer is not about a right to privacy; it is about the freedom to be public, to just be who we are. -- anonymous, June 1990 ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev