Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonar-scanner hangs with sonar-sxx 2.1 #2505

Closed
AndreyAlifanov opened this issue Apr 12, 2023 · 21 comments · Fixed by #2528
Closed

sonar-scanner hangs with sonar-sxx 2.1 #2505

AndreyAlifanov opened this issue Apr 12, 2023 · 21 comments · Fixed by #2528
Assignees
Labels
Milestone

Comments

@AndreyAlifanov
Copy link

After update sonar-cxx from version 2.0 to 2.1 our scan hangs after 10-12 minutes of work.
I tried it with SonarQube 8.9LTS and 9.9LTS, scanner of version 4.8.0

It works with sonar.cxx.squid.disabled=true, but it's not good decision. Because we need information for code coverage, code duplications, code lines and so on.

PS With version 2.0 of sonar-cxx process works well. But this version doesn't work with SonarQube 9.9LTS, only with 8.9. :-(

@guwirth
Copy link
Collaborator

guwirth commented Apr 12, 2023

Hi @AndreyAlifanov,

can you provide more input with debug info on from the LOG file please:
https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Get-Debug-Information

In which step / sensor does it hang?
In case you are waiting longer, does it finish?
From your description I understand that the source code is the same?

Regards,

@AndreyAlifanov
Copy link
Author

Hi @guwirth,

Part of log (full log is too long to publish - 58 MB)

09:45:25.340 WARN: Property 'sonar.verbose' with value 'true' is overridden with value 'true'
09:45:25.348 INFO: Scanner configuration file: H:\Tools\sonar-scanner-4.8.0.2856-windows\bin\..\conf\sonar-scanner.properties
09:45:25.349 INFO: Project root configuration file: H:\Tools\sonar-scanner-4.8.0.2856-windows\.\sonar-ap-project.windows.properties
09:45:25.448 INFO: SonarScanner 4.8.0.2856
09:45:25.448 INFO: Java 11.0.17 Eclipse Adoptium (64-bit)
09:45:25.448 INFO: Windows 10 10.0 amd64
09:45:25.602 DEBUG: keyStore is : 
09:45:25.602 DEBUG: keyStore type is : pkcs12
09:45:25.602 DEBUG: keyStore provider is : 
09:45:25.602 DEBUG: init keystore
09:45:25.603 DEBUG: init keymanager of type SunX509
09:45:25.962 DEBUG: Create: C:\Users\andrey.alifanov\.sonar\cache
09:45:25.962 INFO: User cache: C:\Users\andrey.alifanov\.sonar\cache
09:45:25.962 DEBUG: Create: C:\Users\andrey.alifanov\.sonar\cache\_tmp
09:45:25.966 DEBUG: Extract sonar-scanner-api-batch in temp...
09:45:25.969 DEBUG: Get bootstrap index...
09:45:25.970 DEBUG: Download: http://localhost:89/batch/index
09:45:26.022 DEBUG: Get bootstrap completed
09:45:26.026 DEBUG: Create isolated classloader...
09:45:26.034 DEBUG: Start temp cleaning...
09:45:26.041 DEBUG: Temp cleaning done
09:45:26.041 DEBUG: Execution getVersion
09:45:26.057 INFO: Analyzing on SonarQube server 8.9.10
09:45:26.057 INFO: Default locale: "ru_RU", source code encoding: "UTF-8"
09:45:26.058 DEBUG: Work directory: D:\AP\.scannerwork
09:45:26.059 DEBUG: Execution execute
09:45:26.468 DEBUG: Community 8.9.10.61524
09:45:26.640 INFO: Load global settings
09:45:26.698 DEBUG: GET 200 http://localhost:89/api/settings/values.protobuf | time=51ms
09:45:26.730 INFO: Load global settings (done) | time=91ms
09:45:26.732 INFO: Server id: 71ECF596-AYbGlyNmgWcefmqIIgLG
09:45:26.735 INFO: User cache: C:\Users\andrey.alifanov\.sonar\cache
09:45:26.739 INFO: Load/download plugins
09:45:26.740 INFO: Load plugins index
09:45:26.751 DEBUG: GET 200 http://localhost:89/api/plugins/installed | time=11ms
09:45:26.787 INFO: Load plugins index (done) | time=47ms
09:45:26.864 INFO: Load/download plugins (done) | time=125ms
09:45:26.979 DEBUG: Plugins:
09:45:26.979 DEBUG:   * C++ (Community) 2.1.0.428 (cxx) <---- we use this plugin
09:45:26.979 DEBUG:   * Python Code Quality and Security 3.4.1.8066 (python)
09:45:26.979 DEBUG:   * CSS Code Quality and Security 1.4.2.2002 (cssfamily)
09:45:26.980 DEBUG:   * Go Code Quality and Security 1.8.3.2219 (go)
09:45:26.980 DEBUG:   * JaCoCo 1.1.1.1157 (jacoco)
09:45:26.980 DEBUG:   * Kotlin Code Quality and Security 1.8.3.2219 (kotlin)
09:45:26.980 DEBUG:   * JavaScript/TypeScript Code Quality and Security 7.4.4.15624 (javascript)
09:45:26.980 DEBUG:   * Ruby Code Quality and Security 1.8.3.2219 (ruby)
09:45:26.980 DEBUG:   * Scala Code Quality and Security 1.8.3.2219 (sonarscala)
09:45:26.980 DEBUG:   * C# Code Quality and Security 8.22.0.31243 (csharp)
09:45:26.980 DEBUG:   * Java Code Quality and Security 6.15.1.26025 (java)
09:45:26.980 DEBUG:   * HTML Code Quality and Security 3.4.0.2754 (web)
09:45:26.980 DEBUG:   * Flex Code Quality and Security 2.6.1.2564 (flex)
09:45:26.980 DEBUG:   * XML Code Quality and Security 2.2.0.2973 (xml)
09:45:26.980 DEBUG:   * PHP Code Quality and Security 3.17.0.7439 (php)
09:45:26.981 DEBUG:   * VB.NET Code Quality and Security 8.22.0.31243 (vbnet)
09:45:26.981 DEBUG:   * PVS-Studio Plugin 7.24.70333.1812 (pvsstudio) <---- we use this plugin

