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

calloc allocations that fail while in a loop cause QWebEngineCore to crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.5.1
    • 5.4.1
    • WebEngine
    • None
    • Win 7 Enterprise (64-bit), Qt 5.4.1
    • qtwebengine-chromium/9f55feaa831d4d31f7cf585da40a35f15e390761, qtwebengine-chromium/1ee586d94c66fe41aa436646448ed7d468f6531f

    Description

      When using the new Qt WebEngine, code that attempts to allocate more memory then what it is available through calloc will cause the application to crash especially when the calloc allocations are done within a loop.

      Attached is a simple gui project using QWebEngineView and a method that attempts to allocate several large chunks of memory with calloc. When running the application, pressing the "Memory" button will run calloc and successfully report debug information on its allocation attempt. But after pressing the "Web" button, the "Memory" action will then crash (on my system the first calloc allocation was successful but all subsequent allocations would fail due to the amount being allocated).

      In debug, at the time of crash, the following is what is on the stack:

      0 IsSandboxedProcess Qt5WebEngineCored 0x11f35034
      1 std::_New_handler_interface stdhndlr.cpp 13 0x5e83ce09
      2 _callnewh handler.cpp 135 0x53aabfc0
      3 _nh_malloc_dbg_impl dbgheap.c 255 0x53b8dc01
      4 _calloc_dbg_impl dbgheap.c 601 0x53b8ce22
      5 _calloc_dbg dbgheap.c 652 0x53b8cd9a
      6 calloc dbgcalloc.c 56 0x53b9e957
      7 MainWindow::callocTest mainwindow.cpp 55 0xb54483
      8 MainWindow::on_pushButton_2_clicked mainwindow.cpp 46 0xb54418
      ... <More>

      This application is a 32-bit app (MSVC2013 32bit) and I am not sure if a 64-bit version manifests the issue. If the memory requests were reduced significantly so that all requests would allocate, then no crash was seen.

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              crisa Cris Andrews
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes