Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-19525

How to crash QtCreator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 4.13.0-beta1
    • Qt Creator 4.4.1, Qt Creator 4.5.0
    • C/C++/Obj-C++ Support
    • None
    • Windows 10 x64 Pro, Qt 5.10.0, MSVC 2013, MSVC 2015, MSVC 2017, MinGW 5.3.0

      Не думаю, что окружение тут как то воздействует :) 
    • 8eac3fba8093750f4dfe6b8ab01f7f998fcadd26 (qt-creator/qt-creator/master)

    Description

      Create a file with content:

      #define IFGEN(if, endif) if (1 == 0) endif
      
      int main()
      {
      IFGEN(#if, #endif)
      return 0;
      }
      

      If you type macro without # 

      IFGEN(if, endif)

      then QtCreator works fine. If you start adding # before if and else QtCreator freezes and crashes. Even if you try to open the file with such content it still crashes.

      /translated by Ivan/

       

      /* ------------------------------------  */

      -Мои вкусы очень специфичны. Ты не поймешь.

      - Так посвяти же меня в них.

      - Я люблю вставлять директивы препроцессора в макросы, чтобы запустить препроцессор еще раз.

      - Больной ублюдок.

      /* ------------------------------------  */

      - My tastes are very specific. You will not understand.

      - Then dedicate me to them.

      - I like to insert preprocessor directives into macros to run the preprocessor again.

      - A sick bastard.

       

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            sdi Denis Shlykov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: