Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 50112337 authored by Jens Gustedt's avatar Jens Gustedt
Browse files

implement p99_tp with struct instead of integer shifts

parent fa85ce9e
......@@ -21,6 +21,7 @@
# include "p99_atomic.h"
# endif
#ifdef P99_TP_NEED_INTEGER
#if UINTPTR_MAX == UINT32_MAX
typedef uint64_t p00_tp_state;
#else
......@@ -49,6 +50,31 @@ uintptr_t p00_tp_i2i(p00_tp_state v) {
return v >> p00_tp_shift;
}
#else
P99_DECLARE_STRUCT(p00_tp_state);
struct p00_tp_state {
uintptr_t p00_tag;
void* p00_val;
};
p99_inline
p00_tp_state p00_tp_p2i(void * p00_val, uintptr_t p00_tag) {
return (p00_tp_state){ .p00_tag = p00_tag, .p00_val = p00_val, };
}
p99_inline
void * p00_tp_i2p(p00_tp_state p00_sta) {
return p00_sta.p00_val;
}
p99_inline
uintptr_t p00_tp_i2i(p00_tp_state p00_sta) {
return p00_sta.p00_tag;
}
#endif
P99_DECLARE_ATOMIC(p00_tp_state);
P99_DECLARE_STRUCT(p99_tp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment