rose-compiler / rose

Developed at Lawrence Livermore National Laboratory (LLNL), ROSE is an open source compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C (C89 and C98), C++ (C++98 and C++11), UPC, Fortran (77/95/2003), OpenMP, Java, Python and PHP applications.
http://rosecompiler.org
Other
600 stars 132 forks source link

c++ frontend issue (EDG_ROSE_Translation) #208

Open sepy97 opened 2 years ago

sepy97 commented 2 years ago

When running any Rose tool (either a tool written by me or prebuilt rose tools,, such as identityTranslator) on some CPP files (not all of them, just those that have templates and other syntactic sugar) I keep getting this issue: Error: default reached template_parameter_kind = 11 identityTranslator[1166814] 2.77245s Rose[FATAL]: assertion failed: identityTranslator[1166814] 2.77254s Rose[FATAL]: ../../../../../../rose/src/frontend/CxxFrontend/EDG/edgRose/edgRose.C:18791 identityTranslator[1166814] 2.77258s Rose[FATAL]: SgExpression* EDG_ROSE_Translation::convert_constant_template_parameter(a_constant_ptr) identityTranslator[1166814] 2.77260s Rose[FATAL]: required: false

It's happening on newer versions of Rose (0.11.46.0.1+), on older it's fine (for example, 0.11.46.0.0): both my tool and identityTranslator work fine on both C and CPP files. Both old and new versions of Rose were installed from apt package, so EDG frontend was part of the package.

On my Rose tool I've figured out the line that causes the issue: ast = frontend(argv); So, it seems like this issue is related to how Rose works with the frontend, not sure how can I debug this issue. Any help would be useful

tristanvdb commented 2 years ago

Sorry for the late reply. Can you provide details about your environment? Ubuntu version?

sepy97 commented 2 years ago

Ubuntu 20.04

sepy97 commented 2 years ago

just as a follow-up, this is the --version-long of ROSE on which I can observe this problem:

ROSE (version: 0.11.46.0.1) --- using EDG C/C++ front-end version: edg-5.0 --- using OFP Fortran parser version: unknown (OFP is disabled) --- using Boost version: 1.71.0 (/usr) --- using backend C compiler: gcc-9 version: 9.3 --- using backend C compiler path (as specified at configure time): gcc-9 --- using backend C++ compiler: g++-9 version: 9.3 --- using backend C++ compiler path (as specified at configure time): g++-9 --- using original build tree path: /root/mount/rose-build --- using instalation path: /usr/rose --- using GNU readline version: unknown (readline is disabled) --- using libmagic version: unknown (libmagic is disabled) --- using yaml-cpp version: unknown (yaml-cpp is disabled) --- using lib-yices version: unknown (libyices is disabled) --- binary analysis is enabled --- ARM AArch64 is disabled --- ARM AArch32 is disasbled --- concolic testing is disabled

As I already said, for an older version (Ubuntu 18, ROSE 0.11.46.0.0) there is no such an issue