Multiple contracts merge twice resutling in Kernel error
ID0001572:
**This issue was created automatically from Mantis Issue 1572. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001572 | Frama-C | Kernel | public | 2013-11-27 | 2014-03-13 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | dmentre | **Assigned To** | yakobowski | **Resolution** | fixed |
| **Priority** | normal | **Severity** | crash | **Reproducibility** | always |
| **Platform** | - | **OS** | - | **OS Version** | - |
| **Product Version** | Frama-C Fluorine-20130601 | **Target Version** | - | **Fixed in Version** | Frama-C Neon-20140301 |
### Description :
With the attached files, when I call the following command I get a backtrace:
frama-c questions/q18_a.c questions/q18_b.c
"""
[kernel] preprocessing with "gcc -C -E -I. questions/q18_a.c"
questions/q18_a.h:6:[kernel] warning: found two contracts. Merging them
[kernel] preprocessing with "gcc -C -E -I. questions/q18_b.c"
questions/q18_a.c:18:[kernel] warning: found two contracts. Merging them
questions/q18_a.c:18:[kernel] warning: found two contracts. Merging them
[kernel] failure: trying to register twice property `requires
p ? 10'.
That is forbidden (kernel invariant broken).
[kernel] Current source was: questions/q18_b.c:8
The full backtrace is:
Raised at file "src/kernel/log.ml", line 523, characters 30-31
Called from file "src/kernel/log.ml", line 517, characters 9-16
Re-raised at file "src/kernel/log.ml", line 520, characters 15-16
Called from file "src/logic/property_status.ml", line 292, characters 4-132
Called from file "list.ml", line 75, characters 12-15
Called from file "set.ml", line 305, characters 38-41
Called from file "src/kernel/file.ml", line 1487, characters 2-53
Called from file "src/kernel/file.ml", line 2020, characters 4-27
Called from file "src/kernel/ast.ml", line 103, characters 2-28
Called from file "src/kernel/ast.ml", line 114, characters 53-71
Called from file "src/kernel/boot.ml", line 29, characters 6-20
Called from file "src/kernel/cmdline.ml", line 732, characters 2-9
Called from file "src/kernel/cmdline.ml", line 212, characters 4-8
"""
Strangely enough, I call frama-c on the files in the reverse order, everything goes well:
frama-c questions/q18_b.c questions/q18_a.c
"""
[kernel] preprocessing with "gcc -C -E -I. questions/q18_b.c"
[kernel] preprocessing with "gcc -C -E -I. questions/q18_a.c"
questions/q18_a.h:6:[kernel] warning: found two contracts. Merging them
questions/q18_a.c:18:[kernel] warning: found two contracts. Merging them
"""
## Attachments
- [q18_a.c](/uploads/10f04c0db051498b932d92fdd22e9db9/q18_a.c)
- [q18_a.h](/uploads/7f819244d8d7735ba6fe1091fda5263d/q18_a.h)
- [q18_b.c](/uploads/16ee6ccbd60257bd93b2d638f80ab9b3/q18_b.c)
issue