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

Undefined behavior in tst_qsvgrenderer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9
    • GUI: Painting
    • None
    • Manjaro Linux
      clang 18.1.8

    Description

      1. Build Qt with "-sanitize undefined".
      2. Use this build of Qt to build tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp.
      3. Run the test.
        On the command line, you can read:
        PASS   : tst_QSvgRenderer::testRenderElement()
        /home/qtrob/dev/src/qt-dev_07.16-base_imageformats_svg/qtbase/src/gui/painting/qpaintengine_raster.cpp:3604:5: runtime error: call to function gray_raster_reset through pointer to incorrect function type 'void (*)(TRaster_ *, unsigned char *, unsigned long)'
        qgrayraster.c: note: gray_raster_reset defined here
        SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/qtrob/dev/src/qt-dev_07.16-base_imageformats_svg/qtbase/src/gui/painting/qpaintengine_raster.cpp:3604:5 
        /home/qtrob/dev/src/qt-dev_07.16-base_imageformats_svg/qtbase/src/gui/painting/qpaintengine_raster.cpp:3634:17: runtime error: call to function gray_raster_render through pointer to incorrect function type 'int (*)(TRaster_ *, QT_FT_Raster_Params_ *)'
        qgrayraster.c: note: gray_raster_render defined here
        SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/qtrob/dev/src/qt-dev_07.16-base_imageformats_svg/qtbase/src/gui/painting/qpaintengine_raster.cpp:3634:17 
        PASS   : tst_QSvgRenderer::testRenderElementToBounds()
        

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes