8000 linux: fix NoBuildId error message typo and sanitize_stack_copy bounds by G36maid · Pull Request #252 · rust-minidump/minidump-writer · GitHub
[go: up one dir, main page]

Skip to content

linux: fix NoBuildId error message typo and sanitize_stack_copy bounds - #252

Merged
gabrielesvelto merged 1 commit into
rust-minidump:mainfrom
G36maid:linux-fixes
Nov 3, 2026
Merged

gabrielesvelto merged 1 commit into
rust-minidump:mainfrom
G36maid:linux-fixes

Conversation

@G36maid
@G36maid G36maid commented Nov 2, 2026
Copy link
Copy Markdown
Contributor

Two small fixes found while porting the module reader to FreeBSD (#183):

  1. NoBuildId error message typo: the message prints {section} twice; the third field should be {generated}.

  2. sanitize_stack_copy potential slicing panic: when the stack copy is truncated by a guard page in the middle of the stack (via read_until_guard), the rounded sp_offset can exceed stack_copy.len(), causing stack_copy[0..offset] to panic. Clamp the offset to the actual data length.

@gabrielesvelto gabrielesvelto left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@gabrielesvelto
gabrielesvelto merged commit b5da99e into rust-minidump:main Nov 3, 2026
20 checks passed
@G36maid
G36maid deleted the linux-fixes branch November 6, 2026 19:19
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

Successfully merging this pull request may close these issues.

2 participants

0