...

09:54:05.348 DEBUG: 'Public API' metric for 'UiPluginUpdate.h': total=12, undocumented=12
09:54:05.349 DEBUG: 'ThirdProjects/boost/function_types/detail/pp_cc_loop/master.hpp' generated metadata with charset 'UTF-8'
09:54:05.349 DEBUG: process unit 'D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp'
09:54:05.349 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:21]: preprocessor cannot find include file '#     include <boost/function_types/config/cc_names.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:23]: preprocessor cannot find include file '#     include <boost/preprocessor/cat.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:24]: preprocessor cannot find include file '#     include <boost/preprocessor/seq/size.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:25]: preprocessor cannot find include file '#     include <boost/preprocessor/seq/elem.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:26]: preprocessor cannot find include file '#     include <boost/preprocessor/tuple/elem.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:27]: preprocessor cannot find include file '#     include <boost/preprocessor/iteration/iterate.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:28]: preprocessor cannot find include file '#     include <boost/preprocessor/facilities/expand.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:29]: preprocessor cannot find include file '#     include <boost/preprocessor/arithmetic/inc.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:32]: preprocessor cannot find include file '#   include <boost/function_types/detail/encoding/def.hpp>'
09:54:05.350 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:33]: preprocessor cannot find include file '#   include <boost/function_types/detail/encoding/aliases_def.hpp>'
09:54:05.351 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:39]: preprocessor cannot find include file '#   include BOOST_PP_ITERATE()'
09:54:05.352 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:71]: preprocessor cannot find include file '#   include <boost/function_types/detail/encoding/aliases_undef.hpp>'
09:54:05.352 DEBUG: [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:72]: preprocessor cannot find include file '#   include <boost/function_types/detail/encoding/undef.hpp>'

Here scanner hangs

