Skip to content

Poor error message when attempting to use runtime from #[start] function #8887

@jsanders

Description

@jsanders

Per #5809, you have to do some maneuvering just to print from a #[start] function, but if you don't know that, you get a very mysterious error at runtime:

#[start]
fn main(_: int, _: **u8, _: *u8) -> int { 
  println("Hello!\n");
  return 0;
}
$ ./hello

You've met with a terrible fate, haven't you?

fatal runtime error: runtime tls key not initialized
Abort trap: 6

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