Changeset 28c35e2


Ignore:
Timestamp:
Dec 17, 2020, 10:47:41 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
39d22ef
Parents:
852ae0ea
Message:

Fixed startup to use proper protections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel/startup.cfa

    r852ae0ea r28c35e2  
    118118
    119119extern size_t __page_size;
     120extern int __map_prot;
    120121
    121122//-----------------------------------------------------------------------------
     
    727728                __cfaabi_dbg_debug_do(
    728729                        // pthread has no mechanism to create the guard page in user supplied stack.
    729                         if ( mprotect( stack, __page_size, PROT_READ | PROT_WRITE ) == -1 ) {
     730                        if ( mprotect( stack, __page_size, __map_prot ) == -1 ) {
    730731                                abort( "mprotect : internal error, mprotect failure, error(%d) %s.", errno, strerror( errno ) );
    731732                        } // if
Note: See TracChangeset for help on using the changeset viewer.