boinc/lib/mac/QMachOImage.c
// By changing this variable to false you can disable the short circuit that 
// we apply when targetting the local task.
//
// This is exported for the benefit of the unit test.
By changing this variable to false you can disable the short circuit that
we apply when targetting the local task.

This is exported for the benefit of the unit test.
By changing this variable to false you can disable the short circuit that we apply when targetting the local task . This is exported for the benefit of the unit test .
extern int QMOImageCreateFromTask(
    task_t          task, 
    QTMAddr         machHeader, 
    const char *    filePath,
    QMOImageRef *   qmoImagePtr
)
{
    int     err;
    assert(task != MACH_PORT_NULL);
    assert( qmoImagePtr != NULL);
    assert(*qmoImagePtr == NULL);
    if ( (task == mach_task_self()) && kQMachOImageTestSelfShortCircuit ) {
        err = QMOImageCreateFromLocalImage( (const struct mach_header *) (uintptr_t) machHeader, filePath, qmoImagePtr);
    } else {
        err = QMOImageCreate(machHeader, filePath, true, QMOTaskImageMapRange, QMOTaskImageUnmapRange, NULL, NULL, (void *) (uintptr_t) task, qmoImagePtr);
    }
	assert( (err == 0) == QMOImageIsValid(*qmoImagePtr) );
    return err;
}
extern int QMOImageCreateFromTask ( task_t task , QTMAddr machHeader , const char * filePath , QMOImageRef * qmoImagePtr ) { int err ; assert ( task != MACH_PORT_NULL ) ; assert ( qmoImagePtr != NULL ) ; assert ( * qmoImagePtr == NULL ) ; if ( ( task == mach_task_self ( ) ) && kQMachOImageTestSelfShortCircuit ) { err = QMOImageCreateFromLocalImage ( ( const struct mach_header * ) ( uintptr_t ) machHeader , filePath , qmoImagePtr ) ; } else { err = QMOImageCreate ( machHeader , filePath , true , QMOTaskImageMapRange , QMOTaskImageUnmapRange , NULL , NULL , ( void * ) ( uintptr_t ) task , qmoImagePtr ) ; } assert ( ( err == 0 ) == QMOImageIsValid ( * qmoImagePtr ) ) ; return err ; }
By changing this variable to false you can disable the short circuit that
we apply when targetting the local task.
By changing this variable to false you can disable the short circuit that we apply when targetting the local task .
// See comment in header. // machHeader could potentially be at zero // filePath may be NULL