version 1.294, 2016/03/23 21:51:14
|
version 1.312, 2017/07/30 22:00:22
|
Line 1
|
Line 1
|
#define DEBUG_ERREURS |
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.25 |
RPL/2 (R) version 4.1.27 |
Copyright (C) 1989-2016 Dr. BERTRAND Joël |
Copyright (C) 1989-2017 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 620 union semun
|
Line 628 union semun
|
} while(0) |
} while(0) |
|
|
#ifdef __GLIBC__ |
#ifdef __GLIBC__ |
#include <execinfo.h> |
# include <execinfo.h> |
#define __BACKTRACE |
# define __BACKTRACE |
#define BACKTRACE(n) \ |
# define BACKTRACE(n) \ |
do \ |
do \ |
{ \ |
{ \ |
void *buffer[n]; \ |
void *buffer[n]; \ |
Line 647 union semun
|
Line 655 union semun
|
pthread_mutex_unlock(&mutex); \ |
pthread_mutex_unlock(&mutex); \ |
} while(0) |
} while(0) |
#else |
#else |
#define BACKTRACE(n) NOTICE("BACKTRACE only defined in glibc") |
# define BACKTRACE(n) NOTICE("BACKTRACE only defined in glibc") |
#endif |
#endif |
|
|
#ifdef __BACKTRACE |
#ifdef __BACKTRACE |
Line 693 pid_t debug_fork();
|
Line 701 pid_t debug_fork();
|
#endif |
#endif |
|
|
#ifdef DEBUG_RETURN |
#ifdef DEBUG_RETURN |
#define return uprintf("[%d] Return from <%s()> at line #%d " \ |
# define return uprintf("[%d] Return from <%s()> at line #%d " \ |
"(%s [%d])\n", (int) getpid(), __FUNCTION__, \ |
"(%s [%d])\n", (int) getpid(), __FUNCTION__, \ |
__LINE__, strerror(errno), errno); fflush(stdout); errno = 0; return |
__LINE__, strerror(errno), errno); fflush(stdout); errno = 0; return |
#endif |
#endif |
|
|
#ifdef DEBUG_MUTEX |
#ifdef DEBUG_MUTEX |
#define pthread_mutex_lock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
# define pthread_mutex_lock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
"locking at %s() " \ |
"locking at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
#mutex, mutex, __FUNCTION__, __LINE__), fflush(stdout), \ |
#mutex, mutex, __FUNCTION__, __LINE__), fflush(stdout), \ |
pthread_mutex_lock(mutex) |
pthread_mutex_lock(mutex) |
#define pthread_mutex_unlock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
# define pthread_mutex_unlock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ |
"unlocking at " \ |
"unlocking at " \ |
"%s() line #%d\n", (int) getpid(), (unsigned long long) \ |
"%s() line #%d\n", (int) getpid(), (unsigned long long) \ |
pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \ |
pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \ |
Line 810 pid_t debug_fork();
|
Line 818 pid_t debug_fork();
|
# 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 976 pid_t debug_fork();
|
Line 1014 pid_t debug_fork();
|
# define d_ex_chiffrement_indisponible __erreur(90) |
# define d_ex_chiffrement_indisponible __erreur(90) |
# define d_ex_longueur_clef_chiffrement __erreur(91) |
# define d_ex_longueur_clef_chiffrement __erreur(91) |
# define d_ex_taille_message __erreur(92) |
# define d_ex_taille_message __erreur(92) |
|
# define d_ex_type_externe_dup __erreur(93) |
|
# define d_ex_type_externe_drop __erreur(94) |
#endif |
#endif |
|
|
|
|
Line 1004 pid_t debug_fork();
|
Line 1044 pid_t debug_fork();
|
#define BIN __RPL_BIN |
#define BIN __RPL_BIN |
#define CHN __RPL_CHN |
#define CHN __RPL_CHN |
#define CPL __RPL_CPL |
#define CPL __RPL_CPL |
|
#define EXT __RPL_EXT |
#define FCH __RPL_FCH |
#define FCH __RPL_FCH |
#define FCT __RPL_FCT |
#define FCT __RPL_FCT |
#define INT __RPL_INT |
#define INT __RPL_INT |
Line 1029 pid_t debug_fork();
|
Line 1070 pid_t debug_fork();
|
|
|
enum t_rplcas_commandes { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE }; |
enum t_rplcas_commandes { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE }; |
|
|
enum t_type { ADR = 0, ALG, BIN, CHN, CPL, FCH, FCT, INT, LST, |
enum t_type { ADR = 0, ALG, BIN, CHN, CPL, EXT, FCH, FCT, INT, LST, |
MCX, MIN, MRL, MTX, NOM, NON, PRC, REC, REL, RPN, SCK, |
MCX, MIN, MRL, MTX, NOM, NON, PRC, REC, REL, RPN, SCK, |
SLB, SPH, SQL, TBL, VCX, VIN, VRL }; |
SLB, SPH, SQL, TBL, VCX, VIN, VRL }; |
|
|
Line 1053 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
Line 1094 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
Sans objet. |
Sans objet. |
Type C/Fortran : complex16 |
Type C/Fortran : complex16 |
|
|
|
EXT : type géré dans une bibliothèque externe. |
|
|
FCH : descripteur de fichier (struct_fichier *). |
FCH : descripteur de fichier (struct_fichier *). |
|
|
FCT : déclaration d'une fonction et de son nombre d'arguments |
FCT : déclaration d'une fonction et de son nombre d'arguments |
Line 1118 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
Line 1161 enum t_type { ADR = 0, ALG, BIN, CHN, C
|
typedef struct objet |
typedef struct objet |
{ |
{ |
enum t_type type; |
enum t_type type; |
|
integer8 extension_type; |
|
void *descripteur_bibliotheque; |
|
|
volatile long nombre_occurrences; |
volatile long nombre_occurrences; |
|
|
Line 2439 typedef struct processus
|
Line 2484 typedef struct processus
|
variables_tableau_noeuds_partages) |
variables_tableau_noeuds_partages) |
|
|
CACHE2(struct_buffer, enveloppes_buffers) |
CACHE2(struct_buffer, enveloppes_buffers) |
unsigned char ***cache_buffer; |
unsigned char ***cache_buffer; |
int *pointeur_cache_buffer; |
int *pointeur_cache_buffer; |
} struct_processus; |
} struct_processus; |
#endif |
#endif |
|
|
Line 3120 void interruption3(int signal);
|
Line 3165 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); |
Line 3399 logical1 retrait_variable_statique(struc
|
Line 3447 logical1 retrait_variable_statique(struc
|
logical1 retrait_variables_statiques_locales( |
logical1 retrait_variables_statiques_locales( |
struct_processus *s_etat_processus); |
struct_processus *s_etat_processus); |
logical1 sequenceur(struct_processus *s_etat_processus); |
logical1 sequenceur(struct_processus *s_etat_processus); |
logical1 sequenceur_optimise(struct_processus *s_etat_processus); |
logical1 sequenceur_optimise(struct_processus *s_etat_processus, |
|
struct_liste_chainee *l_bibliotheques); |
#endif |
#endif |
|
|
/* |
/* |