type def'd as template typename causes SEGV when used in logic functions
ID0002057: This issue was created automatically from Mantis Issue 2057. Further discussion may take place here.
Id | Project | Category | View | Due Date | Updated |
---|---|---|---|---|---|
ID0002057 | Frama-Clang | Plug-in > clang | public | 2015-01-22 | 2015-02-14 |
Reporter | Jochen | Assigned To | fvedrine | Resolution | open |
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 :
In its current version, the program apparently causes a SEGV of the front-end: [kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing 438.cpp (external front-end) Segmentation fault (core dumped) [kernel] user error: Failed to parse C++ file. See Clang messages for more information
Several variations cause different behaviors, such as:
(1) changing "integer" to "int " in line 8: [kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing 438.cpp (external front-end) 438.cpp:8:51: invalid implicit conversion 438.cpp:8:51: expecting a term as body of function Now output intermediate result
(2) omitting the template parameter, and changing "T" to "int" in line 3: [kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing 438.cpp (external front-end) Now output intermediate result [fclang] failure: Cannot understand intermediate AST: line 799: unexpected unknown constructor 39702768 (Unknown constructor for term_node) [kernel] Current source was: FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i:43 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/frama_Clang_register.ml", line 83, characters 6-75 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.
(3) changing "pointer" to "T*" in line 7: [kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing 438.cpp (external front-end) 438.cpp:8:55: predicates do not support binary '+' operation Now output intermediate result 438.cpp:7:[fclang] failure: predicate definition with a term as body [kernel] Current source was: 438.cpp:7 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 2393, characters 18-54 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.