|
From: <sv...@va...> - 2011-02-04 19:55:33
|
Author: weidendo
Date: 2011-02-04 19:55:25 +0000 (Fri, 04 Feb 2011)
New Revision: 11523
Log:
Better failed assertion then silent data corruption
This is part 1 of the fix to bug 246152, and makes the bug
reproducable as failed assertion also on Ubuntu 10.10 on 64bit
machines. However, the test needs to be compiled 32bit (-m32).
Modified:
trunk/callgrind/jumps.c
Modified: trunk/callgrind/jumps.c
===================================================================
--- trunk/callgrind/jumps.c 2011-02-04 19:07:11 UTC (rev 11522)
+++ trunk/callgrind/jumps.c 2011-02-04 19:55:25 UTC (rev 11523)
@@ -160,6 +160,8 @@
* This list is only used at dumping time */
if (from) {
+ /* Prohibit corruption by array overrun */
+ CLG_ASSERT((0 <= jmp) && (jmp <= from->bb->cjmp_count));
jcc->next_from = from->jmp[jmp].jcc_list;
from->jmp[jmp].jcc_list = jcc;
}
|