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

ICE on invalid thread ID in Linux pthread_getname_np #3965

Open
RalfJung opened this issue Oct 11, 2024 · 1 comment
Open

ICE on invalid thread ID in Linux pthread_getname_np #3965

RalfJung opened this issue Oct 11, 2024 · 1 comment
Assignees
Labels
A-linux Area: affects only Linux targets A-shims Area: This affects the external function shims C-bug Category: This is a bug. E-good-first-issue A good way to start contributing, mentoring is available I-ICE Impact: makes Miri crash with some ICE

Comments

@RalfJung
Copy link
Member

RalfJung commented Oct 11, 2024

This program ICEs Miri:

fn get_thread_name(name: &mut [u8]) -> i32 { unsafe {
    libc::pthread_getname_np(999, name.as_mut_ptr().cast(), name.len())
} }

fn main() {
     get_thread_name(&mut []);
}

Thanks to @YohDeadfall for mentioning that. This is definitely a bug, we should never ICE.

@RalfJung RalfJung added A-linux Area: affects only Linux targets A-shims Area: This affects the external function shims C-bug Category: This is a bug. E-good-first-issue A good way to start contributing, mentoring is available I-ICE Impact: makes Miri crash with some ICE labels Oct 11, 2024
@YohDeadfall
Copy link
Contributor

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linux Area: affects only Linux targets A-shims Area: This affects the external function shims C-bug Category: This is a bug. E-good-first-issue A good way to start contributing, mentoring is available I-ICE Impact: makes Miri crash with some ICE
Projects
None yet
Development

No branches or pull requests

2 participants