Changeset dd734d46 in rtems


Ignore:
Timestamp:
Sep 11, 2020, 1:43:23 PM (3 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5959b1e
Parents:
e563e61
git-author:
Sebastian Huber <sebastian.huber@…> (09/11/20 13:43:23)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/11/20 13:47:02)
Message:

score: Fix _Thread_Initialize()

Fix an error cleanup path in SMP configurations to avoid a NULL pointer access.

Update #3959.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadinitialize.c

    re563e61 rdd734d46  
    6161
    6262  /* Set everything to perform the error case clean up */
    63   scheduler_index = 0;
    6463  the_thread->Start.stack_free = config->stack_free;
    6564
     
    154153  scheduler_node_for_index = the_thread->Scheduler.nodes;
    155154  scheduler_for_index = &_Scheduler_Table[ 0 ];
     155  scheduler_index = 0;
    156156
    157157  while ( scheduler_index < _Scheduler_Count ) {
     
    256256    return true;
    257257
    258 #if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
    259 failed:
    260 #endif
    261 
    262258#if defined(RTEMS_SMP)
    263259  while ( scheduler_index > 0 ) {
     
    278274    the_thread->Wait.spare_heads
    279275  );
     276
     277#if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
     278failed:
     279#endif
     280
    280281  ( *the_thread->Start.stack_free )( the_thread->Start.Initial_stack.area );
    281282  return false;
Note: See TracChangeset for help on using the changeset viewer.