Changeset 66298de


Ignore:
Timestamp:
Oct 10, 2017, 12:11:40 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
1588ffb, ca278c1
Parents:
e9e4e576
Message:

Fixed uninitialized memory bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor.c

    re9e4e576 r66298de  
    409409        short thread_count = 0;
    410410        thread_desc * threads[ count ];
    411         for(int i = 0; i < count; i++) {
    412                 threads[i] = 0;
    413         }
     411        __builtin_memset( threads, 0, sizeof( threads ) );
    414412
    415413        // Save monitor states
     
    535533        short max = count_max( mask );
    536534        monitor_desc * mon_storage[max];
     535        __builtin_memset( mon_storage, 0, sizeof( mon_storage ) );
    537536        short actual_count = aggregate( mon_storage, mask );
     537
     538        LIB_DEBUG_PRINT_SAFE("Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (short)max);
    538539
    539540        if(actual_count == 0) return;
Note: See TracChangeset for help on using the changeset viewer.