Koike Kazuhiko
kazhi****@mozil*****
2003年 8月 3日 (日) 20:14:27 JST
On 08/03/2003 06:10 PM, Chisato Yamauchi wrote: > 一応,修正前の *current, max, pCache のアドレスの値を上の > if 文の前後でダンプして,様子を見せていただけませんか? 以下の通りです。 ************************ fprintf(stderr, "[1] *current: %x; max: %x; pCache: %x\n", *current, max, pCache); pCache = &cacheRoot[(*current)++]; if(*current >= max) { *current = 0; } fprintf(stderr, "[2] *current: %x; max: %x; pCache: %x\n", *current, max, pCache); ************************ [2] *current: 1; max: 8; pCache: 8ab23e0 [1] *current: 0; max: 5; pCache: 8bfea70 [2] *current: 1; max: 5; pCache: 8bfe958 [1] *current: 0; max: 5; pCache: 8d191b0 [2] *current: 1; max: 5; pCache: 8d19098 [1] *current: 0; max: 4; pCache: 8d31820 [2] *current: 1; max: 4; pCache: 8d31740 [1] *current: 0; max: 8; pCache: 8ab25a0 [2] *current: 1; max: 8; pCache: 8ab23e0 [1] *current: 1; max: 8; pCache: 8ab25a0 [2] *current: 2; max: 8; pCache: 8ab2418 [1] *current: 0; max: 6; pCache: 8d5af98 [2] *current: 1; max: 6; pCache: 8d5ae48 [1] *current: 1; max: 6; pCache: 8d5af98 [2] *current: 2; max: 6; pCache: 8d5ae80 [1] *current: 0; max: 6; pCache: 8d341c8 [2] *current: 1; max: 6; pCache: 8d34078 [1] *current: 2; max: 6; pCache: 8d5af98 [2] *current: 3; max: 6; pCache: 8d5aeb8 [1] *current: 0; max: 9; pCache: 8d1fb78 [2] *current: 1; max: 9; pCache: 8d1f980 [1] *current: 0; max: 0; pCache: 0 [2] *current: 0; max: 0; pCache: 0 ************************ pCacheのセットをif文の後ろにしてもクラッシュします。"*current = 0"の文を 削除してもクラッシュします。 コードをちゃんと理解しないとデバッグできそうにありませんね。この関数は何 をしようとしてるんでしょうか。 -- 小池和彦@もじら組 http://www.mozilla.gr.jp/~kazhik/