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

Better errors for insufficient stack or memory size #395

Closed
moodlezoup opened this issue Jun 17, 2024 · 11 comments · Fixed by #452
Closed

Better errors for insufficient stack or memory size #395

moodlezoup opened this issue Jun 17, 2024 · 11 comments · Fixed by #452
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@moodlezoup
Copy link
Collaborator

https://jolt.a16zcrypto.com/usage/troubleshooting.html#insufficient-memory-or-stack-size

Currently, the tracer will error out with nondescript errors like Unknown memory mapping 7FFFFE04.

The tracer should detect when we have exhausted the stack and/or heap, and throw a descriptive error if so

@moodlezoup moodlezoup added enhancement New feature or request help wanted Extra attention is needed labels Jun 17, 2024
@ameya-deshmukh
Copy link

Hey! Can I take this up?

@moodlezoup
Copy link
Collaborator Author

Yeah go for it!

@moodlezoup
Copy link
Collaborator Author

@ameya-deshmukh Any update here?

@ameya-deshmukh
Copy link

Hey @moodlezoup! Sorry, couldn't find time to work on this. Can I grind this out over the weekend and give you an update by early Monday ET?

@moodlezoup
Copy link
Collaborator Author

Yeah that'd be great! Lmk if you need any pointers

@4rgon4ut
Copy link
Contributor

4rgon4ut commented Sep 3, 2024

@ameya-deshmukh @moodlezoup I would like to have a try if you fine with that

@ameya-deshmukh
Copy link

Hey @4rgon4ut sure! I didn't get the time to work on this issue, all yours to take

@4rgon4ut
Copy link
Contributor

4rgon4ut commented Sep 3, 2024

@moodlezoup I have two questions:

  1. Would you like it to be panics with specified messages (based on the case) or new trap type here
  2. Does tracer/src/emulator/cpu.rs is the right place to add related tests?

@moodlezoup
Copy link
Collaborator Author

@moodlezoup I have two questions:

  1. Would you like it to be panics with specified messages (based on the case) or new trap type here
  2. Does tracer/src/emulator/cpu.rs is the right place to add related tests?

Thanks for taking this!

  1. just a better panic message is fine
  2. I think perhaps tracer/src/emulator/mmu.rs may be a better place for tests

@4rgon4ut
Copy link
Contributor

4rgon4ut commented Sep 9, 2024

@moodlezoup does stack grows downwards, from higher stack addr down to the DRAM_BASE ?
ref

/// DRAM base address. Offset from this base address
/// is the address in main memory.
pub const DRAM_BASE: u64 = 0x80000000;

@moodlezoup
Copy link
Collaborator Author

@moodlezoup does stack grows downwards, from higher stack addr down to the DRAM_BASE ? ref

/// DRAM base address. Offset from this base address
/// is the address in main memory.
pub const DRAM_BASE: u64 = 0x80000000;

Yes, I believe so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants