support check stack overflow for asan
This commit is contained in:
16
deps/oblib/src/common/ob_smart_call.h
vendored
16
deps/oblib/src/common/ob_smart_call.h
vendored
@ -102,11 +102,17 @@ inline int call_with_new_stack(SContext& sctx)
|
|||||||
ret; \
|
ret; \
|
||||||
})
|
})
|
||||||
#else
|
#else
|
||||||
#define SMART_CALL(func) \
|
#define SMART_CALL(func) \
|
||||||
({ \
|
({ \
|
||||||
int ret = OB_SUCCESS; \
|
int ret = OB_SUCCESS; \
|
||||||
ret = func; \
|
bool is_overflow = false; \
|
||||||
ret; \
|
if (OB_FAIL(check_stack_overflow(is_overflow, STACK_RESERVED_SIZE))) { \
|
||||||
|
} else if (!is_overflow) { \
|
||||||
|
ret = func; \
|
||||||
|
} else { \
|
||||||
|
ret = OB_STACK_OVERFLOW; \
|
||||||
|
} \
|
||||||
|
ret; \
|
||||||
})
|
})
|
||||||
#endif
|
#endif
|
||||||
} // end of namespace common
|
} // end of namespace common
|
||||||
|
|||||||
@ -3318,6 +3318,16 @@ static struct ObStrErrorInit
|
|||||||
ORACLE_ERRNO[-OB_CLUSTER_NAME_HASH_CONFLICT] = 600;
|
ORACLE_ERRNO[-OB_CLUSTER_NAME_HASH_CONFLICT] = 600;
|
||||||
ORACLE_STR_ERROR[-OB_CLUSTER_NAME_HASH_CONFLICT] = "ORA-00600: internal error code, arguments: -4378, cluster name conflict";
|
ORACLE_STR_ERROR[-OB_CLUSTER_NAME_HASH_CONFLICT] = "ORA-00600: internal error code, arguments: -4378, cluster name conflict";
|
||||||
ORACLE_STR_USER_ERROR[-OB_CLUSTER_NAME_HASH_CONFLICT] = "ORA-00600: internal error code, arguments: -4378, cluster name conflict";
|
ORACLE_STR_USER_ERROR[-OB_CLUSTER_NAME_HASH_CONFLICT] = "ORA-00600: internal error code, arguments: -4378, cluster name conflict";
|
||||||
|
ERROR_NAME[-OB_STACK_OVERFLOW] = "OB_STACK_OVERFLOW";
|
||||||
|
ERROR_CAUSE[-OB_STACK_OVERFLOW] = "Internal Error";
|
||||||
|
ERROR_SOLUTION[-OB_STACK_OVERFLOW] = "Contact OceanBase Support";
|
||||||
|
MYSQL_ERRNO[-OB_STACK_OVERFLOW] = -1;
|
||||||
|
SQLSTATE[-OB_STACK_OVERFLOW] = "HY000";
|
||||||
|
STR_ERROR[-OB_STACK_OVERFLOW] = "stack overflow";
|
||||||
|
STR_USER_ERROR[-OB_STACK_OVERFLOW] = "stack overflow";
|
||||||
|
ORACLE_ERRNO[-OB_STACK_OVERFLOW] = 600;
|
||||||
|
ORACLE_STR_ERROR[-OB_STACK_OVERFLOW] = "ORA-00600: internal error code, arguments: -4385, stack overflow";
|
||||||
|
ORACLE_STR_USER_ERROR[-OB_STACK_OVERFLOW] = "ORA-00600: internal error code, arguments: -4385, stack overflow";
|
||||||
ERROR_NAME[-OB_IMPORT_NOT_IN_SERVER] = "OB_IMPORT_NOT_IN_SERVER";
|
ERROR_NAME[-OB_IMPORT_NOT_IN_SERVER] = "OB_IMPORT_NOT_IN_SERVER";
|
||||||
ERROR_CAUSE[-OB_IMPORT_NOT_IN_SERVER] = "Internal Error";
|
ERROR_CAUSE[-OB_IMPORT_NOT_IN_SERVER] = "Internal Error";
|
||||||
ERROR_SOLUTION[-OB_IMPORT_NOT_IN_SERVER] = "Contact OceanBase Support";
|
ERROR_SOLUTION[-OB_IMPORT_NOT_IN_SERVER] = "Contact OceanBase Support";
|
||||||
|
|||||||
@ -423,6 +423,7 @@ DEFINE_ERROR(OB_DISK_ERROR, -4375, -1, "HY000", "observer has disk error");
|
|||||||
DEFINE_ORACLE_ERROR(OB_UNIMPLEMENTED_FEATURE, -4376, -1, "HY000", "unimplemented feature", 3001, "unimplemented feature");
|
DEFINE_ORACLE_ERROR(OB_UNIMPLEMENTED_FEATURE, -4376, -1, "HY000", "unimplemented feature", 3001, "unimplemented feature");
|
||||||
DEFINE_ERROR_EXT(OB_ERR_DEFENSIVE_CHECK, -4377, -1, "HY000", "fatal internal error", "fatal internal error in [%.*s]");
|
DEFINE_ERROR_EXT(OB_ERR_DEFENSIVE_CHECK, -4377, -1, "HY000", "fatal internal error", "fatal internal error in [%.*s]");
|
||||||
DEFINE_ERROR(OB_CLUSTER_NAME_HASH_CONFLICT, -4378, -1, "HY000", "cluster name conflict");
|
DEFINE_ERROR(OB_CLUSTER_NAME_HASH_CONFLICT, -4378, -1, "HY000", "cluster name conflict");
|
||||||
|
DEFINE_ERROR(OB_STACK_OVERFLOW, -4385, -1, "HY000", "stack overflow");
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
//error code for root server & server management -4500 ---- -5000
|
//error code for root server & server management -4500 ---- -5000
|
||||||
|
|||||||
@ -238,6 +238,7 @@ constexpr int OB_DISK_ERROR = -4375;
|
|||||||
constexpr int OB_UNIMPLEMENTED_FEATURE = -4376;
|
constexpr int OB_UNIMPLEMENTED_FEATURE = -4376;
|
||||||
constexpr int OB_ERR_DEFENSIVE_CHECK = -4377;
|
constexpr int OB_ERR_DEFENSIVE_CHECK = -4377;
|
||||||
constexpr int OB_CLUSTER_NAME_HASH_CONFLICT = -4378;
|
constexpr int OB_CLUSTER_NAME_HASH_CONFLICT = -4378;
|
||||||
|
constexpr int OB_STACK_OVERFLOW = -4385;
|
||||||
constexpr int OB_IMPORT_NOT_IN_SERVER = -4505;
|
constexpr int OB_IMPORT_NOT_IN_SERVER = -4505;
|
||||||
constexpr int OB_CONVERT_ERROR = -4507;
|
constexpr int OB_CONVERT_ERROR = -4507;
|
||||||
constexpr int OB_BYPASS_TIMEOUT = -4510;
|
constexpr int OB_BYPASS_TIMEOUT = -4510;
|
||||||
@ -1572,6 +1573,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
|||||||
#define OB_UNIMPLEMENTED_FEATURE__USER_ERROR_MSG "unimplemented feature"
|
#define OB_UNIMPLEMENTED_FEATURE__USER_ERROR_MSG "unimplemented feature"
|
||||||
#define OB_ERR_DEFENSIVE_CHECK__USER_ERROR_MSG "fatal internal error in [%.*s]"
|
#define OB_ERR_DEFENSIVE_CHECK__USER_ERROR_MSG "fatal internal error in [%.*s]"
|
||||||
#define OB_CLUSTER_NAME_HASH_CONFLICT__USER_ERROR_MSG "cluster name conflict"
|
#define OB_CLUSTER_NAME_HASH_CONFLICT__USER_ERROR_MSG "cluster name conflict"
|
||||||
|
#define OB_STACK_OVERFLOW__USER_ERROR_MSG "stack overflow"
|
||||||
#define OB_IMPORT_NOT_IN_SERVER__USER_ERROR_MSG "Import not in service"
|
#define OB_IMPORT_NOT_IN_SERVER__USER_ERROR_MSG "Import not in service"
|
||||||
#define OB_CONVERT_ERROR__USER_ERROR_MSG "Convert error"
|
#define OB_CONVERT_ERROR__USER_ERROR_MSG "Convert error"
|
||||||
#define OB_BYPASS_TIMEOUT__USER_ERROR_MSG "Bypass timeout"
|
#define OB_BYPASS_TIMEOUT__USER_ERROR_MSG "Bypass timeout"
|
||||||
@ -3029,6 +3031,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
|||||||
#define OB_UNIMPLEMENTED_FEATURE__ORA_USER_ERROR_MSG "ORA-03001: unimplemented feature"
|
#define OB_UNIMPLEMENTED_FEATURE__ORA_USER_ERROR_MSG "ORA-03001: unimplemented feature"
|
||||||
#define OB_ERR_DEFENSIVE_CHECK__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4377, fatal internal error in [%.*s]"
|
#define OB_ERR_DEFENSIVE_CHECK__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4377, fatal internal error in [%.*s]"
|
||||||
#define OB_CLUSTER_NAME_HASH_CONFLICT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4378, cluster name conflict"
|
#define OB_CLUSTER_NAME_HASH_CONFLICT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4378, cluster name conflict"
|
||||||
|
#define OB_STACK_OVERFLOW__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4385, stack overflow"
|
||||||
#define OB_IMPORT_NOT_IN_SERVER__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4505, Import not in service"
|
#define OB_IMPORT_NOT_IN_SERVER__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4505, Import not in service"
|
||||||
#define OB_CONVERT_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4507, Convert error"
|
#define OB_CONVERT_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4507, Convert error"
|
||||||
#define OB_BYPASS_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4510, Bypass timeout"
|
#define OB_BYPASS_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -4510, Bypass timeout"
|
||||||
|
|||||||
Reference in New Issue
Block a user