Skip to content

Lint against invalid POSIX symbol definitions#158522

Open
Urgau wants to merge 3 commits into
rust-lang:mainfrom
Urgau:runtime-symbols-posix
Open

Lint against invalid POSIX symbol definitions#158522
Urgau wants to merge 3 commits into
rust-lang:mainfrom
Urgau:runtime-symbols-posix

Conversation

@Urgau

@Urgau Urgau commented Jun 28, 2026

Copy link
Copy Markdown
Member

This PR extends the invalid_runtime_symbol_definitions and suspicious_runtime_symbol_definitions lints to lint againts the following POSIX symbols:

  • I/O: open, read, write, close
  • Alloc: malloc, realloc, free
  • Program: exit

This is meant to address the multiple reports of users tripping over std symbols:

Those symbols are defined in std, so as long as the std crate is imported (and we are on a UNIX-like target) we lint on those symbols.

Follow up to #155521

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 28, 2026
@rustbot

rustbot commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 18 candidates

@Urgau Urgau changed the title Lint lint against invalid POSIX symbol definitions Lint against invalid POSIX symbol definitions Jun 28, 2026
@Urgau Urgau added the I-lang-nominated Nominated for discussion during a lang team meeting. label Jun 28, 2026
@Urgau Urgau force-pushed the runtime-symbols-posix branch from 315bb46 to 070c3d9 Compare June 28, 2026 12:41
@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

miri is developed in its own repository. If possible, consider making this change to rust-lang/miri instead.

cc @rust-lang/miri

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

Labels

I-lang-nominated Nominated for discussion during a lang team meeting. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants