Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87965

[REG 5.15.1 -> 6.0] Crash in QTextDocument().setMarkdown()

    XMLWordPrintable

    Details

    • Commits:
      488e72cce841c5caeed2c27052be146baf579c3e (qt/qtbase/dev) 5f935eeed4dadb58282cb8116de8589481a1e4e2 (qt/qtbase/5.15)

      Description

      1. Have a build of Qt configured with "-release -sanitize address".
      2. Use that to build the attached project.
      3. Pass the attached markdown file to the resulting program:
        ./report newinput.md
        

        It will crash with output like:

        AddressSanitizer:DEADLYSIGNAL
        =================================================================
        ==49288==ERROR: AddressSanitizer: SEGV on unknown address 0x000402445180 (pc 0x0000013dd71e bp 0x7ffeae983010 sp 0x7ffeae982ba0 T0)
        ==49288==The signal is caused by a READ memory access.
            #0 0x13dd71e in md_process_doc (/tmp/build-report/report+0x13dd71e)
            #1 0x13d842e in md_parse (/tmp/build-report/report+0x13d842e)
            #2 0xc99dfe in QTextMarkdownImporter::import(QTextDocument*, QString const&) (/tmp/build-report/report+0xc99dfe)
            #3 0xb34600 in QTextDocument::setMarkdown(QString const&, QFlags<QTextDocument::MarkdownFeature>) (/tmp/build-report/report+0xb34600)
            #4 0x4e151a in main (/tmp/build-report/report+0x4e151a)
            #5 0x7fd99ef1f0b2 in __libc_start_main /build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:308:16
            #6 0x4368dd in _start (/tmp/build-report/report+0x4368dd)
        

      Qt build from 5.15 branch does not seem to crash in this situation.

        Attachments

        1. main.cpp
          0.2 kB
        2. newinput.md
          0.0 kB
        3. report.pro
          0.0 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            srutledg Shawn Rutledge
            Reporter:
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes