Skip to content

Thread name with null crashes with "Illegal instruction" #32475

Closed

Description

@diwic

Trying the following example on playpen (notice the \0 inside the thread name)

fn main() {
    std::thread::Builder::new().name("chi\0ld1".to_string()).spawn(|| {
        println!("Hello, world!");
    }).unwrap().join().unwrap();
}

Playpen output:

thread '<unnamed>' panicked at 'thread name may not contain interior null bytes', ../src/libstd/sys/unix/thread.rs:90
note: Run with `RUST_BACKTRACE=1` for a backtrace.
fatal runtime error: Could not unwind stack, error = 5
playpen: application terminated abnormally with signal 4 (Illegal instruction)

Both on stable and nightly.

Activity

  1. diwic commented on Mar 25, 2016

    @diwic
    ContributorAuthor

    Patch: #32476

  2. added 4 commits that reference this issue on Mar 26, 2016
  3. pmarcelll commented on Mar 27, 2016

    @pmarcelll
    Contributor

    It can be closed, right?

  4. sfackler commented on Mar 27, 2016

    @sfackler
    Member

    Yep

  5. diwic commented on Mar 28, 2016

    @diwic
    ContributorAuthor

    I was leaving it open because I did not know if it was going to be beta nominated or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions