Skip to content

core/detector: _slice_by_braces truncates bodies of functions with massive parameter lists #2166

Description

@squid-protocol

Functions with extremely large inline parameter lists (e.g. Zig's fn dbHelper(..., tag_to_encoding_map: *struct { ... }) where the struct spans 6,600+ characters) were silently dropped. The _slice_by_braces bounded search limit (search_limit = min(next_match_start, start_idx + 2000)) forced the search for the body's opening { to give up before the argument list even finished. Fixed locally by dynamically extending this bound to min(next_match_start, params_end_idx + 2000).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions