Skip to content

Emit .eh_frame (unwind info)#1

Merged
alexey-milovidov merged 1 commit intoclickhouse/v1.2.5from
unw
Aug 14, 2024
Merged

Emit .eh_frame (unwind info)#1
alexey-milovidov merged 1 commit intoclickhouse/v1.2.5from
unw

Conversation

@al13n321
Copy link
Copy Markdown
Member

Changes needed to make clickouse's stack traces work with musl.

As discussed in ClickHouse/sysroot#26 , IIUC, this goes against the wishes of musl authors - they don't want programs to generate their own stack traces, especially from signal handlers, especially on crash. I couldn't understand exactly why. It's at least in part because of security, but I don't know what exactly is insecure about it. What's the threat model? What types of attacks do they have in mind? Or is it just based on a general principle that program shouldn't have any unnecessary code, especially interpreter-like code? I don't know. Maybe we should look into it.

So this won't be upstreamable.

@alexey-milovidov alexey-milovidov self-assigned this Aug 14, 2024
@alexey-milovidov alexey-milovidov merged commit 71f49aa into clickhouse/v1.2.5 Aug 14, 2024
@alexey-milovidov
Copy link
Copy Markdown
Member

Thank you!

I can guess and I totally understand their reasoning.
It is something like following:

  • when a program is crashed, it is already unsafe to do something extra;
  • complex debugging and diagnostic feels more natural when done outside, not within.
  • writing correct signal handlers is almost impossible;
  • they want their library to be simple;

But we need to go against their principles :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants