version 1.293, 2016/03/22 19:03:36
|
version 1.302, 2016/10/11 12:02:46
|
Line 1
|
Line 1
|
#define DEBUG_ERREURS |
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.25 |
RPL/2 (R) version 4.1.26 |
Copyright (C) 1989-2016 Dr. BERTRAND Joël |
Copyright (C) 1989-2016 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 65
|
Line 64
|
# define SA_ONSTACK 0 |
# define SA_ONSTACK 0 |
#endif |
#endif |
|
|
|
#ifdef BROKEN_SIGSEGV |
|
# undef HAVE_STACK_OVERFLOW_RECOVERY |
|
# undef HAVE_SIGSEGV_RECOVERY |
|
#endif |
|
|
#define DEBUG_TRACE uprintf("[%d/%X] %s(%d)\n", \ |
#define DEBUG_TRACE uprintf("[%d/%X] %s(%d)\n", \ |
getpid(), pthread_self(), __FILE__, __LINE__); |
getpid(), pthread_self(), __FILE__, __LINE__); |
#define TEST_ABSENCE_FICHIER(nom) \ |
#define TEST_ABSENCE_FICHIER(nom) \ |
Line 216
|
Line 220
|
# endif |
# endif |
|
|
# include "sqlite3.h" |
# include "sqlite3.h" |
# include "sigsegv.h" |
|
|
# ifndef BROKEN_SIGSEGV |
|
# include "sigsegv.h" |
|
# endif |
|
|
# ifdef OS2 |
# ifdef OS2 |
// Bug de libsigsegv |
// Bug de libsigsegv |
# undef HAVE_STACK_OVERFLOW_RECOVERY |
# undef HAVE_STACK_OVERFLOW_RECOVERY |
Line 273
|
Line 281
|
# define __STATIC_MUTEX_INITIALIZATION__ |
# define __STATIC_MUTEX_INITIALIZATION__ |
#endif |
#endif |
|
|
|
|
/* |
/* |
================================================================================ |
================================================================================ |
Bugs spécifiques |
Bugs spécifiques |
Line 529 union semun
|
Line 538 union semun
|
__EXTERN__ pthread_mutex_t mutex_sem __STATIC_MUTEX_INITIALIZATION__; |
__EXTERN__ pthread_mutex_t mutex_sem __STATIC_MUTEX_INITIALIZATION__; |
|
|
__EXTERN__ volatile int routine_recursive; |
__EXTERN__ volatile int routine_recursive; |
__EXTERN__ volatile sig_atomic_t |
__EXTERN__ volatile int nombre_thread_surveillance_processus; |
nombre_thread_surveillance_processus; |
|
|
|
# define SEM_FORK 0 |
# define SEM_FORK 0 |
# define SEM_QUEUE 1 |
# define SEM_QUEUE 1 |
Line 798 pid_t debug_fork();
|
Line 806 pid_t debug_fork();
|
# else |
# else |
# define __erreur_(i) i |
# define __erreur_(i) i |
# endif |
# endif |
# define __erreur(i) ({ if (strstr(__FUNCTION__, "recherche_variable") \ |
# define __erreur(i) ({ int ios; ios = errno; \ |
== NULL) ufprintf(stderr, \ |
if (strstr(__FUNCTION__, "recherche_variable") \ |
"ERROR %d AT %s() FROM %s LINE %d\n", \ |
== NULL) { if(ios != 0) \ |
i, __FUNCTION__, __FILE__, __LINE__); BACKTRACE(16); i; }) |
ufprintf(stderr, "LAST ERROR: %s\n", strerror(ios)); \ |
|
ufprintf(stderr, "ERROR %d AT %s() FROM %s LINE %d\n", \ |
|
i, __FUNCTION__, __FILE__, __LINE__); BACKTRACE(16); } i; }) |
# endif |
# endif |
#else |
#else |
# define __erreur(i) i |
# define __erreur(i) i |
# define __erreur_(i) i |
# define __erreur_(i) i |
#endif |
#endif |
|
|
|
#ifdef DEBUG_FICHIERS |
|
# define open(a, ...) \ |
|
({ ufprintf(stderr, "[%d] OPEN %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); open(a, __VA_ARGS__); }) |
|
# define pipe(a) \ |
|
({ ufprintf(stderr, "[%d] PIPE %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); pipe(a); }) |
|
# define shm_open(a, ...) \ |
|
({ ufprintf(stderr, "[%d] SHM_OPEN %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); shm_open(a, __VA_ARGS__); }) |
|
# define shm_unlink(a) \ |
|
({ ufprintf(stderr, "[%d] SHM_UNLINK %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); shm_unlink(a); }) |
|
# define sem_open(a, ...) \ |
|
({ ufprintf(stderr, "[%d] SEM_OPEN %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); sem_open(a, __VA_ARGS__); }) |
|
# define sem_unlink(a) \ |
|
({ ufprintf(stderr, "[%d] SEM_UNLINK %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); sem_unlink(a); }) |
|
# define close(a) \ |
|
({ ufprintf(stderr, "[%d] CLOSE %s AT %s() FROM %s LINE %d\n", \ |
|
getpid(), a, \ |
|
__FUNCTION__, __FILE__, __LINE__); close(a); }) |
|
#endif |
|
|
// -1 : erreur provoquée par une bibliothèque externe |
// -1 : erreur provoquée par une bibliothèque externe |
#ifndef RPLARGS |
#ifndef RPLARGS |
Line 3118 void interruption3(int signal);
|
Line 3158 void interruption3(int signal);
|
void interruption4(int signal); |
void interruption4(int signal); |
void interruption5(int signal); |
void interruption5(int signal); |
void interruption6(int signal); |
void interruption6(int signal); |
void interruption_depassement_pile(int urgence, stackoverflow_context_t scp); |
#ifdef HAVE_SIGSEGV_RECOVERY |
|
void interruption_depassement_pile(int urgence, |
|
stackoverflow_context_t scp); |
|
#endif |
void inversion_matrice(struct_processus *s_etat_processus, |
void inversion_matrice(struct_processus *s_etat_processus, |
struct_matrice *s_matrice); |
struct_matrice *s_matrice); |
void lancement_daemon(struct_processus *s_etat_processus); |
void lancement_daemon(struct_processus *s_etat_processus); |