Skip to content

[pull] master from bitcoin:master#100

Merged
pull[bot] merged 2 commits intoReality2byte:masterfrom
bitcoin:master
Sep 10, 2025
Merged

[pull] master from bitcoin:master#100
pull[bot] merged 2 commits intoReality2byte:masterfrom
bitcoin:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Sep 10, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

davidgumberg and others added 2 commits September 9, 2025 11:12
during text selection by only setting plaintext mime data.
…ior...

6a371b7 gui: Avoid pathological QT text/markdown behavior... (David Gumberg)

Pull request description:

  ...during text selection by only setting plaintext mime data.

  Fixes the OOM described in #887.

  The issue is related to the construction of the [`text/markdown`](https://github.com/qt/qtbase/blob/b617d1176593963a2a9ed21dd5d9a63e84a09400/src/widgets/widgets/qwidgettextcontrol.cpp#L3539) MIME data for the selection. Using the `heaptrack` utility, I observed that nearly all of the allocations when reproducing happen in [`QTextMarkdownWriter::writeFrame`](https://github.com/qt/qtbase/blob/b617d1176593963a2a9ed21dd5d9a63e84a09400/src/gui/text/qtextmarkdownwriter.cpp#L95). I am not 100% sure what is causing this issue in QT's conversion of our HTML to markdown; I have tried changing the [HTML tags](https://github.com/bitcoin/bitcoin/blob/689a32197638e92995dd8eb071425715f5fdc3a4/src/qt/rpcconsole.cpp#L916-L924) (e.g. using `<p></p`> and `<ul><li></li></ul>` in place of tables)  used in our `rpcconsole` messages, but the issue recurs.

  The solution applied here is to override `createMimeDataFromSelection()` to avoid construction of the (likely never-used anyways) `text/markdown` mime data, and only set plaintext mime data in the clipboard.

ACKs for top commit:
  hebasto:
    ACK 6a371b7.

Tree-SHA512: 3edc4da47e6dbe939f27664d2265376938eed4f83ded3706e4b73677eac5c9a4ba8819f241428b45a08e8834982ee7759ee096afd090586db3b523d0ccbbbf73
@pull pull bot locked and limited conversation to collaborators Sep 10, 2025
@pull pull bot added the ⤵️ pull label Sep 10, 2025
@pull pull bot merged commit ee42d59 into Reality2byte:master Sep 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants