Changeset 66fedb46 in rtems
- Timestamp:
- 11/28/00 21:47:39 (23 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- e23afc3
- Parents:
- 11edb53
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/ChangeLog
r11edb53 r66fedb46 1 2 2000-11-28 Chris Johns <ccj@acm.org> 3 4 * src/heapallocate.c: Do not allow the size to overflow when 5 adjusting it. A test allocated a stack of -1 (~0). This 6 actually resulted in a stack being allocated but with a 7 size of 0xb. The allocator did not test the size to see if 8 it rolled through 0 and so allowed the allocation to happen, the 9 thread to get created. The task crashed as you would expect. 1 10 2 11 2000-11-02 Joel Sherrill <joel@OARcorp.com> -
c/src/exec/score/src/heapallocate.c
r11edb53 r66fedb46 44 44 void *ptr; 45 45 unsigned32 offset; 46 46 47 /* 48 * Catch the case of a user allocating close to the limit of the 49 * unsigned32. 50 */ 51 52 if ( size >= (-1 - HEAP_BLOCK_USED_OVERHEAD) ) 53 return( NULL ); 54 47 55 excess = size % the_heap->page_size; 48 56 the_size = size + the_heap->page_size + HEAP_BLOCK_USED_OVERHEAD; -
cpukit/score/ChangeLog
r11edb53 r66fedb46 1 2 2000-11-28 Chris Johns <ccj@acm.org> 3 4 * src/heapallocate.c: Do not allow the size to overflow when 5 adjusting it. A test allocated a stack of -1 (~0). This 6 actually resulted in a stack being allocated but with a 7 size of 0xb. The allocator did not test the size to see if 8 it rolled through 0 and so allowed the allocation to happen, the 9 thread to get created. The task crashed as you would expect. 1 10 2 11 2000-11-02 Joel Sherrill <joel@OARcorp.com> -
cpukit/score/src/heapallocate.c
r11edb53 r66fedb46 44 44 void *ptr; 45 45 unsigned32 offset; 46 46 47 /* 48 * Catch the case of a user allocating close to the limit of the 49 * unsigned32. 50 */ 51 52 if ( size >= (-1 - HEAP_BLOCK_USED_OVERHEAD) ) 53 return( NULL ); 54 47 55 excess = size % the_heap->page_size; 48 56 the_size = size + the_heap->page_size + HEAP_BLOCK_USED_OVERHEAD;
Note: See TracChangeset
for help on using the changeset viewer.