Frama-C Bug Tracking System - Frama-C
View Issue Details
0001913Frama-CPlug-in > jessiepublic2014-08-24 09:332014-08-26 14:42
kornevgen 
cmarche 
normalcrashalways
assignedopen 
Linux localhost 3.10.7-gentoo-r1Gentoo Linux
Frama-C Neon-20140301 
 
0001913: Jessie crashes on incorrectly declared malloc
student@localhost ~/acslbyex/07/01 $ frama-c -jessie x.c [kernel] preprocessing with "i686-pc-linux-gnu-gcc -C -E -I. -dD x.c" x.c:18:[kernel] warning: Calling undeclared function malloc. Old style K&R code? [jessie] Starting Jessie translation x.c:16:[kernel] warning: Neither code nor specification for function malloc, generating default assigns from the prototype [kernel] Current source was: x.c:18 The full backtrace is: Called from file "src/kernel/ast_info.ml", line 394, characters 19-43 Called from file "interp.ml", line 1816, characters 22-50 Called from file "interp.ml", line 1953, characters 17-30 Called from file "list.ml", line 62, characters 22-25 Called from file "interp.ml", line 2119, characters 36-66 Called from file "interp.ml", line 2568, characters 40-71 Called from file "list.ml", line 62, characters 22-25 Called from file "interp.ml", line 2701, characters 27-66 Called from file "register.ml", line 176, characters 16-32 Called from file "register.ml", line 327, characters 6-12 Called from file "queue.ml", line 134, characters 6-20 Called from file "src/kernel/boot.ml", line 37, characters 4-20 Called from file "src/kernel/cmdline.ml", line 735, characters 2-9 Called from file "src/kernel/cmdline.ml", line 214, characters 4-8 Unexpected error (File "src/kernel/ast_info.ml", line 391, characters 11-17: Assertion failed). Please report as 'crash' at http://bts.frama-c.com/. Your Frama-C version is Neon-20140301. 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
No tags attached.
c x.c (449) 2014-08-24 09:33
https://bts.frama-c.com/file_download.php?file_id=818&type=bug
? frama-c-journal.ml (1,501) 2014-08-24 09:35
https://bts.frama-c.com/file_download.php?file_id=819&type=bug
Issue History
2014-08-24 09:33kornevgenNew Issue
2014-08-24 09:33kornevgenFile Added: x.c
2014-08-24 09:35kornevgenFile Added: frama-c-journal.ml
2014-08-26 14:41yakobowskiNote Added: 0005413
2014-08-26 14:42yakobowskiCategoryKernel => Plug-in > jessie
2014-08-26 14:42yakobowskiSummaryFrama-C crashes => Jessie crashes on incorrectly declared malloc
2014-08-26 14:42yakobowskiAssigned To => cmarche
2014-08-26 14:42yakobowskiStatusnew => assigned

Notes
(0005413)
yakobowski   
2014-08-26 14:41   
The problem stems from the absence of declaration in malloc. Adding 'void * malloc(unsigned long size);' fixes the crash.