In which step / sensor does it hang?
We use only pvs-studio plugin to load results of static analysis for C/C++ code. All other sensors we don't use.

In case you are waiting longer, does it finish?
No, scan doesn't finish.

From your description I understand that the source code is the same?
Yes, our source code and configuration file are the same. Difference is only in sonar-cxx versions.

Regards

@AndreyAlifanov
Copy link
Author

I've excluded folder with boost from list to analyze. And scanner doesn't hang.
But we should analyze boost as well as other code in our project.
So it's not a solution.

@guwirth
Copy link
Collaborator

guwirth commented Apr 13, 2023

Hi @AndreyAlifanov,

Why do you need to scan third party code?

https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Detect-and-fix-parsing-errors

  • Hint: Since the cxx plugin only reads macros from the include files in order to parse the code syntactically in a correct way, it is often better to provide the missing macros instead of reading in all include files. Reading many include files (e.g. STL, Boost, MFC, ATL, ...) often slows down the analysis considerably. The recommendation is to include only include files for your own code.

I would recommend you to exclude all third party code
https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/

sonar.exclusions=**/ThirdProjects/**

By the way: Which Boost version are you using?

Regards,

@AndreyAlifanov
Copy link
Author

Hi @guwirth,

We don't need to scan code with sonar-cxx at all. We use this plugin to import results of PVS-Studio scan only.
And we should analyze all code with SAST, including third party (except code of build tools - STL, ATL, MFC etc. boost is not a part of this tools). It's demand of our regulation authority.

I don't understand, why we don't have problems with version 2.0.7? But have them with version 2.1.0.

We use boost 1.81.

Regards

@guwirth
Copy link
Collaborator

guwirth commented Apr 14, 2023

Hi @AndreyAlifanov,

I don't understand, why we don't have problems with version 2.0.7? But have them with version 2.1.0.

There is a new SQ version, a new cxx plugin version, a new API version, a different scanner, a different Java version, … . Really difficult to say what the root cause is.

Is it possible to use the old setup with SQ 8.9 and exchange the cxx plugin only (2.0.7 to 2.1.0)?
https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Compatibility-Matrix

If problem also occurs there, it’s then clear that’s an plugin issue.

I can also try to test wit Boost 1.81, but that takes some time.

One know issue is #2131.

Regards,

@guwirth
Copy link
Collaborator

guwirth commented Apr 14, 2023

Hi @AndreyAlifanov

Part of log (full log is too long to publish - 58 MB)

Is the snippet above showing the end of the log file (last entries)?

Regards,

@AndreyAlifanov
Copy link
Author

Hi @AndreyAlifanov

Part of log (full log is too long to publish - 58 MB)

Is the snippet above showing the end of the log file (last entries)?

Regards,

Yes, this snippet shows the end of the log file.

@AndreyAlifanov
Copy link
Author

Hi @AndreyAlifanov,

I don't understand, why we don't have problems with version 2.0.7? But have them with version 2.1.0.

There is a new SQ version, a new cxx plugin version, a new API version, a different scanner, a different Java version, … . Really difficult to say what the root cause is.

Is it possible to use the old setup with SQ 8.9 and exchange the cxx plugin only (2.0.7 to 2.1.0)? https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Compatibility-Matrix

If problem also occurs there, it’s then clear that’s an plugin issue.

I can also try to test wit Boost 1.81, but that takes some time.

One know issue is #2131.

Regards,

Hi @guwirth,

as I wrote difference is only in version of plugin.
I tried version 2.1 with SonarQube 8.9 - it hangs too.

I'm really sorry, if it's not clear in my first letter.

Regards

@guwirth
Copy link
Collaborator

guwirth commented Apr 14, 2023

Hi @AndreyAlifanov,

thanks, I just wanna be one the safe side.

Looking to the log file

  • it’s hanging in D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp.
  • This file has some includes were the plugin is not able to open (wrong missing sonar.cxx.includeDirectories).
  • After [D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp:72]: preprocessor cannot find include file '# include <boost/function_types/detail/encoding/undef.hpp>' it’s hanging then.

Something special in this file? You can also try to copy/paste the content of that file into
https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-2.1.0/cxx-sslr-toolkit-2.1.0.428.jar to see if it’s working/hanging.

As said above I need some more time to reproduce the setup.

Regards,

@guwirth
Copy link
Collaborator

guwirth commented Apr 14, 2023

Hi @AndreyAlifanov,

maybe easier for you is to delete all other files except D:\AP\ThirdProjects\boost\function_types\detail\pp_cc_loop\master.hpp and analyze again to see if the content of this file is the root cause.

Regards,

@AndreyAlifanov
Copy link
Author

Hi @guwirth,

ok, I'll try it next week.

Regards

@guwirth guwirth added bug and removed question labels Apr 17, 2023
@guwirth
Copy link
Collaborator

guwirth commented Apr 17, 2023

Hi @AndreyAlifanov,

testing the file \boost_1_81_0\boost\function_types\detail\pp_cc_loop\master.hpp in cxx-sslr-toolkit the toolkit is also hanging.

// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).

//------------------------------------------------------------------------------

// no include guards, this file is intended for multiple inclusions

#ifdef __WAVE__
// this file has been generated from the master.hpp file in the same directory
#   pragma wave option(preserve: 0)
#endif


#if !BOOST_PP_IS_ITERATING

#   ifndef BOOST_FT_DETAIL_CC_LOOP_MASTER_HPP_INCLUDED
#   define BOOST_FT_DETAIL_CC_LOOP_MASTER_HPP_INCLUDED
#     include <boost/function_types/config/cc_names.hpp>

#     include <boost/preprocessor/cat.hpp>
#     include <boost/preprocessor/seq/size.hpp>
#     include <boost/preprocessor/seq/elem.hpp>
#     include <boost/preprocessor/tuple/elem.hpp>
#     include <boost/preprocessor/iteration/iterate.hpp>
#     include <boost/preprocessor/facilities/expand.hpp>
#     include <boost/preprocessor/arithmetic/inc.hpp>
#   endif

#   include <boost/function_types/detail/encoding/def.hpp>
#   include <boost/function_types/detail/encoding/aliases_def.hpp>

#   define  BOOST_PP_FILENAME_1 \
        <boost/function_types/detail/pp_cc_loop/master.hpp>
#   define  BOOST_PP_ITERATION_LIMITS \
        (0,BOOST_PP_SEQ_SIZE(BOOST_FT_CC_NAMES_SEQ)-1)
#   include BOOST_PP_ITERATE()
#   if !defined(BOOST_FT_config_valid) && BOOST_FT_CC_PREPROCESSING
#     define BOOST_FT_cc_id 1
#     define BOOST_FT_cc_name implicit_cc
#     define BOOST_FT_cc BOOST_PP_EMPTY
#     define BOOST_FT_cond callable_builtin
#     include BOOST_FT_cc_file
#     undef BOOST_FT_cond
#     undef BOOST_FT_cc_name
#     undef BOOST_FT_cc
#     undef BOOST_FT_cc_id
#   elif !defined(BOOST_FT_config_valid) // and generating preprocessed file
BOOST_PP_EXPAND(#) ifndef BOOST_FT_config_valid
BOOST_PP_EXPAND(#)   define BOOST_FT_cc_id 1
BOOST_PP_EXPAND(#)   define BOOST_FT_cc_name implicit_cc
BOOST_PP_EXPAND(#)   define BOOST_FT_cc BOOST_PP_EMPTY
BOOST_PP_EXPAND(#)   define BOOST_FT_cond callable_builtin
#define _()
BOOST_PP_EXPAND(#)   include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#)   undef BOOST_FT_cond
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc_name
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc_id
BOOST_PP_EXPAND(#) else
BOOST_PP_EXPAND(#)   undef BOOST_FT_config_valid
BOOST_PP_EXPAND(#) endif

#   else
#     undef BOOST_FT_config_valid
#   endif

#   include <boost/function_types/detail/encoding/aliases_undef.hpp>
#   include <boost/function_types/detail/encoding/undef.hpp>

#elif BOOST_FT_CC_PREPROCESSING

#   define BOOST_FT_cc_id  BOOST_PP_INC(BOOST_PP_FRAME_ITERATION(1))
#   define BOOST_FT_cc_inf \
        BOOST_PP_SEQ_ELEM(BOOST_PP_FRAME_ITERATION(1),BOOST_FT_CC_NAMES_SEQ)

#   define BOOST_FT_cc_pp_name BOOST_PP_TUPLE_ELEM(3,0,BOOST_FT_cc_inf)
#   define BOOST_FT_cc_name    BOOST_PP_TUPLE_ELEM(3,1,BOOST_FT_cc_inf)
#   define BOOST_FT_cc         BOOST_PP_TUPLE_ELEM(3,2,BOOST_FT_cc_inf)

#   define BOOST_FT_cond BOOST_PP_CAT(BOOST_FT_CC_,BOOST_FT_cc_pp_name)

#   if BOOST_FT_cond
#     define BOOST_FT_config_valid 1
#     include BOOST_FT_cc_file
#   endif

#   undef BOOST_FT_cond

#   undef BOOST_FT_cc_pp_name
#   undef BOOST_FT_cc_name
#   undef BOOST_FT_cc

#   undef BOOST_FT_cc_id
#   undef BOOST_FT_cc_inf

#else // if generating preprocessed file
BOOST_PP_EXPAND(#) define BOOST_FT_cc_id BOOST_PP_INC(BOOST_PP_ITERATION())

#   define BOOST_FT_cc_inf \
        BOOST_PP_SEQ_ELEM(BOOST_PP_ITERATION(),BOOST_FT_CC_NAMES_SEQ)

#   define BOOST_FT_cc_pp_name BOOST_PP_TUPLE_ELEM(3,0,BOOST_FT_cc_inf)

#   define BOOST_FT_CC_DEF(name,index) \
        name BOOST_PP_TUPLE_ELEM(3,index,BOOST_FT_cc_inf)
BOOST_PP_EXPAND(#) define BOOST_FT_CC_DEF(BOOST_FT_cc_name,1)
BOOST_PP_EXPAND(#) define BOOST_FT_CC_DEF(BOOST_FT_cc,2)
#   undef  BOOST_FT_CC_DEF

#   define BOOST_FT_cc_cond_v BOOST_PP_CAT(BOOST_FT_CC_,BOOST_FT_cc_pp_name)
BOOST_PP_EXPAND(#) define BOOST_FT_cond BOOST_FT_cc_cond_v
#   undef  BOOST_FT_cc_cond_v

#   undef BOOST_FT_cc_pp_name
#   undef BOOST_FT_cc_inf

BOOST_PP_EXPAND(#) if BOOST_FT_cond
BOOST_PP_EXPAND(#)   define BOOST_FT_config_valid 1
#define _()
BOOST_PP_EXPAND(#)   include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#) endif

BOOST_PP_EXPAND(#) undef BOOST_FT_cond

BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name
BOOST_PP_EXPAND(#) undef BOOST_FT_cc

BOOST_PP_EXPAND(#) undef BOOST_FT_cc_id

#endif

Regards,

@AndreyAlifanov
Copy link
Author

Hi @guwirth,

I've deleted all the files from boost except this one.
And scanner hangs.

Regards

@guwirth
Copy link
Collaborator

guwirth commented Apr 17, 2023

Hi @AndreyAlifanov,

I reduced the file \boost_1_81_0\boost\function_types\detail\pp_cc_loop\master.hpp to below which is still slow (hanging). Root cause seems to be the BOOST_PP_EXPAND(#). Replacing BOOST_PP_EXPAND(#) with # it's fast again.

This requires a deeper investigation.

BOOST_PP_EXPAND(#) ifndef BOOST_FT_config_valid
BOOST_PP_EXPAND(#)   define BOOST_FT_cc_id 1
BOOST_PP_EXPAND(#)   define BOOST_FT_cc_name implicit_cc
BOOST_PP_EXPAND(#)   define BOOST_FT_cc BOOST_PP_EMPTY
BOOST_PP_EXPAND(#)   define BOOST_FT_cond callable_builtin
#define _()
BOOST_PP_EXPAND(#)   include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#)   undef BOOST_FT_cond
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc_name
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc_id
BOOST_PP_EXPAND(#) else
BOOST_PP_EXPAND(#)   undef BOOST_FT_config_valid
BOOST_PP_EXPAND(#) endif

Regards,

@guwirth guwirth self-assigned this May 6, 2023
@guwirth guwirth added this to the 2.1.0 milestone May 6, 2023
@guwirth
Copy link
Collaborator

guwirth commented May 6, 2023

Hi @AndreyAlifanov, can you try with #2518 if this helps?

@AndreyAlifanov
Copy link
Author

AndreyAlifanov commented May 10, 2023

Hi @guwirth, I've tried #2518 - nothing changed.
Analysis hangs on the same file master.hpp

@guwirth
Copy link
Collaborator

guwirth commented May 11, 2023

@AndreyAlifanov thx for testing.

@guwirth
Copy link
Collaborator

guwirth commented May 17, 2023

verified it with cxx plugin 2.0.7, same behaviour => also slow

@guwirth
Copy link
Collaborator

guwirth commented May 17, 2023

slow:

BOOST_PP_EXPAND(#) ifndef BOOST_FT_config_valid
BOOST_PP_EXPAND(#)   define BOOST_FT_cc_id 1
BOOST_PP_EXPAND(#)   define BOOST_FT_cc_name implicit_cc
BOOST_PP_EXPAND(#)   define BOOST_FT_cc BOOST_PP_EMPTY
BOOST_PP_EXPAND(#)   define BOOST_FT_cond callable_builtin
#define _()
BOOST_PP_EXPAND(#)   include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#)   undef BOOST_FT_cond
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc_name
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc
BOOST_PP_EXPAND(#)   undef BOOST_FT_cc_id
BOOST_PP_EXPAND(#) else
BOOST_PP_EXPAND(#)   undef BOOST_FT_config_valid
BOOST_PP_EXPAND(#) endif

fast:

# ifndef BOOST_FT_config_valid
#   define BOOST_FT_cc_id 1
#   define BOOST_FT_cc_name implicit_cc
#   define BOOST_FT_cc BOOST_PP_EMPTY
#   define BOOST_FT_cond callable_builtin
#define _()
#   include BOOST_FT_cc_file
#undef _
#   undef BOOST_FT_cond
#   undef BOOST_FT_cc_name
#   undef BOOST_FT_cc
#   undef BOOST_FT_cc_id
# else
#   undef BOOST_FT_config_valid
# endif

fast:


BOOST_PP_EXPAND(a) ifndef BOOST_FT_config_valid
BOOST_PP_EXPAND(a)   define BOOST_FT_cc_id 1
BOOST_PP_EXPAND(a)   define BOOST_FT_cc_name implicit_cc
BOOST_PP_EXPAND(a)   define BOOST_FT_cc BOOST_PP_EMPTY
BOOST_PP_EXPAND(a)   define BOOST_FT_cond callable_builtin
#define _()
BOOST_PP_EXPAND(a)   include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(a)   undef BOOST_FT_cond
BOOST_PP_EXPAND(a)   undef BOOST_FT_cc_name
BOOST_PP_EXPAND(a)   undef BOOST_FT_cc
BOOST_PP_EXPAND(a)   undef BOOST_FT_cc_id
BOOST_PP_EXPAND(a) else
BOOST_PP_EXPAND(a)   undef BOOST_FT_config_valid
BOOST_PP_EXPAND(a) endif

All cases result in syntax errors if BOOST_PP_EXPAND is not defined. I suspect somewhere a recursive call with the parameter #.

@guwirth
Copy link
Collaborator

guwirth commented May 20, 2023

@SonarOpenCommunity SonarOpenCommunity locked as resolved and limited conversation to collaborators Nov 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

2 participants