Skip to content

__builtin_verbose_trap with $ and other characters in either category or reason will break LLDB #127014

Open
@pinskia

Description

@pinskia

While reading the commits for __builtin_verbose_trap support in both clang (#79230) and LLDB (#80368), I noticed that if someone uses $ in the category or reason, the regex ^{0}\\$(.*)\\$(.*)$ that is inside LLDB can match a few different ways (I am not sure if .* here is gready or will it stop at the first $ but it will definitely be incorrect in a few different cases). This is because CreateTrapFailureMessageFor does not (re)encodes $ in the strings.

Also I wonder if someone puts \n or escape characters ASCII coloring in the category/reason. It seems like that can mess up things too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions