let block_top_addresses_of_locals blocks =
    if List.for_all (fun b -> List.for_all (fun v -> v.vgenerated) b.blocals)
      blocks
    then
      fun x -> x (* no need to change the state if there is no local
                    variable or if all the variable have been generated
                    by Cil (in which case we know that they are correctly
                    initialized and used, don't we)
                 *)

    else
      let offsetmap_top_addresses_of_locals =
        offsetmap_top_addresses_of_locals
          (fun v -> List.exists (Base.is_block_local v) blocks)
      in
      let state_top_addresses_of_locals =
        state_top_addresses_of_locals ~is_block:true
          offsetmap_top_addresses_of_locals
          (Kernel_function.get_definition (current_kf()))
      in
      state_top_addresses_of_locals