Skip to content

【Tsan】【Bug】Calling siglongjmp in signal handler will cause the ignore_reads_and_writes check to fail #94207

Open
@yinchuang-code

Description

@yinchuang-code

Tsan disable ignores in CallUserSignalHandler when ignores are enabled before call signal handler,but it will make "CHECK_GT(thr->ignore_reads_and_writes, 0);" failed in ThreadIgnoreEnd if someone use siglongjmp in signal handler:

dlopen

  • ThreadIgnoreBegin
    • thr->ignore_reads_and_writes++
  • trigger signal
    • CallUserSignalHandler
    • thr->ignore_reads_and_writes = 0
    • Call siglonghmp to jump to a normal position
  • ThreadIgnoreEnd
    • CHECK_GT(thr->ignore_reads_and_writes, 0); // failed!

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