Bug #506
closedException in BLAST: "sanity check: mem_temp recycled?"
0%
Description
Blast fails with exception on the orginal driver drivers/net/wireless/wl12xx/wl12xx.ko
The corresponding code fragments which cause exceptions of that kind are shown below.
If line in items 1-3 are commented, then the result is unsafe, and Exception otherwise.
Command line:
LDV_DEBUG=100 BLAST_EXP_NOALIAS=1 RCV_TIMELIMIT=900 RCV_MEMLIMIT=1800000 BLAST_SOLVER=yices BLAST_OPTIONS="-devdebug" ldv-manager tag=current envs=linux-2.6.31.6.tar.bz2 drivers=wl12xx.ko.tar.bz2 "rule_models=32_7"
Extracted driver with commented line is attached.
1. ZZZ: Exception: Failure("sanity check: mem_temp recycled? ((mem_conf@wl1251_mem_cfg).header).len")
in wl1251.c
static int wl1251_mem_cfg(struct wl12xx *wl) //mem_conf.header.len -= // (MAX_TX_QUEUE_CONFIGS - mem_conf.mem_config.num_tx_queues) * // sizeof(struct wl1251_acx_tx_queue_config);
2. ZZZ: Exception: Failure(""sanity check: mem_temp recycled? mem_size@wl12xx_set_partition")
in spi.c
void wl12xx_set_partition(struct wl12xx *wl, u32 mem_start, u32 mem_size, u32 reg_start, u32 reg_size) ... //mem_size = HW_ACCESS_MEMORY_MAX_RANGE - reg_size;
3. ZZZ: Exception: Failure("sanity check: mem_temp recycled? mem_blocks@wl12xx_tx_frag_block_num")
in tx.c
static void wl12xx_tx_frag_block_num(struct tx_double_buffer_desc *tx_hdr) ... //mem_blocks_per_frag = // ((frag_threshold + MAX_MPDU_HEADER_AND_SECURITY) / // HW_BLOCK_SIZE) + 1; //mem_blocks = num_mpdus * mem_blocks_per_frag; ... //mem_blocks += (payload_len / HW_BLOCK_SIZE) + 1; //if (num_mpdus > 1) //mem_blocks += min(num_mpdus, mem_blocks_per_frag);
Files
Updated by Pavel Shved about 14 years ago
The thing is that CIL unrolls certain kinds of expressions (for example, nested dereferences of structs and function calls as subexpressions) into assignment like this:
mem_1 = call_function(); if (mem_1 < 10) ...
So all mem_
variables are treated as internal. So BLAST's sanity checks for them fail.
Perhaps, we should use a less common name for that...
Updated by Pavel Shved about 14 years ago
- Category set to Infrastructure
- Status changed from New to Open
- Assignee set to Pavel Shved
- Add problem to the problem_db that describes the situation
- Use less common prefix—such as
cil_temp_var_
—instead ofmem
.
Updated by Alexey Khoroshilov almost 14 years ago
- Priority changed from Normal to High
It is easy enough to fix.
Updated by Pavel Shved over 13 years ago
- Priority changed from High to Normal
"Easy" fixes tend to turn out uneasy to recover from bugs they introduce...
Updated by Pavel Shved over 13 years ago
- Due date set to 08/10/2011
- Priority changed from Normal to Low
Going to replace mem_
with cil_
. Just scanned the whole kernel if it contains such a string in its sources.
If you have a better idea for the prefix, please, make a comment here!
Updated by Pavel Shved over 13 years ago
- Status changed from Open to Resolved
Fixed in d8a9b64. The prefix is now "cil_".
Updated by Pavel Shved about 13 years ago
- Status changed from Resolved to Closed