Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use asan with qt creator 5.0.3 ?
Forum Updated to NodeBB v4.3 + New Features

How to use asan with qt creator 5.0.3 ?

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on last edited by
    #1

    is there simple steps to to use asan to use for qt project on linux ?

    will this work when i add below sentence

    CONFIG+=sanitizer CONFIG+=sanitize_address

    into Qt's mkspecs (mkspecs/features/sanitizer.prf and mkspecs/common/sanitize.conf) ?

    SGaistS 1 Reply Last reply
    0
    • Q Qt embedded developer

      @SGaist My qt version is

      Qt Creator 5.0.3
      Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit)

      So for use asan what i need to do ?

      will it work when i add below steps in .pro file ?

      CONFIG+=sanitizer CONFIG+=sanitize_address

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #4

      @Qt-embedded-developer
      I guess it is better to add it into debug only

      debug {
          CONFIG+=sanitizer 
          CONFIG+=sanitize_address    
      }
      
      Q 1 Reply Last reply
      1
      • Q Qt embedded developer

        is there simple steps to to use asan to use for qt project on linux ?

        will this work when i add below sentence

        CONFIG+=sanitizer CONFIG+=sanitize_address

        into Qt's mkspecs (mkspecs/features/sanitizer.prf and mkspecs/common/sanitize.conf) ?

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        It has nothing to do with Qt Creator, it will depend on your Qt version. Don't modify the mkspecs for that. That's typically flags that you set in your project.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        Q 1 Reply Last reply
        1
        • SGaistS SGaist

          Hi,

          It has nothing to do with Qt Creator, it will depend on your Qt version. Don't modify the mkspecs for that. That's typically flags that you set in your project.

          Q Offline
          Q Offline
          Qt embedded developer
          wrote on last edited by Qt embedded developer
          #3

          @SGaist My qt version is

          Qt Creator 5.0.3
          Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit)

          So for use asan what i need to do ?

          will it work when i add below steps in .pro file ?

          CONFIG+=sanitizer CONFIG+=sanitize_address

          JoeCFDJ SGaistS 2 Replies Last reply
          0
          • Q Qt embedded developer

            @SGaist My qt version is

            Qt Creator 5.0.3
            Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit)

            So for use asan what i need to do ?

            will it work when i add below steps in .pro file ?

            CONFIG+=sanitizer CONFIG+=sanitize_address

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by
            #4

            @Qt-embedded-developer
            I guess it is better to add it into debug only

            debug {
                CONFIG+=sanitizer 
                CONFIG+=sanitize_address    
            }
            
            Q 1 Reply Last reply
            1
            • JoeCFDJ JoeCFD

              @Qt-embedded-developer
              I guess it is better to add it into debug only

              debug {
                  CONFIG+=sanitizer 
                  CONFIG+=sanitize_address    
              }
              
              Q Offline
              Q Offline
              Qt embedded developer
              wrote on last edited by Qt embedded developer
              #5

              @JoeCFD Means if i generate debug build then

              if write your mentioned code into .pro file then it will work for whole project.

              am i right ?

              But will it work when generate release build ? what to do when i want to use it in release mode?

              Thanks @sierdzio @JoeCFD and @SGaist

              JoeCFDJ 1 Reply Last reply
              0
              • Q Qt embedded developer

                @SGaist My qt version is

                Qt Creator 5.0.3
                Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit)

                So for use asan what i need to do ?

                will it work when i add below steps in .pro file ?

                CONFIG+=sanitizer CONFIG+=sanitize_address

                SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @Qt-embedded-developer said in How to use asan with qt creator 5.0.3 ?:

                @SGaist My qt version is

                Qt Creator 5.0.3
                Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit)

                This is not your Qt version. These are information about Qt Creator which has nothing to do with the actual version of Qt you are using to build your application.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                Q 1 Reply Last reply
                0
                • Q Qt embedded developer

                  @JoeCFD Means if i generate debug build then

                  if write your mentioned code into .pro file then it will work for whole project.

                  am i right ?

                  But will it work when generate release build ? what to do when i want to use it in release mode?

                  Thanks @sierdzio @JoeCFD and @SGaist

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by
                  #7

                  @Qt-embedded-developer

                  On average, the instrumentation increases processing time by about 73% and memory usage by 240%.
                  from here
                  https://en.wikipedia.org/wiki/Code_sanitizer
                  Therefore, I use it only in debug mode, but not in release mode.

                  Yes, it will be applied for the whole project.

                  1 Reply Last reply
                  1
                  • SGaistS SGaist

                    @Qt-embedded-developer said in How to use asan with qt creator 5.0.3 ?:

                    @SGaist My qt version is

                    Qt Creator 5.0.3
                    Based on Qt 5.15.2 (GCC 7.3.1 20180303 (Red Hat 7.3.1-5), 64 bit)

                    This is not your Qt version. These are information about Qt Creator which has nothing to do with the actual version of Qt you are using to build your application.

                    Q Offline
                    Q Offline
                    Qt embedded developer
                    wrote on last edited by
                    #8

                    @SGaist then from where i will find information about qt version ?

                    Q SGaistS 2 Replies Last reply
                    0
                    • Q Qt embedded developer

                      @SGaist then from where i will find information about qt version ?

                      Q Offline
                      Q Offline
                      Qt embedded developer
                      wrote on last edited by
                      #9

                      @Qt-embedded-developer i have find it using

                      const char *qt_version = qVersion();
                      qDebug()<<qt_version;

                      its 5.15.8

                      1 Reply Last reply
                      0
                      • Q Qt embedded developer has marked this topic as solved on
                      • Q Qt embedded developer

                        @SGaist then from where i will find information about qt version ?

                        SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #10

                        You are using a Kit to build your application. The kit is associated with a Qt version.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        1

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved