loop invariant referring to body-local variable causes crash, when body is enclosed in curly braces "{...}"
ID0002107: This issue was created automatically from Mantis Issue 2107. Further discussion may take place here.
Id | Project | Category | View | Due Date | Updated |
---|---|---|---|---|---|
ID0002107 | Frama-Clang | Plug-in > clang | public | 2015-04-27 | 2015-04-27 |
Reporter | Jochen | Assigned To | virgile | Resolution | open |
Priority | normal | Severity | crash | Reproducibility | always |
Platform | Sodium-20150201 | OS | - | OS Version | xubuntu14.04 |
Product Version | - | Target Version | - | Fixed in Version | - |
Description :
output:
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing) [kernel] Parsing 470.cpp (external front-end) Now output intermediate result 470.cpp:3:[fclang] failure: Unknown local variable s [kernel] Current source was: 470.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 "convert_acsl.ml", line 329, characters 18-77 Called from file "convert_acsl.ml", line 315, characters 13-52 Called from file "convert_acsl.ml", line 184, characters 38-72 Called from file "convert_acsl.ml", line 284, characters 4-30 Called from file "convert_acsl.ml", line 184, characters 38-72 Called from file "convert_acsl.ml", line 397, characters 13-38 Called from file "convert_acsl.ml", line 375, characters 11-42 Called from file "convert_acsl.ml", line 603, characters 14-40 Called from file "list.ml", line 55, characters 20-23 Called from file "convert.ml", line 1248, characters 18-70 Called from file "convert.ml", line 1344, characters 20-46 Called from file "list.ml", line 84, characters 24-34 Called from file "convert.ml", line 1334, characters 17-40 Called from file "convert.ml", line 2508, characters 21-44 Called from file "convert.ml", line 2642, characters 21-41 Called from file "list.ml", line 84, characters 24-34 Called from file "convert.ml", line 2645, characters 4-74 Called from file "frama_Clang_register.ml", line 120, 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 84, 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 763, 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 Sodium-20150201.
The crash doesn't happen when (1) the braces "{" and "}" in line 5 and 7 are deleted, (2) "s" is replaced by "0" in the invariant in line 3, (3) the declaration of "s" in line 6 is deleted, (4) the file is renamed to "470.c". In each of these cases, an appropriate error message is printed.
Additional Information :
My output of "clang --version" is:
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) Target: x86_64-pc-linux-gnu Thread model: posix