-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Illegal instruction (core dumped) with function pointers #3812
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
gist is fine. If there's any way you could try to minimize the code so it shows the same error but is smaller, that would be much appreciated. If not, that's ok. |
Heh, interesting binary... I seem to get about 50% each a segmentation fault or an illegal hardware instruction. Once I even got a bus error... It feels very much like the generated code is jumping somewhere it shouldn't jump to. Maybe a broken virtual table of one of the trait instances? |
@dckc - The gist seems to have disappeared -- is there any way you can copy/paste the code as a comment? Thanks... |
This needs updating for newest |
Unlike past similar work done in rust-lang#6228, expand the existing `or_fun_call` lint to detect `or_insert` calls with a `T::new()` or `T::default()` argument, much like currently done for `unwrap_or` calls. In that case, suggest the use of `or_default`, which is more idiomatic. Note that even with this change, `or_insert_with(T::default)` calls aren't detected as candidates for `or_default()`, in the same manner that currently `unwrap_or_else(T::default)` calls aren't detected as candidates for `unwrap_or_default()`. Also, as a nearby cleanup, change `KNOW_TYPES` from `static` to `const`, since as far as I understand it's preferred (should Clippy have a lint for that?). Fixes rust-lang#3812.
Suggest `Entry::or_default` for `Entry::or_insert(Default::default())` Unlike past similar work done in rust-lang#6228, expand the existing `or_fun_call` lint to detect `or_insert` calls with a `T::new()` or `T::default()` argument, much like currently done for `unwrap_or` calls. In that case, suggest the use of `or_default`, which is more idiomatic. Note that even with this change, `or_insert_with(T::default)` calls aren't detected as candidates for `or_default()`, in the same manner that currently `unwrap_or_else(T::default)` calls aren't detected as candidates for `unwrap_or_default()`. Also, as a nearby cleanup, change `KNOW_TYPES` from `static` to `const`, since as far as I understand it's preferred (should Clippy have a lint for that?). Addresses rust-lang#3812. *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: [`or_fun_call`]: Suggest `Entry::or_default` for `Entry::or_insert(Default::default())`
epoll: iterate through output buffer then fetch an event from ready list Fixes rust-lang#3812
code is in https://gist.github.com/3913762 (is there a better way to attach it?)
the problem is somewhere during the call to
bobMainPurse.deposit(10, aliceMainPurse);
With that line commented out, it runs.
deposit involves passing around function pointers.
The text was updated successfully, but these errors were encountered: