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

Getting a seg fault with no error or line number #203

Open
JohnAllen opened this issue Mar 6, 2023 · 2 comments
Open

Getting a seg fault with no error or line number #203

JohnAllen opened this issue Mar 6, 2023 · 2 comments

Comments

@JohnAllen
Copy link

Getting a seg fault with no error printed. I'm not using any other profilers. Tried a bunch of things (turning off flame graph and not using parallel iterations and stuff) but to no avail. Using 0.11.1. Tried --release and without it. Sorry I can't help more.

The only thing i do get is a number before segmentation fault which changes, e.g. 2953 segmentation fault and 3108 segmentation fault. Not sure what that is as I'm still new to Rust.

@Rustin170506
Copy link
Member

Could you please provide more information about your environment? Or could provide a minimal project which can reproduce it.

@ccqpein
Copy link

ccqpein commented May 14, 2023

@hi-rustin . I think I got the same problem when I was benchmarking my code. I make a minimal piece of code to reproduce the issue here. Copy this bench file and run it can cause the issue.

  • cargo bench --bench bench-fault works well
  • give --profile-time will cause issues like: cargo bench --bench bench-fault -- --profile-time=1

I think it is because of format! macro.

  • I don't know why it gives me signal: 10, SIGBUS: access to undefined memory
  • I am not sure if the format! is the only reason my code have this issue.

My env:

  • macOS 13.3.1
  • M2 CPU
  • rustc 1.71.0-nightly (4a59ba4d5 2023-05-12)

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

No branches or pull requests

3 participants