{"action":"created","issue":{"url":"https://api.github.com/repos/capstone-rust/capstone-rs/issues/23","repository_url":"https://api.github.com/repos/capstone-rust/capstone-rs","labels_url":"https://api.github.com/repos/capstone-rust/capstone-rs/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/capstone-rust/capstone-rs/issues/23/comments","events_url":"https://api.github.com/repos/capstone-rust/capstone-rs/issues/23/events","html_url":"https://github.com/capstone-rust/capstone-rs/pull/23","id":275481277,"number":23,"title":"Marked instruction with std::maker::sync.","user":{"login":"felberj","id":6639926,"avatar_url":"https://avatars1.githubusercontent.com/u/6639926?v=4","gravatar_id":"","url":"https://api.github.com/users/felberj","html_url":"https://github.com/felberj","followers_url":"https://api.github.com/users/felberj/followers","following_url":"https://api.github.com/users/felberj/following{/other_user}","gists_url":"https://api.github.com/users/felberj/gists{/gist_id}","starred_url":"https://api.github.com/users/felberj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felberj/subscriptions","organizations_url":"https://api.github.com/users/felberj/orgs","repos_url":"https://api.github.com/users/felberj/repos","events_url":"https://api.github.com/users/felberj/events{/privacy}","received_events_url":"https://api.github.com/users/felberj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-20T20:05:14Z","updated_at":"2017-11-21T08:02:23Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/capstone-rust/capstone-rs/pulls/23","html_url":"https://github.com/capstone-rust/capstone-rs/pull/23","diff_url":"https://github.com/capstone-rust/capstone-rs/pull/23.diff","patch_url":"https://github.com/capstone-rust/capstone-rs/pull/23.patch"},"body":"This is done to make it usable by multiple threads. Capstone claims to be 'Thread-safe by design', so this should work.\r\n\r\nNote that there are two flaky tests: They sometimes fail with and without my commit.\r\n\r\n```\r\ntest test::test_instruction_group_ids ... FAILED\r\nfailures:\r\n\r\n---- test::test_instruction_group_ids stdout ----\r\n\tthread 'test::test_instruction_group_ids' panicked at 'Expected groups {1} does NOT match computed insn groups {110} with ', src/lib.rs:287:8\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n```\r\n\r\n```\r\ntest test::test_syntax ... FAILED\r\nfailures:\r\n\r\n---- test::test_syntax stdout ----\r\n\tthread 'test::test_syntax' panicked at 'index 86 out of range for slice of length 8', src/libcore/slice/mod.rs:735:4\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n```"},"comment":{"url":"https://api.github.com/repos/capstone-rust/capstone-rs/issues/comments/345946603","html_url":"https://github.com/capstone-rust/capstone-rs/pull/23#issuecomment-345946603","issue_url":"https://api.github.com/repos/capstone-rust/capstone-rs/issues/23","id":345946603,"user":{"login":"felberj","id":6639926,"avatar_url":"https://avatars1.githubusercontent.com/u/6639926?v=4","gravatar_id":"","url":"https://api.github.com/users/felberj","html_url":"https://github.com/felberj","followers_url":"https://api.github.com/users/felberj/followers","following_url":"https://api.github.com/users/felberj/following{/other_user}","gists_url":"https://api.github.com/users/felberj/gists{/gist_id}","starred_url":"https://api.github.com/users/felberj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felberj/subscriptions","organizations_url":"https://api.github.com/users/felberj/orgs","repos_url":"https://api.github.com/users/felberj/repos","events_url":"https://api.github.com/users/felberj/events{/privacy}","received_events_url":"https://api.github.com/users/felberj/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T08:02:23Z","updated_at":"2017-11-21T08:02:23Z","author_association":"NONE","body":"I just realised this needs more work:\r\n\r\n```\r\nerror[E0277]: the trait bound `*mut capstone_sys::cs_detail: std::marker::Sync` is not satisfied in `capstone::Insn`\r\n   --> src/lib.rs:190:9\r\n    |\r\n190 |         thread::spawn(move || {\r\n    |         ^^^^^^^^^^^^^ `*mut capstone_sys::cs_detail` cannot be shared between threads safely\r\n    |\r\n    = help: within `capstone::Insn`, the trait `std::marker::Sync` is not implemented for `*mut capstone_sys::cs_detail`\r\n    = note: required because it appears within the type `capstone_sys::cs_insn`\r\n    = note: required because it appears within the type `capstone::Insn`\r\n```\r\n\r\nDo you think I can just edit [this](https://github.com/capstone-rust/capstone-sys/blob/8adf9a5c26da13345028f0515e7cf383a3c284b5/pre_generated/capstone.rs#L8432)?"}}
{"actor":{"display_login":"felberj"}}