Frama-C Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002301Frama-CKernelpublic2017-05-11 14:232017-05-11 15:46
ReporterJochen 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusnewResolutionopen 
PlatformPhosphorus-20170501-beta1OSxubuntu 16.04.1OS Version
Product Version 
Target VersionFixed in Version 
Summary0002301: statement contract apparently confuses parser
DescriptionRunning "frama-c -wp assigns.c" on the attached program produces a warning:

assigns.c:12:[wp] warning: Missing assigns clause (assigns 'everything' instead)

The warning is unjustified since the loop in line 12 does have a "loop assigns" clauses, and loops don't use (plain) "assigns" clauses.

If the trivial assertion in line 9 is activated, the warning disappears, and everything is proven.

If instead the braces in line 5 and 7 are removed, Frama-c reports a crash (text see "Additional Information").
Additional InformationCrash message:

[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing assigns.c (with preprocessing)
[wp] failure: Several assigns ?
[kernel] Current source was: assigns.c:2
         The full backtrace is:
         Raised at file "src/kernel_services/plugin_entry_points/log.ml", line 568, characters 30-31
         Called from file "src/kernel_services/plugin_entry_points/log.ml", line 562, characters 9-16
         Re-raised at file "src/kernel_services/plugin_entry_points/log.ml", line 565, characters 15-16
         Called from file "src/plugins/wp/wpStrategy.ml", line 470, characters 13-63
         Called from file "src/plugins/wp/wpStrategy.ml", line 505, characters 8-34
         Called from file "list.ml", line 73, characters 12-15
         Called from file "src/plugins/wp/wpStrategy.ml", line 541, characters 2-34
         Called from file "map.ml", line 168, characters 20-25
         Called from file "map.ml", line 168, characters 10-18
         Called from file "src/plugins/wp/wpAnnot.ml", line 1023, characters 2-39
         Called from file "src/plugins/wp/wpAnnot.ml", line 1094, characters 15-41
         Called from file "src/plugins/wp/wpAnnot.ml", line 1273, characters 14-39
         Called from file "src/plugins/wp/wpAnnot.ml", line 1274, characters 9-22
         Called from file "src/plugins/wp/wpAnnot.ml", line 1363, characters 2-47
         Called from file "map.ml", line 168, characters 20-25
         Called from file "src/plugins/wp/Generator.ml", line 136, characters 4-39
         Called from file "src/plugins/wp/register.ml", line 654, characters 15-40
         Called from file "src/libraries/stdlib/extlib.ml", line 299, characters 14-17
         Re-raised at file "src/libraries/stdlib/extlib.ml", line 299, characters 47-48
         Called from file "src/libraries/stdlib/extlib.ml", line 300, characters 2-12
         Called from file "src/libraries/stdlib/extlib.ml", line 300, characters 2-12
         Called from file "queue.ml", line 134, characters 6-20
         Called from file "src/kernel_internals/runtime/boot.ml", line 37, characters 4-20
         Called from file "src/kernel_services/cmdline_parameters/cmdline.ml", line 789, characters 2-9
         Called from file "src/kernel_services/cmdline_parameters/cmdline.ml", line 819, characters 18-64
         Called from file "src/kernel_services/cmdline_parameters/cmdline.ml", line 228, characters 4-8
         
         Plug-in wp aborted: internal error.
         Please report as 'crash' at http://bts.frama-c.com/. [^]
         Your Frama-C version is Phosphorus-20170501-beta1.
         Note that a version and a backtrace alone often do not contain enough
         information to understand the bug. Guidelines for reporting bugs are at:
         http://bts.frama-c.com/dokuwiki/doku.php?id=mantis:frama-c:bug_reporting_guidelines [^]
TagsNo tags attached.
Attached Filesc file icon assigns.c [^] (179 bytes) 2017-05-11 14:23 [Show Content]

- Relationships

-  Notes
(0006395)
Jochen (reporter)
2017-05-11 15:46

A similar unjustified warning can be triggered without statement contracts, when "for" labels referring to different behaviors are used, see file "beh2.c" at 0002298.

- Issue History
Date Modified Username Field Change
2017-05-11 14:23 Jochen New Issue
2017-05-11 14:23 Jochen File Added: assigns.c
2017-05-11 15:46 Jochen Note Added: 0006395


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker