@@ -86,7 +86,7 @@ void zend_shared_alloc_create_lock(char *lockfile_path)
86
86
fchmod (lock_file , 0666 );
87
87
88
88
if (lock_file == -1 ) {
89
- zend_accel_error (ACCEL_LOG_FATAL , "Unable to create lock file: %s (%d)" , strerror (errno ), errno );
89
+ zend_accel_error_noreturn (ACCEL_LOG_FATAL , "Unable to create lock file: %s (%d)" , strerror (errno ), errno );
90
90
}
91
91
val = fcntl (lock_file , F_GETFD , 0 );
92
92
val |= FD_CLOEXEC ;
@@ -98,7 +98,7 @@ void zend_shared_alloc_create_lock(char *lockfile_path)
98
98
99
99
static void no_memory_bailout (size_t allocate_size , char * error )
100
100
{
101
- zend_accel_error (ACCEL_LOG_FATAL , "Unable to allocate shared memory segment of %zu bytes: %s: %s (%d)" , allocate_size , error ?error :"unknown" , strerror (errno ), errno );
101
+ zend_accel_error_noreturn (ACCEL_LOG_FATAL , "Unable to allocate shared memory segment of %zu bytes: %s: %s (%d)" , allocate_size , error ?error :"unknown" , strerror (errno ), errno );
102
102
}
103
103
104
104
static void copy_shared_segments (void * to , void * from , int count , int size )
@@ -231,14 +231,14 @@ int zend_shared_alloc_startup(size_t requested_size, size_t reserved_size)
231
231
232
232
p_tmp_shared_globals = (zend_smm_shared_globals * ) zend_shared_alloc (sizeof (zend_smm_shared_globals ));
233
233
if (!p_tmp_shared_globals ) {
234
- zend_accel_error (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
234
+ zend_accel_error_noreturn (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
235
235
return ALLOC_FAILURE ;
236
236
}
237
237
memset (p_tmp_shared_globals , 0 , sizeof (zend_smm_shared_globals ));
238
238
239
239
tmp_shared_segments = zend_shared_alloc (shared_segments_array_size + ZSMMG (shared_segments_count ) * sizeof (void * ));
240
240
if (!tmp_shared_segments ) {
241
- zend_accel_error (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
241
+ zend_accel_error_noreturn (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
242
242
return ALLOC_FAILURE ;
243
243
}
244
244
@@ -252,7 +252,7 @@ int zend_shared_alloc_startup(size_t requested_size, size_t reserved_size)
252
252
253
253
ZSMMG (shared_memory_state ).positions = (int * )zend_shared_alloc (sizeof (int ) * ZSMMG (shared_segments_count ));
254
254
if (!ZSMMG (shared_memory_state ).positions ) {
255
- zend_accel_error (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
255
+ zend_accel_error_noreturn (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
256
256
return ALLOC_FAILURE ;
257
257
}
258
258
@@ -263,7 +263,7 @@ int zend_shared_alloc_startup(size_t requested_size, size_t reserved_size)
263
263
ZSMMG (reserved ) = (char * )ZSMMG (shared_segments )[i ]-> p + ZSMMG (shared_segments )[i ]-> end ;
264
264
ZSMMG (reserved_size ) = reserved_size ;
265
265
} else {
266
- zend_accel_error (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
266
+ zend_accel_error_noreturn (ACCEL_LOG_FATAL , "Insufficient shared memory!" );
267
267
return ALLOC_FAILURE ;
268
268
}
269
269
}
@@ -340,7 +340,7 @@ void *zend_shared_alloc(size_t size)
340
340
341
341
#if 1
342
342
if (!ZCG (locked )) {
343
- zend_accel_error (ACCEL_LOG_ERROR , "Shared memory lock not obtained" );
343
+ zend_accel_error_noreturn (ACCEL_LOG_ERROR , "Shared memory lock not obtained" );
344
344
}
345
345
#endif
346
346
if (block_size > ZSMMG (shared_free )) { /* No hope to find a big-enough block */
@@ -482,7 +482,7 @@ void zend_shared_alloc_lock(void)
482
482
if (errno == EINTR ) {
483
483
continue ;
484
484
}
485
- zend_accel_error (ACCEL_LOG_ERROR , "Cannot create lock - %s (%d)" , strerror (errno ), errno );
485
+ zend_accel_error_noreturn (ACCEL_LOG_ERROR , "Cannot create lock - %s (%d)" , strerror (errno ), errno );
486
486
}
487
487
break ;
488
488
}
@@ -508,7 +508,7 @@ void zend_shared_alloc_unlock(void)
508
508
509
509
#ifndef ZEND_WIN32
510
510
if (fcntl (lock_file , F_SETLK , & mem_write_unlock ) == -1 ) {
511
- zend_accel_error (ACCEL_LOG_ERROR , "Cannot remove lock - %s (%d)" , strerror (errno ), errno );
511
+ zend_accel_error_noreturn (ACCEL_LOG_ERROR , "Cannot remove lock - %s (%d)" , strerror (errno ), errno );
512
512
}
513
513
#ifdef ZTS
514
514
tsrm_mutex_unlock (zts_lock );
@@ -631,7 +631,7 @@ void zend_accel_shared_protect(int mode)
631
631
for (i = 0 ; i < ZSMMG (shared_segments_count ); i ++ ) {
632
632
DWORD oldProtect ;
633
633
if (!VirtualProtect (ZSMMG (shared_segments )[i ]-> p , ZSMMG (shared_segments )[i ]-> end , mode , & oldProtect )) {
634
- zend_accel_error (ACCEL_LOG_ERROR , "Failed to protect memory" );
634
+ zend_accel_error_noreturn (ACCEL_LOG_ERROR , "Failed to protect memory" );
635
635
}
636
636
}
637
637
#endif
0 commit comments