[kernel] Parsing allocated.c (with preprocessing) [eva] Analyzing a complete application starting at main [eva] Computing initial state [eva] Initial state computed [eva:initial-state] Values of globals at initialization nondet ∈ [--..--] [eva] allocated.c:25: Call to builtin malloc [eva] allocated.c:25: allocating variable __malloc_main_l25 [eva] allocated.c:25: assertion got status valid. [eva:alarm] allocated.c:27: Warning: out of bounds read. assert \valid_read(p + 1); [eva:alarm] allocated.c:28: Warning: out of bounds read. assert \valid_read(p + 2); [eva] allocated.c:29: Frama_C_show_each_p: {{ &__malloc_main_l25 }} [eva] allocated.c:30: Frama_C_show_each_p0: {18} [eva] allocated.c:31: Call to builtin free [eva] allocated.c:31: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:31: strong free on bases: {__malloc_main_l25} [eva] allocated.c:32: Frama_C_show_each_p_after_free: ⊥ [eva] allocated.c:36: Call to builtin malloc [eva] allocated.c:36: allocating variable __malloc_main_l36 [eva] allocated.c:36: assertion got status valid. [eva] allocated.c:40: Frama_C_show_each_p: {{ &__malloc_main_l36 }} [eva] allocated.c:41: Frama_C_show_each_p0: {13} [eva] allocated.c:42: Frama_C_show_each_p1: {54} [eva] allocated.c:43: Call to builtin free [eva] allocated.c:43: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:43: strong free on bases: {__malloc_main_l36} [eva:alarm] allocated.c:44: Warning: accessing left-value that contains escaping addresses. assert ¬\dangling(&p); [eva] allocated.c:45: Call to builtin free [eva] allocated.c:45: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:45: strong free on bases: {__malloc_main_l36} [eva:alarm] allocated.c:46: Warning: accessing left-value that contains escaping addresses. assert ¬\dangling(&p); [kernel] allocated.c:46: Warning: all target addresses were invalid. This path is assumed to be dead. [eva] allocated.c:50: Call to builtin malloc [eva] allocated.c:50: allocating variable __malloc_main_l50 [eva] allocated.c:50: assertion got status valid. [eva:alarm] allocated.c:53: Warning: out of bounds write. assert \valid(p + 2); [eva] allocated.c:54: Frama_C_show_each_p: {{ &__malloc_main_l50 }} [eva] allocated.c:55: Frama_C_show_each_p0: {13} [eva] allocated.c:56: Frama_C_show_each_p1: {42} [eva] allocated.c:57: Frama_C_show_each_p2: {77} [eva] allocated.c:58: Call to builtin free [eva] allocated.c:58: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:58: strong free on bases: {__malloc_main_l50} [eva] allocated.c:63: Call to builtin malloc [eva] allocated.c:63: allocating variable __malloc_main_l63 [eva] allocated.c:63: assertion got status valid. [eva] allocated.c:65: Frama_C_show_each_p: {{ &__malloc_main_l63 }} [eva] allocated.c:66: Frama_C_show_each_p0: {0} [eva] allocated.c:67: Call to builtin free [eva] allocated.c:67: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:67: strong free on bases: {__malloc_main_l63} [eva] allocated.c:63: Call to builtin malloc [eva] allocated.c:65: Frama_C_show_each_p: {{ &__malloc_main_l63 }} [eva] allocated.c:66: Frama_C_show_each_p0: {1} [eva] allocated.c:67: Call to builtin free [eva:malloc] allocated.c:67: strong free on bases: {__malloc_main_l63} [eva] allocated.c:63: Call to builtin malloc [eva] allocated.c:65: Frama_C_show_each_p: {{ &__malloc_main_l63 }} [eva] allocated.c:66: Frama_C_show_each_p0: {2} [eva] allocated.c:67: Call to builtin free [eva:malloc] allocated.c:67: strong free on bases: {__malloc_main_l63} [eva] allocated.c:63: Call to builtin malloc [eva] allocated.c:65: Frama_C_show_each_p: {{ &__malloc_main_l63 }} [eva] allocated.c:66: Frama_C_show_each_p0: {3} [eva] allocated.c:67: Call to builtin free [eva:malloc] allocated.c:67: strong free on bases: {__malloc_main_l63} [eva] allocated.c:73: Call to builtin malloc [eva] allocated.c:73: allocating variable __malloc_main_l73 [eva] allocated.c:75: Frama_C_show_each_p: {{ &__malloc_main_l73 }} [eva] allocated.c:76: Frama_C_show_each_p0: {0} [eva] allocated.c:77: Call to builtin free [eva] allocated.c:77: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:77: strong free on bases: {__malloc_main_l73} [eva] allocated.c:73: Call to builtin malloc [eva] allocated.c:75: Frama_C_show_each_p: {{ &__malloc_main_l73 }} [eva] allocated.c:76: Frama_C_show_each_p0: {1} [eva] allocated.c:77: Call to builtin free [eva:malloc] allocated.c:77: strong free on bases: {__malloc_main_l73} [eva] allocated.c:72: starting to merge loop iterations [eva] allocated.c:73: Call to builtin malloc [eva] allocated.c:75: Frama_C_show_each_p: {{ &__malloc_main_l73 }} [eva] allocated.c:76: Frama_C_show_each_p0: {1; 2} [eva] allocated.c:77: Call to builtin free [eva:malloc] allocated.c:77: strong free on bases: {__malloc_main_l73} [eva] allocated.c:73: Call to builtin malloc [eva] allocated.c:75: Frama_C_show_each_p: {{ &__malloc_main_l73 }} [eva] allocated.c:76: Frama_C_show_each_p0: {1; 2; 3} [eva] allocated.c:77: Call to builtin free [eva:malloc] allocated.c:77: strong free on bases: {__malloc_main_l73} [eva] allocated.c:82: Call to builtin malloc [eva] allocated.c:82: allocating variable __malloc_main_l82 [eva] allocated.c:82: assertion got status valid. [eva] allocated.c:87: Call to builtin free [eva] allocated.c:87: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:87: strong free on bases: {__malloc_main_l82} [eva] allocated.c:82: Call to builtin malloc [eva:malloc:weak] allocated.c:82: marking variable `__malloc_main_l82' as weak [eva:malloc] allocated.c:82: resizing variable `__malloc_w_main_l82' (0..-1) to fit 0..31 [eva:alarm] allocated.c:85: Warning: out of bounds write. assert \valid(p + j); [eva] allocated.c:84: starting to merge loop iterations [eva] allocated.c:87: Call to builtin free [eva:malloc] allocated.c:87: weak free on bases: {__malloc_w_main_l82} [eva] allocated.c:81: starting to merge loop iterations [eva] allocated.c:82: Call to builtin malloc [eva:malloc] allocated.c:82: resizing variable `__malloc_w_main_l82' (0..-1/31) to fit 0..31/63 [eva] allocated.c:87: Call to builtin free [eva:malloc] allocated.c:87: weak free on bases: {__malloc_w_main_l82} [eva] allocated.c:82: Call to builtin malloc [eva:malloc] allocated.c:82: resizing variable `__malloc_w_main_l82' (0..-1/63) to fit 0..31/95 [eva] allocated.c:87: Call to builtin free [eva:malloc] allocated.c:87: weak free on bases: {__malloc_w_main_l82} [eva] allocated.c:82: Call to builtin malloc [eva:malloc] allocated.c:82: resizing variable `__malloc_w_main_l82' (0..-1/95) to fit 0..31/95 [eva] allocated.c:91: Call to builtin malloc [eva] allocated.c:91: allocating variable __malloc_main_l91 [eva] allocated.c:91: assertion got status valid. [eva] allocated.c:92: Call to builtin free [eva] allocated.c:92: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:92: strong free on bases: {__malloc_main_l91} [eva:alarm] allocated.c:96: Warning: assertion 'Assume' got status unknown. [eva] allocated.c:97: Call to builtin malloc [eva] allocated.c:97: allocating variable __malloc_main_l97 [eva] allocated.c:97: Frama_C_show_each: {{ &__malloc_main_l97 }} [eva:alarm] allocated.c:98: Warning: out of bounds write. assert \valid(p); [eva] allocated.c:110: Frama_C_show_each: {0} [eva] allocated.c:111: Call to builtin free [eva] allocated.c:111: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:111: strong free on bases: {__malloc_main_l97} [eva:alarm] allocated.c:113: Warning: assertion got status unknown. [eva] allocated.c:114: Call to builtin malloc [eva] allocated.c:114: allocating variable __malloc_main_l114 [eva] allocated.c:114: Frama_C_show_each: {{ &__malloc_main_l114 }} [eva:alarm] allocated.c:115: Warning: out of bounds write. assert \valid(p); [eva] allocated.c:117: Frama_C_show_each: {0} [eva] allocated.c:118: Call to builtin free [eva] allocated.c:118: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:118: strong free on bases: {__malloc_main_l114} [eva] allocated.c:120: Call to builtin malloc [eva] allocated.c:120: allocating variable __malloc_main_l120 [eva] allocated.c:120: Frama_C_show_each: {{ &__malloc_main_l120 }} [eva] allocated.c:123: Frama_C_show_each: ⊥ [eva] allocated.c:125: Call to builtin free [eva] allocated.c:125: function free: precondition 'freeable' got status valid. [eva:malloc] allocated.c:125: strong free on bases: {__malloc_main_l120} [eva] allocated.c:127: assertion 'alloca_bounds' got status valid. [eva] allocated.c:127: Call to builtin __fc_vla_alloc [eva] allocated.c:127: allocating variable __malloc_main_l127 [eva] allocated.c:131: Frama_C_show_each: {0} [eva] allocated.c:127: Call to builtin __fc_vla_free [eva:malloc] allocated.c:127: strong free on bases: {__malloc_main_l127} [eva] allocated.c:127: Call to builtin __fc_vla_alloc [eva:malloc] allocated.c:127: resizing variable `__malloc_main_l127' (0..31) to fit 0..63 [eva] allocated.c:128: starting to merge loop iterations [eva:alarm] allocated.c:129: Warning: out of bounds write. assert \valid(a + j); [eva] allocated.c:131: Frama_C_show_each: {0; 1} [eva] allocated.c:127: Call to builtin __fc_vla_free [eva:malloc] allocated.c:127: strong free on bases: {__malloc_main_l127} [eva] allocated.c:126: starting to merge loop iterations [eva] allocated.c:127: Call to builtin __fc_vla_alloc [eva:malloc] allocated.c:127: resizing variable `__malloc_main_l127' (0..31/63) to fit 0..63/95 [eva] allocated.c:131: Frama_C_show_each: {0; 1; 2} [eva] allocated.c:127: Call to builtin __fc_vla_free [eva:malloc] allocated.c:127: strong free on bases: {__malloc_main_l127} [eva] allocated.c:127: Call to builtin __fc_vla_alloc [eva:malloc] allocated.c:127: resizing variable `__malloc_main_l127' (0..31/95) to fit 0..63/127 [eva] allocated.c:131: Frama_C_show_each: [0..2147483647] [eva] allocated.c:127: Call to builtin __fc_vla_free [eva:malloc] allocated.c:127: strong free on bases: {__malloc_main_l127} [eva] allocated.c:127: Call to builtin __fc_vla_alloc [eva:malloc] allocated.c:127: resizing variable `__malloc_main_l127' (0..31/127) to fit 0..63/159 [eva] allocated.c:131: Frama_C_show_each: [0..2147483647] [eva] allocated.c:127: Call to builtin __fc_vla_free [eva:malloc] allocated.c:127: strong free on bases: {__malloc_main_l127} [eva] allocated.c:127: Call to builtin __fc_vla_alloc [eva:malloc] allocated.c:127: resizing variable `__malloc_main_l127' (0..31/159) to fit 0..63/191 [eva] allocated.c:131: Frama_C_show_each: [0..2147483647] [eva] allocated.c:127: Call to builtin __fc_vla_free [eva:malloc] allocated.c:127: strong free on bases: {__malloc_main_l127} [eva] allocated.c:127: Call to builtin __fc_vla_alloc [eva:malloc] allocated.c:127: resizing variable `__malloc_main_l127' (0..31/191) to fit 0..63/319 [eva] allocated.c:131: Frama_C_show_each: [0..2147483647] [eva] allocated.c:127: Call to builtin __fc_vla_free [eva:malloc] allocated.c:127: strong free on bases: {__malloc_main_l127} [eva] Recording results for main [eva] done for function main [eva] allocated.c:27: assertion 'Eva,mem_access' got final status invalid. [eva] allocated.c:28: assertion 'Eva,mem_access' got final status invalid. [eva] allocated.c:46: assertion 'Eva,dangling_pointer' got final status invalid. [eva] ====== VALUES COMPUTED ====== [eva:final-states] Values at end of function main: __fc_heap_status ∈ [--..--] i ∈ {10} j ∈ [1..2147483647] p ∈ ESCAPINGADDR k ∈ {8; 12} size ∈ [1..100] pb ∈ ESCAPINGADDR __retres ∈ {0} __malloc_w_main_l82[0..1] ∈ [7..2147483647] or UNINITIALIZED [2] ∈ [7..27] or UNINITIALIZED [from] Computing for function main [from] Computing for function malloc <-main [from] Done for function malloc [from] Computing for function free <-main [from] Done for function free [from] Computing for function __fc_vla_alloc <-main [from] Done for function __fc_vla_alloc [from] Computing for function __fc_vla_free <-main [from] Done for function __fc_vla_free [from] Done for function main [from] ====== DEPENDENCIES COMPUTED ====== These dependencies hold at termination for the executions that terminate: [from] Function __fc_vla_alloc: \result FROM \nothing [from] Function __fc_vla_free: NO EFFECTS [from] Function free: __fc_heap_status FROM __fc_heap_status (and SELF) [from] Function malloc: __fc_heap_status FROM __fc_heap_status; size (and SELF) \result FROM __fc_heap_status; size [from] Function main: __fc_heap_status FROM __fc_heap_status; nondet (and SELF) __malloc_main_l25 FROM __fc_heap_status __malloc_main_l36[0..1] FROM __fc_heap_status; nondet __malloc_main_l50[0..2] FROM __fc_heap_status; nondet __malloc_main_l63 FROM __fc_heap_status; nondet (and SELF) __malloc_main_l73 FROM __fc_heap_status; nondet (and SELF) __malloc_w_main_l82[0..2] FROM __fc_heap_status; nondet (and SELF) __malloc_main_l97[0] FROM __fc_heap_status; nondet __malloc_main_l114[0..3] FROM __fc_heap_status; nondet __malloc_main_l127[0..9] FROM \nothing (and SELF) \result FROM \nothing [from] ====== END OF DEPENDENCIES ====== [inout] Out (internal) for function main: __fc_heap_status; i; j; p; tmp; tmp_3; k; tmp_0; size; pb; a; __lengthof_a; __retres; __malloc_main_l25; __malloc_main_l36[0..1]; __malloc_main_l50[0..2]; __malloc_main_l63; __malloc_main_l73; __malloc_w_main_l82[0..2]; __malloc_main_l97[0]; __malloc_main_l114[0..3]; __malloc_main_l127[0..9] [inout] Inputs for function main: __fc_heap_status; nondet; __malloc_main_l25; __malloc_main_l36[0..1]; __malloc_main_l50[0..2]; __malloc_main_l63; __malloc_main_l73; __malloc_main_l97[0][bits 0 to 0]; __malloc_main_l114[0][bits 0 to 0]; __malloc_main_l127[0..9]