Skip to content

Compiler crashes when contract name exceeds filesystem limits #3138

@Gusarich

Description

@Gusarich

The compiler crashes with an unhandled ENAMETOOLONG error when compiling contracts with very long names, due to generated filenames exceeding filesystem limitations.

Minimal Example:

contract AAAAAAAAAAAAAAA... (extremely long name) {}

Observed Error:

Error: ENAMETOOLONG: name too long, open '/tmp/longname.tact_AAAAAAAAAA....fc'

Cause:
The compiler directly uses the contract name to generate filenames without checking the length, causing unhandled filesystem errors.

Expected Behavior:
The compiler should enforce a sensible maximum contract name length or gracefully handle filename generation to avoid crashing due to filesystem constraints.


LLM Fuzzing discovery (see #3123)

Metadata

Metadata

Assignees

No one assigned

    Labels

    activity: llm-fuzzingIssues found using LLM fuzzingkind: bugSomething isn't working or isn't rightkind: crashInternal compiler error or crash, but no miscompilation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions