frama-c issueshttps://git.frama-c.com/pub/frama-c/-/issues2021-02-22T12:57:36Zhttps://git.frama-c.com/pub/frama-c/-/issues/256Crash on attempt to start framaCIRGen when libs are linked statically and dyn...2021-02-22T12:57:36Zmantis-gitlab-migrationCrash on attempt to start framaCIRGen when libs are linked statically and dynamically.ID0002368:
**This issue was created automatically from Mantis Issue 2368. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002368:
**This issue was created automatically from Mantis Issue 2368. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002368 | Frama-C | Plug-in > clang | public | 2018-02-15 | 2018-07-11 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | DeMaze | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | crash | **Reproducibility** | always |
| **Platform** | GNU/Linux | **OS** | Debian | **OS Version** | 9.3 |
| **Product Version** | Frama-C 16-Sulfur | **Target Version** | - | **Fixed in Version** | Frama-C 17-Chlorine |
### Description :
On the attempt to install Frama-Clang regularly as described (see
attached file installation.txt), the executable framaCIRGen exits with
an error when executed. The error message points to a problem with
LLVM. In fact, it depicts one commandline option to be registered more
than once. This occurs on the attempt of using Frama-C to parse C++
source code and when the executable framaCIRGen is invoked manually on
the commandline. I get the following error:
<output nr="0" command="./frama-clang-0.0.4/bin/framaCIRGen">
: CommandLine Error: Option 'asm-macro-max-nesting-depth' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
</output>
However, this has only been observed ith llvm-5.0 on Debian GNU/Linux
9.3 (my system, see lsb_release_3ffbf_2018-02-10000905) for now. With
llvm 3.9, no such errors happen. Presumably, versions of llvm > 5.0
could also be affected. This seems to be a problem many people have
experienced with llvm related programs [2][3][4][5]. In fact, it has
even been reported for frama-clang [6].
### Additional Information :
Root Cause
==========
As far as my investigations revealed, this problem occurs because of
the linking mechanism on Debian GNU/Linux. On this distribution,
libraries of LLVM are built two-fold:
Static archives (lib*.a):
clangFrontend, clangDriver, clangTooling, clanParse, clangSema,
clangAnalysis, clangEdit, clangAST, clangLex, clangSerialization,
clangBasic, LLVMTransformUtils, LLVMBitReader, LLVMMCParser,
LLVMOption
Shared object (lib*.so):
LLVM-5.0
Therefore, it is tried to link them according to their type (lines 74-77, 82-85):
<output nr="1" command="cat frama-clang-0.0.4/Makefile.clang -n | grep 'USEDLIBS' -A 5 -B 5 ">
69 CFLAGS+=-g
70 CLANG_LINKFLAGS+=-g
71 endif
72
73 #LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
74 USEDLIBS = clangFrontend \
75 clangDriver clangTooling clangParse clangSema \
76 clangAnalysis clangEdit clangAST clangLex clangSerialization \
77 clangBasic LLVMTransformUtils LLVMBitReader LLVMMCParser LLVMOption
78
79 # for use in main Makefile
80 default: $(PLUGIN_DIR)/bin/$(TOOLNAME)
81
82 $(PLUGIN_DIR)/bin/$(TOOLNAME): $(OBJS) $(PLUGIN_DIR)/bin
83 $(PRINT_LINKING) $@
84 $(CXX) $(CLANG_LINKFLAGS) -o $@ \
85 $(OBJS) $(addprefix -l,$(USEDLIBS)) $(LLVM_LIBS) $(CLANG_SYSLIBS) $(CLANG_LINKFLAGS)
86
87 $(PLUGIN_DIR)/bin:
88 $(MKDIR) $@
89
90 clean:
</output>
This results in the following dependencies on dynamic libraries as follows:
<output n="2" command="ldd ./frama-clang-0.0.4/bin/framaCIRGen">
linux-vdso.so.1 (0x00007ffe31ff5000)
libLLVM-5.0.so.1 => /usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1 (0x00007fb4c4825000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb4c44a3000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb4c419f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb4c3f88000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb4c3be9000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fb4c39e0000)
libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2 (0x00007fb4c37a8000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb4c35a0000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb4c339c000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fb4c3172000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb4c2f55000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb4c2d3b000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb4c9431000)
libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5 (0x00007fb4c2b18000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fb4c2902000)
</output>
From this output, this assumption can be confirmed because
ligcc_s.so.1 as well as libLLVM-5.0.so.1 occurs. A response on a bug
report of LLVM considers this as rather bad practice
however. Moreover, this is mentioned as a classical problem of LLVM's
"global object-based commandline switch registration" [1]:
"The command line option error is the classical problem one gets due
to the LLVM's global object-based command line switch registration. If
you somehow link the same global object (that registers the command
line option) twice via dynamic loading of the LLVM library twice or
more to the same process, it registers the same command line object
again (when calling the global object initializer), resulting in this
error." [1]
The aforementioned symbol 'asm-macro-max-nesting-depth' occurs both in
libLLVMMCParser.a and libLLVM-5.0.so.1 . Hence, I conjecture these are
the files in conflict.
My Solution
===========
Just link without libLLVMMCParser.a or more precisely, remove
LLVMMCParser from USEDLIBS in Makefile.clang. This seems to work as
C++ code is analyzable again. Please find patches for Makefile.clang
attached which circumvent this problem according to my proposal
(Makefile.clang.patch / Makefile.clang.patch.better). Feel free to
contacting me in case of any further quesions / comments.
References
==========
[1] https://bugs.llvm.org/show_bug.cgi?id=30587#c6
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768185
[3] https://bugs.llvm.org/show_bug.cgi?id=31571
[4] http://llvm.1065342.n5.nabble.com/llvm-dev-LLD-and-LLVM-LINK-LLVM-DYLIB-td104570.html
[5] https://github.com/zig-lang/zig/issues/67
[6] https://stackoverflow.com/questions/45647503/errors-when-using-the-frama-clang-plugin
### Steps To Reproduce :
1. Manually install llvm-5.0 as described on https://apt.llvm.org/
2. Download and build frama-clang as described officially with llvm-5.0
3. Execute ./bin/framaCIRGen
## Attachments
- [logs_and_more.tar.xz](/uploads/d2a4d0490b88cd4c21961e8a55ab0ca2/logs_and_more.tar.xz)https://git.frama-c.com/pub/frama-c/-/issues/654"__is_trivial" causes abort2021-02-22T13:08:13ZJochen Burghardt"__is_trivial" causes abortID0001967:
**This issue was created automatically from Mantis Issue 1967. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0001967:
**This issue was created automatically from Mantis Issue 1967. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001967 | Frama-Clang | Plug-in > clang | public | 2014-11-13 | 2015-04-16 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | feature | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
Unsupported expressions:UnaryTypeTraitExpr 0x253e888 <134.cpp:2:10, col:26> '_Bool'
Aborting
[kernel] user error: Failed to parse C++ file. See Clang messages for more information
(Importance: this code is used via #include <vector>.)
## Attachments
- [134.cpp](/uploads/fc0e0514a33ec9a94e33e11fd592e5b0/134.cpp)https://git.frama-c.com/pub/frama-c/-/issues/656extra "//" comment within "//@" annotation causes abort2021-02-22T13:08:15ZJochen Burghardtextra "//" comment within "//@" annotation causes abortID0002013:
**This issue was created automatically from Mantis Issue 2013. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002013:
**This issue was created automatically from Mantis Issue 2013. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002013 | Frama-Clang | Plug-in > clang | public | 2014-12-04 | 2015-04-16 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
framaCIRGen: src/frama-clang/ACSLToken.h:563: Acsl::DLexer::AbstractToken Acsl::DLexer::Token::getFullToken() const: Assertion `_type != 0' failed.
Aborted (core dumped)
[kernel] user error: Failed to parse C++ file. See Clang messages for more information
The problem disappears if "// comment" is deleted in line 2, or if the file is renamed to "190.c".
## Attachments
- [190.cpp](/uploads/6e7ae2cf72d87f620e534fcf2c6a03dd/190.cpp)https://git.frama-c.com/pub/frama-c/-/issues/657logic function with typedef'd result type causes crash2021-02-22T13:08:16ZJochen Burghardtlogic function with typedef'd result type causes crashID0002056:
**This issue was created automatically from Mantis Issue 2056. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002056:
**This issue was created automatically from Mantis Issue 2056. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002056 | Frama-Clang | Plug-in > clang | public | 2015-01-22 | 2015-04-16 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | crash | **Reproducibility** | always |
| **Platform** | Neon-20140301+dev-STANCE-Jan2015 | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing 437.cpp (external front-end)
Now output intermediate result
437.cpp:6:[fclang] failure: predicate definition with a term as body
[kernel] Current source was: 437.cpp:6
The full backtrace is:
Raised at file "src/kernel/log.ml", line 524, characters 30-31
Called from file "src/kernel/log.ml", line 518, characters 9-16
Re-raised at file "src/kernel/log.ml", line 521, characters 15-16
Called from file "src/frama-clang/convert_acsl.ml", line 622, characters 12-76
Called from file "src/frama-clang/convert.ml", line 2233, characters 18-54
Called from file "list.ml", line 74, characters 24-34
Called from file "src/frama-clang/convert.ml", line 2241, characters 19-78
Called from file "src/frama-clang/convert.ml", line 2554, characters 21-48
Called from file "list.ml", line 74, characters 24-34
Called from file "src/frama-clang/convert.ml", line 2558, characters 4-79
Called from file "src/frama-clang/frama_Clang_register.ml", line 86, characters 13-36
Called from file "src/kernel/file.ml", line 1248, characters 8-41
Called from file "src/kernel/file.ml", line 1296, characters 23-30
Called from file "list.ml", line 74, characters 24-34
Called from file "src/kernel/file.ml", line 1293, characters 6-864
Called from file "src/kernel/file.ml", line 2287, characters 12-30
Called from file "src/kernel/file.ml", line 2372, characters 4-27
Called from file "src/kernel/ast.ml", line 111, characters 2-28
Called from file "src/kernel/ast.ml", line 123, characters 53-71
Called from file "src/kernel/boot.ml", line 29, characters 6-20
Called from file "src/kernel/cmdline.ml", line 761, characters 2-9
Called from file "src/kernel/cmdline.ml", line 216, characters 4-8
Plug-in fclang aborted: internal error.
Please report as 'crash' at http://bts.frama-c.com/.
Your Frama-C version is Neon-20140301+dev-STANCE.
The problem disappears if the return type is changed to "int" in line 6.
Line 7 just demonstrates that the same expression is accepted in C++ code.
## Attachments
- [437.cpp](/uploads/b80e0c84f1ccd4254f37a850575ad463/437.cpp)https://git.frama-c.com/pub/frama-c/-/issues/658method can't be used in member initializer before its declaration2021-02-22T13:08:18ZJochen Burghardtmethod can't be used in member initializer before its declarationID0002064:
**This issue was created automatically from Mantis Issue 2064. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002064:
**This issue was created automatically from Mantis Issue 2064. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002064 | Frama-Clang | Plug-in > clang | public | 2015-01-26 | 2015-04-16 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | Neon-20140301+dev-STANCE-Jan2015 | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing 443.cpp (external front-end)
Now output intermediate result
443.cpp:7:[kernel] warning: Calling undeclared function _ZNK5PointE1x. Old style K&R code?
The error message is not observed for any of the variants in lines 4 to 6 (currently commented-out). It also disappears if the definition of x() is moved before line 4.
## Attachments
- [443.cpp](/uploads/a5451bc00dc4425f63032528113647d7/443.cpp)https://git.frama-c.com/pub/frama-c/-/issues/801neither "allocates" nor "frees" clause recognized2021-02-22T13:12:15ZJochen Burghardtneither "allocates" nor "frees" clause recognizedID0002062:
**This issue was created automatically from Mantis Issue 2062. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002062:
**This issue was created automatically from Mantis Issue 2062. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002062 | Frama-Clang | Plug-in > clang | public | 2015-01-26 | 2015-03-10 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | low | **Severity** | minor | **Reproducibility** | have not tried |
| **Platform** | Neon-20140301+dev-STANCE-Jan2015 | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing 442.cpp (external front-end)
442.cpp:2:6: expecting function spec
Now output intermediate result
A similar error message is observed if line 2 is commented-out and line 3 commented-in. Both messages disappear if the file is renamed to "442.c".
## Attachments
- [442.cpp](/uploads/893ffee0f7a0eb42835710b568815b70/442.cpp)https://git.frama-c.com/pub/frama-c/-/issues/834Inheritance of members does not work when chained2021-02-22T13:12:59Zmantis-gitlab-migrationInheritance of members does not work when chainedID0001826:
**This issue was created automatically from Mantis Issue 1826. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0001826:
**This issue was created automatically from Mantis Issue 1826. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001826 | Frama-Clang | Plug-in > clang | public | 2014-07-04 | 2015-02-17 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | lapawczykt | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | - | **OS** | ubuntu 14.04 | **OS Version** | - |
| **Product Version** | Frama-C Neon-20140301 | **Target Version** | - | **Fixed in Version** | - |
### Description :
If struct B derives from struct A and struct C derives from struct B, struct C includes members of struct B but not of struct A, eventhough it should.
## Attachments
- [problem303.cpp](/uploads/180e398597977d06dbde1dda79f063d8/problem303.cpp)https://git.frama-c.com/pub/frama-c/-/issues/836Parsing error with arrow operator2021-02-22T13:13:02Zmantis-gitlab-migrationParsing error with arrow operatorID0001861:
**This issue was created automatically from Mantis Issue 1861. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0001861:
**This issue was created automatically from Mantis Issue 1861. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001861 | Frama-Clang | Plug-in > clang | public | 2014-07-25 | 2015-02-17 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | lapawczykt | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | have not tried |
| **Platform** | - | **OS** | ubuntu 14.04 | **OS Version** | - |
| **Product Version** | Frama-C Neon-20140301 | **Target Version** | - | **Fixed in Version** | - |
### Description :
"A->a <= A->b <= A->c" causes a parsing error.
On the other hand "A->a <= A->b && A->b <= A->c" works.
When multiple comparrisons are chained without "&&" an arrow operator in the third or higher term causes an "invalid type for 'operator ->'" error.
(Works in c)
## Attachments
- [problem310.cpp](/uploads/3f7eb7890e4ed1dcace89ca08099b866/problem310.cpp)https://git.frama-c.com/pub/frama-c/-/issues/838ACSL parsing of greater-than relation with references2021-02-22T13:13:04ZVirgile PrevostoACSL parsing of greater-than relation with referencesID0001921:
**This issue was created automatically from Mantis Issue 1921. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0001921:
**This issue was created automatically from Mantis Issue 1921. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001921 | Frama-Clang | Plug-in > clang | public | 2014-09-12 | 2015-02-17 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | virgile | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | - | **OS** | - | **OS Version** | - |
| **Product Version** | Frama-C GIT, precise the release id | **Target Version** | - | **Fixed in Version** | - |
### Description :
On the following code:
/*@
ensures \result >= x;
*/
int f(int& x) { return ++x; }
/*@
ensures \result == x;
*/
int g(int& x) { return x; }
/*@
ensures \result >= x;
*/
int h(int x) { return x; }
contracts for g and h are correctly parsed, while contract of f produces the following error messages:
tests/specs/ref_spec.cpp:2:23: comparison of incompatible array types
tests/specs/ref_spec.cpp:2:23: expecting a term or predicate
tests/specs/ref_spec.cpp:2:23: the term is not a predicatehttps://git.frama-c.com/pub/frama-c/-/issues/874clause labels not accepted by cxx plugin2021-02-22T13:13:53ZJochen Burghardtclause labels not accepted by cxx pluginID0002010:
**This issue was created automatically from Mantis Issue 2010. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002010:
**This issue was created automatically from Mantis Issue 2010. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002010 | Frama-Clang | Plug-in > clang | public | 2014-12-01 | 2015-02-16 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | feature | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
187.cpp:2:27: expecting a term or predicate
187.cpp:2:27: expecting a predicate
Now output intermediate result
When the file is renamed to "187.c", Frama-C processes it without complaints, so I guess my syntax is correct. I failed to find this detail in the manual "acsl-implementation-Neon-20140301.pdf", cf. #2009.
## Attachments
- [187.cpp](/uploads/38bdf3aaabc360f9919bbc99cddd8bb1/187.cpp)https://git.frama-c.com/pub/frama-c/-/issues/875variable in then-part of "?:" in ACSL clause causes syntax error2021-02-22T13:13:55ZJochen Burghardtvariable in then-part of "?:" in ACSL clause causes syntax errorID0001993:
**This issue was created automatically from Mantis Issue 1993. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0001993:
**This issue was created automatically from Mantis Issue 1993. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001993 | Frama-Clang | Plug-in > clang | public | 2014-11-27 | 2015-02-16 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
157.cpp:2:27: unexpected end of expression
The message disappears if "i" is replaced by "2" in the contract in line 2.
## Attachments
- [157.cpp](/uploads/f1b07e5429c0ae36142e24e8e7cf2eeb/157.cpp)https://git.frama-c.com/pub/frama-c/-/issues/877"&p->a" causes abort when "->" is user-defined2021-02-22T13:13:58ZJochen Burghardt"&p->a" causes abort when "->" is user-definedID0002025:
**This issue was created automatically from Mantis Issue 2025. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002025:
**This issue was created automatically from Mantis Issue 2025. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002025 | Frama-Clang | Plug-in > clang | public | 2014-12-11 | 2015-02-15 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
framaCIRGen: src/frama-clang/ACSLTermOrPredicate.h:276: void Acsl::TermOrPredicate::Operator::setLocation(location): Assertion `!_startLocation' failed.
Aborted (core dumped)
[kernel] user error: Failed to parse C++ file. See Clang messages for more information
The problem disappears if the assertion is replaced by the statement "if (&p->a == 0);".
## Attachments
- [199.cpp](/uploads/3e0bcc51008398612e7ce3d387855f6a/199.cpp)
- [400.cpp](/uploads/f61316995b878a4df7118757094715ba/400.cpp)https://git.frama-c.com/pub/frama-c/-/issues/884contract of template function specialization taken to refer to next plain fun...2021-02-22T13:14:10ZJochen Burghardtcontract of template function specialization taken to refer to next plain function belowID0002042:
**This issue was created automatically from Mantis Issue 2042. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002042:
**This issue was created automatically from Mantis Issue 2042. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002042 | Frama-Clang | Plug-in > clang | public | 2015-01-05 | 2015-02-15 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
Using "frama-c -wp 424.cpp" the attached program can be verified, although e.g. foo<int>(0) yields 2 whereas its contract says it should yield 4.
Apparently, Frama-C thinks the contract belongs to the plain function bar(). That would also be an explanation for issue #2034.
Moving the contract from line 4 down to line 6, or to line 8, keeps that behavior.
After moving it up to line 1 (i.e. before the generic template), no obligation at all is generated (which is ok since foo<>() isn't called anywhere).
## Attachments
- [424.cpp](/uploads/27785eb453be4b53b4f7843126234b75/424.cpp)
- [424a.cpp](/uploads/8bcfdd48f28c3257a7b0dbdfd882ce36/424a.cpp)https://git.frama-c.com/pub/frama-c/-/issues/890use of template class from namespace causes crash2021-02-22T13:14:18ZJochen Burghardtuse of template class from namespace causes crashID0001971:
**This issue was created automatically from Mantis Issue 1971. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0001971:
**This issue was created automatically from Mantis Issue 1971. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001971 | Frama-Clang | Plug-in > clang | public | 2014-11-17 | 2015-02-15 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | crash | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
The file attached to issue #1970 can be simplified somewhat further while still causing the same crash message (however with a possibly different call stack - I didn't check that):
Now output intermediate result
135a.cpp:3:[fclang] failure: Unknown aggregate type std::vector<...>
[kernel] Current source was: 135a.cpp:3
The full backtrace is:
Raised at file "src/kernel/log.ml", line 524, characters 30-31
Called from file "src/kernel/log.ml", line 518, characters 9-16
Re-raised at file "src/kernel/log.ml", line 521, characters 15-16
Called from file "src/frama-clang/convert_env.ml", line 269, characters 43-71
Called from file "src/frama-clang/convert.ml", line 162, characters 17-69
Called from file "src/frama-clang/convert.ml", line 170, characters 17-52
Called from file "list.ml", line 57, characters 20-23
Called from file "src/frama-clang/convert.ml", line 1283, characters 13-45
Called from file "src/frama-clang/convert.ml", line 1910, characters 8-66
Called from file "list.ml", line 74, characters 24-34
Called from file "src/frama-clang/convert.ml", line 1998, characters 19-78
Called from file "src/frama-clang/convert.ml", line 2262, characters 21-48
Called from file "list.ml", line 74, characters 24-34
Called from file "src/frama-clang/convert.ml", line 2266, characters 4-79
Called from file "src/frama-clang/frama_Clang_register.ml", line 86, characters 13-36
Called from file "src/kernel/file.ml", line 1073, characters 10-43
Called from file "src/kernel/file.ml", line 1117, characters 23-30
Called from file "list.ml", line 74, characters 24-34
Called from file "src/kernel/file.ml", line 1114, characters 6-520
Called from file "src/kernel/file.ml", line 2179, characters 12-30
Called from file "src/kernel/file.ml", line 2264, characters 4-27
Called from file "src/kernel/ast.ml", line 111, characters 2-28
Called from file "src/kernel/ast.ml", line 123, characters 53-71
Called from file "src/kernel/boot.ml", line 29, characters 6-20
Called from file "src/kernel/cmdline.ml", line 761, characters 2-9
Called from file "src/kernel/cmdline.ml", line 216, characters 4-8
Plug-in fclang aborted: internal error.
Please report as 'crash' at http://bts.frama-c.com/.
Your Frama-C version is Neon-20140301+dev-stance.
Again, the problem disappears if the namespace environment is omitted (i.e. line 2,4 deleted, prefix "std::" deleted in line 6).
It also disappears if "vector" is made an unparametrized class, i.e. if "template<typename _Tp>" is deleted in line 3 and "<int>" is deleted in line 6.
## Attachments
- [135a.cpp](/uploads/6e2f98ce835744c14a137ab678a4f14a/135a.cpp)https://git.frama-c.com/pub/frama-c/-/issues/901name in contract should refer to logic function, if defined, even in presence...2021-02-22T13:14:30ZJochen Burghardtname in contract should refer to logic function, if defined, even in presence of homonymous C++ methodID0002058:
**This issue was created automatically from Mantis Issue 2058. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002058:
**This issue was created automatically from Mantis Issue 2058. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002058 | Frama-Clang | Plug-in > clang | public | 2015-01-22 | 2015-02-14 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | low | **Severity** | feature | **Reproducibility** | always |
| **Platform** | Neon-20140301+dev-STANCE-Jan2015 | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
439.cpp:7:27: calls to functions/methods like 'size' are not allowed
Now output intermediate result
However, "size" in line 7 was intended to refer to the logic function from line 4, not to the C++ method of line 5. In fact, line 4 was added just because it isn't yet possible to refer to the "size" from line 5 in a contract.
(Low priority: eventually, the logic function from line 4 will be redundant; for the time being, a workaround is e.g. prefixing all logic functions with "l")
## Attachments
- [439.cpp](/uploads/9eaff3cdcef3f8e0efcc68066f62957e/439.cpp)https://git.frama-c.com/pub/frama-c/-/issues/902logic function call in rhs of relation chain causes abort2021-02-22T13:14:31ZJochen Burghardtlogic function call in rhs of relation chain causes abortID0002059:
**This issue was created automatically from Mantis Issue 2059. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002059:
**This issue was created automatically from Mantis Issue 2059. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002059 | Frama-Clang | Plug-in > clang | public | 2015-01-22 | 2015-02-14 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | Neon-20140301+dev-STANCE-Jan2015 | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing 440.cpp (external front-end)
framaCIRGen: src/frama-clang/ACSLTermOrPredicate.h:633: void Acsl::TermOrPredicate::Operator::extractLastArgument(logic_type &, term &, predicate_named &): Assertion `targument' failed.
Aborted (core dumped)
[kernel] user error: Failed to parse C++ file. See Clang messages for more information
The problem remains if the return type of "lsize" is changed to "int", and its body to an int member of struct vector (e.g. "int sz;//@logic int lsize()=sz;").
The problem disappears if the use of "lsize()" is moved to any other position in the relation chain in line 4, or if that chain is shortened.
## Attachments
- [440.cpp](/uploads/7e043af6bff6f11766b4cbe3e8209001/440.cpp)https://git.frama-c.com/pub/frama-c/-/issues/904"\at" doesn't accept predicate argument label2021-02-22T13:14:33ZJochen Burghardt"\at" doesn't accept predicate argument labelID0002066:
**This issue was created automatically from Mantis Issue 2066. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002066:
**This issue was created automatically from Mantis Issue 2066. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002066 | Frama-Clang | Plug-in > clang | public | 2015-01-26 | 2015-02-13 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | Neon-20140301+dev-STANCE-Jan2015 | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing 444.cpp (external front-end)
444.cpp:2:44: expecting a label in the \at construct
Now output intermediate result
The message disappears when the file is renamed to "444.c".
## Attachments
- [444.cpp](/uploads/3f08cdd8c2d7381ec3a22c2725f249af/444.cpp)https://git.frama-c.com/pub/frama-c/-/issues/905"*" in quantifier in axiom causes SEGV2021-02-22T13:14:34ZJochen Burghardt"*" in quantifier in axiom causes SEGVID0002069:
**This issue was created automatically from Mantis Issue 2069. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002069:
**This issue was created automatically from Mantis Issue 2069. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002069 | Frama-Clang | Plug-in > clang | public | 2015-01-29 | 2015-02-13 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | Neon-20140301+dev-STANCE-Jan2015 | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | - |
### Description :
output:
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing 445.cpp (external front-end)
Segmentation fault (core dumped)
[kernel] user error: Failed to parse C++ file. See Clang messages for more information
The problem disappears if the "*" in line 5 is deleted, or if the file is renamed to "445.c".
## Attachments
- [445.cpp](/uploads/e8bfff6a4322dfd90bf217aea81fd82e/445.cpp)https://git.frama-c.com/pub/frama-c/-/issues/939use of later-defined nested class type in method signature causes error2021-02-22T13:15:29ZJochen Burghardtuse of later-defined nested class type in method signature causes errorID0002027:
**This issue was created automatically from Mantis Issue 2027. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0002027:
**This issue was created automatically from Mantis Issue 2027. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0002027 | Frama-Clang | Plug-in > clang | public | 2014-12-11 | 2014-12-12 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | fvedrine | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | Frama-C GIT, precise the release id |
### Description :
output:
Now output intermediate result
403.cpp:8:[kernel] user error: redefinition of '_ZN6StringE4Srep' in the same scope. Previous declaration was at 403.cpp:4
[kernel] user error: skipping file "403.cpp" that has errors.
The error remains if the definition of "Srep" is moved into "String".
The error disappears if the declarations of "foo" is deleted in line 4.
## Attachments
- [403.cpp](/uploads/4ea891dfc1b5ccbb91e068ab31096c71/403.cpp)https://git.frama-c.com/pub/frama-c/-/issues/940"catch(...)" causes crash2021-02-22T13:15:30ZJochen Burghardt"catch(...)" causes crashID0001966:
**This issue was created automatically from Mantis Issue 1966. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | ---...ID0001966:
**This issue was created automatically from Mantis Issue 1966. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001966 | Frama-Clang | Plug-in > clang | public | 2014-11-13 | 2014-12-12 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | Jochen | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | crash | **Reproducibility** | always |
| **Platform** | frama-c-Neon-20140301+dev-stance | **OS** | - | **OS Version** | xubuntu-cfe13.10 |
| **Product Version** | - | **Target Version** | - | **Fixed in Version** | Frama-C GIT, precise the release id |
### Description :
output:
Now output intermediate result
[kernel] Current source was: 133.cpp:3
The full backtrace is:
Raised at file "stack.ml", line 31, characters 20-25
Called from file "src/kernel/exn_flow.ml", line 120, characters 37-60
Called from file "list.ml", line 69, characters 12-15
Called from file "src/kernel/exn_flow.ml", line 112, characters 8-389
Called from file "src/kernel/visitor.ml", line 75, characters 14-33
Called from file "cil/src/cil.ml", line 2045, characters 15-31
Called from file "cil/src/cil.ml", line 3094, characters 5-86
Called from file "cil/src/cil.ml", line 2084, characters 13-16
Called from file "cil/src/cil.ml", line 3254, characters 16-40
Called from file "cil/src/cil.ml", line 2060, characters 21-41
Called from file "cil/src/cil.ml", line 3483, characters 14-39
Called from file "cil/src/cil.ml", line 2060, characters 21-41
Called from file "cil/src/cil.ml", line 3445, characters 5-91
Called from file "cil/src/cil.ml", line 3537, characters 16-38
Called from file "cil/src/cil.ml", line 2084, characters 13-16
Called from file "cil/src/cil.ml", line 2129, characters 24-57
Called from file "cil/src/cil.ml", line 3531, characters 5-53
Called from file "cil/src/cil.ml", line 6156, characters 16-36
Called from file "list.ml", line 69, characters 12-15
Called from file "cil/src/cil.ml", line 5746, characters 3-30
Called from file "cil/src/cil.ml", line 6157, characters 2-420
Called from file "cil/src/cil.ml", line 2060, characters 21-41
Called from file "cil/src/cil.ml", line 6190, characters 7-84
Called from file "src/kernel/visitor.ml", line 827, characters 2-45
Called from file "src/kernel/file.ml", line 1617, characters 2-8
Called from file "queue.ml", line 134, characters 6-20
Called from file "src/kernel/file.ml", line 1694, characters 2-36
Called from file "src/kernel/file.ml", line 2264, characters 4-27
Called from file "src/kernel/ast.ml", line 111, characters 2-28
Called from file "src/kernel/ast.ml", line 123, characters 53-71
Called from file "src/kernel/boot.ml", line 29, characters 6-20
Called from file "src/kernel/cmdline.ml", line 761, characters 2-9
Called from file "src/kernel/cmdline.ml", line 216, characters 4-8
Unexpected error (Stack.Empty).
Please report as 'crash' at http://bts.frama-c.com/.
Your Frama-C version is Neon-20140301+dev-stance.
Could be related to issue #1957?
(Importance: this code is used via #include <vector>.)
## Attachments
- [133.cpp](/uploads/ec10c3fb4d765ca86e6de649c4277911/133.cpp)