Come up with TARGET_GET_VALID_OPTION_VALUES option hook (PR driver/83193).
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_platform_limits_netbsd.h
blobe7034ed6b528976f5d54fe2d41f468589511d285
1 //===-- sanitizer_platform_limits_netbsd.h --------------------------------===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of Sanitizer common code.
9 //
10 // Sizes and layouts of platform-specific NetBSD data structures.
11 //===----------------------------------------------------------------------===//
13 #ifndef SANITIZER_PLATFORM_LIMITS_NETBSD_H
14 #define SANITIZER_PLATFORM_LIMITS_NETBSD_H
16 #if SANITIZER_NETBSD
18 #include "sanitizer_internal_defs.h"
19 #include "sanitizer_platform.h"
21 #define _GET_LINK_MAP_BY_DLOPEN_HANDLE(handle, shift) \
22 ((link_map *)((handle) == nullptr ? nullptr : ((char *)(handle) + (shift))))
24 #if defined(__x86_64__)
25 #define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
26 _GET_LINK_MAP_BY_DLOPEN_HANDLE(handle, 608)
27 #elif defined(__i386__)
28 #define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
29 _GET_LINK_MAP_BY_DLOPEN_HANDLE(handle, 324)
30 #endif
32 namespace __sanitizer {
33 extern unsigned struct_utsname_sz;
34 extern unsigned struct_stat_sz;
35 extern unsigned struct_rusage_sz;
36 extern unsigned siginfo_t_sz;
37 extern unsigned struct_itimerval_sz;
38 extern unsigned pthread_t_sz;
39 extern unsigned pthread_cond_t_sz;
40 extern unsigned pid_t_sz;
41 extern unsigned timeval_sz;
42 extern unsigned uid_t_sz;
43 extern unsigned gid_t_sz;
44 extern unsigned mbstate_t_sz;
45 extern unsigned struct_timezone_sz;
46 extern unsigned struct_tms_sz;
47 extern unsigned struct_itimerspec_sz;
48 extern unsigned struct_sigevent_sz;
49 extern unsigned struct_sched_param_sz;
50 extern unsigned struct_statfs_sz;
51 extern unsigned struct_sockaddr_sz;
52 extern unsigned ucontext_t_sz;
54 extern unsigned struct_rlimit_sz;
55 extern unsigned struct_utimbuf_sz;
56 extern unsigned struct_timespec_sz;
58 struct __sanitizer_iocb {
59 u64 aio_offset;
60 uptr aio_buf;
61 long aio_nbytes;
62 u32 aio_fildes;
63 u32 aio_lio_opcode;
64 long aio_reqprio;
65 #if SANITIZER_WORDSIZE == 64
66 u8 aio_sigevent[32];
67 #else
68 u8 aio_sigevent[20];
69 #endif
70 u32 _state;
71 u32 _errno;
72 long _retval;
75 struct __sanitizer___sysctl_args {
76 int *name;
77 int nlen;
78 void *oldval;
79 uptr *oldlenp;
80 void *newval;
81 uptr newlen;
84 struct __sanitizer_sem_t {
85 uptr data[5];
88 struct __sanitizer_ipc_perm {
89 u32 uid;
90 u32 gid;
91 u32 cuid;
92 u32 cgid;
93 u32 mode;
94 unsigned short _seq;
95 long _key;
98 struct __sanitizer_shmid_ds {
99 __sanitizer_ipc_perm shm_perm;
100 unsigned long shm_segsz;
101 u32 shm_lpid;
102 u32 shm_cpid;
103 unsigned int shm_nattch;
104 u64 shm_atime;
105 u64 shm_dtime;
106 u64 shm_ctime;
107 void *_shm_internal;
110 extern unsigned struct_msqid_ds_sz;
111 extern unsigned struct_mq_attr_sz;
112 extern unsigned struct_timex_sz;
113 extern unsigned struct_statvfs_sz;
115 struct __sanitizer_iovec {
116 void *iov_base;
117 uptr iov_len;
120 struct __sanitizer_ifaddrs {
121 struct __sanitizer_ifaddrs *ifa_next;
122 char *ifa_name;
123 unsigned int ifa_flags;
124 void *ifa_addr; // (struct sockaddr *)
125 void *ifa_netmask; // (struct sockaddr *)
126 void *ifa_dstaddr; // (struct sockaddr *)
127 void *ifa_data;
128 unsigned int ifa_addrflags;
131 typedef unsigned __sanitizer_pthread_key_t;
133 typedef long long __sanitizer_time_t;
135 struct __sanitizer_passwd {
136 char *pw_name;
137 char *pw_passwd;
138 int pw_uid;
139 int pw_gid;
140 __sanitizer_time_t pw_change;
141 char *pw_class;
142 char *pw_gecos;
143 char *pw_dir;
144 char *pw_shell;
145 __sanitizer_time_t pw_expire;
148 struct __sanitizer_group {
149 char *gr_name;
150 char *gr_passwd;
151 int gr_gid;
152 char **gr_mem;
155 struct __sanitizer_timeb {
156 __sanitizer_time_t time;
157 unsigned short millitm;
158 short timezone;
159 short dstflag;
162 struct __sanitizer_ether_addr {
163 u8 octet[6];
166 struct __sanitizer_tm {
167 int tm_sec;
168 int tm_min;
169 int tm_hour;
170 int tm_mday;
171 int tm_mon;
172 int tm_year;
173 int tm_wday;
174 int tm_yday;
175 int tm_isdst;
176 long int tm_gmtoff;
177 const char *tm_zone;
180 struct __sanitizer_msghdr {
181 void *msg_name;
182 unsigned msg_namelen;
183 struct __sanitizer_iovec *msg_iov;
184 unsigned msg_iovlen;
185 void *msg_control;
186 unsigned msg_controllen;
187 int msg_flags;
189 struct __sanitizer_cmsghdr {
190 unsigned cmsg_len;
191 int cmsg_level;
192 int cmsg_type;
195 struct __sanitizer_dirent {
196 u64 d_fileno;
197 u16 d_reclen;
198 // more fields that we don't care about
201 typedef int __sanitizer_clock_t;
202 typedef int __sanitizer_clockid_t;
204 typedef u32 __sanitizer___kernel_uid_t;
205 typedef u32 __sanitizer___kernel_gid_t;
206 typedef u64 __sanitizer___kernel_off_t;
207 typedef struct {
208 u32 fds_bits[8];
209 } __sanitizer___kernel_fd_set;
211 typedef struct {
212 unsigned int pta_magic;
213 int pta_flags;
214 void *pta_private;
215 } __sanitizer_pthread_attr_t;
217 struct __sanitizer_sigset_t {
218 // uint32_t * 4
219 unsigned int __bits[4];
222 struct __sanitizer_sigaction {
223 union {
224 void (*handler)(int sig);
225 void (*sigaction)(int sig, void *siginfo, void *uctx);
227 __sanitizer_sigset_t sa_mask;
228 int sa_flags;
231 typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
233 struct __sanitizer_kernel_sigaction_t {
234 union {
235 void (*handler)(int signo);
236 void (*sigaction)(int signo, void *info, void *ctx);
238 unsigned long sa_flags;
239 void (*sa_restorer)(void);
240 __sanitizer_kernel_sigset_t sa_mask;
243 extern uptr sig_ign;
244 extern uptr sig_dfl;
245 extern uptr sa_siginfo;
247 extern int af_inet;
248 extern int af_inet6;
249 uptr __sanitizer_in_addr_sz(int af);
251 struct __sanitizer_dl_phdr_info {
252 uptr dlpi_addr;
253 const char *dlpi_name;
254 const void *dlpi_phdr;
255 short dlpi_phnum;
258 extern unsigned struct_ElfW_Phdr_sz;
260 struct __sanitizer_addrinfo {
261 int ai_flags;
262 int ai_family;
263 int ai_socktype;
264 int ai_protocol;
265 unsigned ai_addrlen;
266 char *ai_canonname;
267 void *ai_addr;
268 struct __sanitizer_addrinfo *ai_next;
271 struct __sanitizer_hostent {
272 char *h_name;
273 char **h_aliases;
274 int h_addrtype;
275 int h_length;
276 char **h_addr_list;
279 struct __sanitizer_pollfd {
280 int fd;
281 short events;
282 short revents;
285 typedef unsigned __sanitizer_nfds_t;
287 struct __sanitizer_glob_t {
288 uptr gl_pathc;
289 uptr gl_matchc;
290 uptr gl_offs;
291 int gl_flags;
292 char **gl_pathv;
293 int (*gl_errfunc)(const char *, int);
294 void (*gl_closedir)(void *dirp);
295 struct dirent *(*gl_readdir)(void *dirp);
296 void *(*gl_opendir)(const char *);
297 int (*gl_lstat)(const char *, void * /* struct stat* */);
298 int (*gl_stat)(const char *, void * /* struct stat* */);
301 extern int glob_nomatch;
302 extern int glob_altdirfunc;
304 extern unsigned path_max;
306 struct __sanitizer_wordexp_t {
307 uptr we_wordc;
308 char **we_wordv;
309 uptr we_offs;
310 char *we_strings;
311 uptr we_nbytes;
314 typedef void __sanitizer_FILE;
315 #define SANITIZER_HAS_STRUCT_FILE 0
317 extern int shmctl_ipc_stat;
319 // This simplifies generic code
320 #define struct_shminfo_sz -1
321 #define struct_shm_info_sz -1
322 #define shmctl_shm_stat -1
323 #define shmctl_ipc_info -1
324 #define shmctl_shm_info -1
326 extern unsigned struct_utmp_sz;
327 extern unsigned struct_utmpx_sz;
329 extern int map_fixed;
331 // ioctl arguments
332 struct __sanitizer_ifconf {
333 int ifc_len;
334 union {
335 void *ifcu_req;
336 } ifc_ifcu;
339 #define IOC_NRBITS 8
340 #define IOC_TYPEBITS 8
341 #define IOC_SIZEBITS 14
342 #define IOC_DIRBITS 2
343 #define IOC_NONE 0U
344 #define IOC_WRITE 1U
345 #define IOC_READ 2U
346 #define IOC_NRMASK ((1 << IOC_NRBITS) - 1)
347 #define IOC_TYPEMASK ((1 << IOC_TYPEBITS) - 1)
348 #define IOC_SIZEMASK ((1 << IOC_SIZEBITS) - 1)
349 #undef IOC_DIRMASK
350 #define IOC_DIRMASK ((1 << IOC_DIRBITS) - 1)
351 #define IOC_NRSHIFT 0
352 #define IOC_TYPESHIFT (IOC_NRSHIFT + IOC_NRBITS)
353 #define IOC_SIZESHIFT (IOC_TYPESHIFT + IOC_TYPEBITS)
354 #define IOC_DIRSHIFT (IOC_SIZESHIFT + IOC_SIZEBITS)
355 #define EVIOC_EV_MAX 0x1f
356 #define EVIOC_ABS_MAX 0x3f
358 #define IOC_DIR(nr) (((nr) >> IOC_DIRSHIFT) & IOC_DIRMASK)
359 #define IOC_TYPE(nr) (((nr) >> IOC_TYPESHIFT) & IOC_TYPEMASK)
360 #define IOC_NR(nr) (((nr) >> IOC_NRSHIFT) & IOC_NRMASK)
361 #define IOC_SIZE(nr) (((nr) >> IOC_SIZESHIFT) & IOC_SIZEMASK)
363 extern unsigned struct_ifreq_sz;
364 extern unsigned struct_termios_sz;
365 extern unsigned struct_winsize_sz;
367 extern unsigned struct_arpreq_sz;
369 extern unsigned struct_mtget_sz;
370 extern unsigned struct_mtop_sz;
371 extern unsigned struct_rtentry_sz;
372 extern unsigned struct_sbi_instrument_sz;
373 extern unsigned struct_seq_event_rec_sz;
374 extern unsigned struct_synth_info_sz;
375 extern unsigned struct_vt_mode_sz;
376 extern unsigned struct_audio_buf_info_sz;
377 extern unsigned struct_ppp_stats_sz;
378 extern unsigned struct_sioc_sg_req_sz;
379 extern unsigned struct_sioc_vif_req_sz;
381 // ioctl request identifiers
383 // A special value to mark ioctls that are not present on the target platform,
384 // when it can not be determined without including any system headers.
385 extern const unsigned IOCTL_NOT_PRESENT;
387 extern unsigned IOCTL_FIOASYNC;
388 extern unsigned IOCTL_FIOCLEX;
389 extern unsigned IOCTL_FIOGETOWN;
390 extern unsigned IOCTL_FIONBIO;
391 extern unsigned IOCTL_FIONCLEX;
392 extern unsigned IOCTL_FIOSETOWN;
393 extern unsigned IOCTL_SIOCADDMULTI;
394 extern unsigned IOCTL_SIOCATMARK;
395 extern unsigned IOCTL_SIOCDELMULTI;
396 extern unsigned IOCTL_SIOCGIFADDR;
397 extern unsigned IOCTL_SIOCGIFBRDADDR;
398 extern unsigned IOCTL_SIOCGIFCONF;
399 extern unsigned IOCTL_SIOCGIFDSTADDR;
400 extern unsigned IOCTL_SIOCGIFFLAGS;
401 extern unsigned IOCTL_SIOCGIFMETRIC;
402 extern unsigned IOCTL_SIOCGIFMTU;
403 extern unsigned IOCTL_SIOCGIFNETMASK;
404 extern unsigned IOCTL_SIOCGPGRP;
405 extern unsigned IOCTL_SIOCSIFADDR;
406 extern unsigned IOCTL_SIOCSIFBRDADDR;
407 extern unsigned IOCTL_SIOCSIFDSTADDR;
408 extern unsigned IOCTL_SIOCSIFFLAGS;
409 extern unsigned IOCTL_SIOCSIFMETRIC;
410 extern unsigned IOCTL_SIOCSIFMTU;
411 extern unsigned IOCTL_SIOCSIFNETMASK;
412 extern unsigned IOCTL_SIOCSPGRP;
413 extern unsigned IOCTL_TIOCCONS;
414 extern unsigned IOCTL_TIOCEXCL;
415 extern unsigned IOCTL_TIOCGETD;
416 extern unsigned IOCTL_TIOCGPGRP;
417 extern unsigned IOCTL_TIOCGWINSZ;
418 extern unsigned IOCTL_TIOCMBIC;
419 extern unsigned IOCTL_TIOCMBIS;
420 extern unsigned IOCTL_TIOCMGET;
421 extern unsigned IOCTL_TIOCMSET;
422 extern unsigned IOCTL_TIOCNOTTY;
423 extern unsigned IOCTL_TIOCNXCL;
424 extern unsigned IOCTL_TIOCOUTQ;
425 extern unsigned IOCTL_TIOCPKT;
426 extern unsigned IOCTL_TIOCSCTTY;
427 extern unsigned IOCTL_TIOCSETD;
428 extern unsigned IOCTL_TIOCSPGRP;
429 extern unsigned IOCTL_TIOCSTI;
430 extern unsigned IOCTL_TIOCSWINSZ;
431 extern unsigned IOCTL_SIOCGETSGCNT;
432 extern unsigned IOCTL_SIOCGETVIFCNT;
433 extern unsigned IOCTL_MTIOCGET;
434 extern unsigned IOCTL_MTIOCTOP;
435 extern unsigned IOCTL_SIOCADDRT;
436 extern unsigned IOCTL_SIOCDELRT;
437 extern unsigned IOCTL_SNDCTL_DSP_GETBLKSIZE;
438 extern unsigned IOCTL_SNDCTL_DSP_GETFMTS;
439 extern unsigned IOCTL_SNDCTL_DSP_NONBLOCK;
440 extern unsigned IOCTL_SNDCTL_DSP_POST;
441 extern unsigned IOCTL_SNDCTL_DSP_RESET;
442 extern unsigned IOCTL_SNDCTL_DSP_SETFMT;
443 extern unsigned IOCTL_SNDCTL_DSP_SETFRAGMENT;
444 extern unsigned IOCTL_SNDCTL_DSP_SPEED;
445 extern unsigned IOCTL_SNDCTL_DSP_STEREO;
446 extern unsigned IOCTL_SNDCTL_DSP_SUBDIVIDE;
447 extern unsigned IOCTL_SNDCTL_DSP_SYNC;
448 extern unsigned IOCTL_SNDCTL_FM_4OP_ENABLE;
449 extern unsigned IOCTL_SNDCTL_FM_LOAD_INSTR;
450 extern unsigned IOCTL_SNDCTL_MIDI_INFO;
451 extern unsigned IOCTL_SNDCTL_MIDI_PRETIME;
452 extern unsigned IOCTL_SNDCTL_SEQ_CTRLRATE;
453 extern unsigned IOCTL_SNDCTL_SEQ_GETINCOUNT;
454 extern unsigned IOCTL_SNDCTL_SEQ_GETOUTCOUNT;
455 extern unsigned IOCTL_SNDCTL_SEQ_NRMIDIS;
456 extern unsigned IOCTL_SNDCTL_SEQ_NRSYNTHS;
457 extern unsigned IOCTL_SNDCTL_SEQ_OUTOFBAND;
458 extern unsigned IOCTL_SNDCTL_SEQ_PANIC;
459 extern unsigned IOCTL_SNDCTL_SEQ_PERCMODE;
460 extern unsigned IOCTL_SNDCTL_SEQ_RESET;
461 extern unsigned IOCTL_SNDCTL_SEQ_RESETSAMPLES;
462 extern unsigned IOCTL_SNDCTL_SEQ_SYNC;
463 extern unsigned IOCTL_SNDCTL_SEQ_TESTMIDI;
464 extern unsigned IOCTL_SNDCTL_SEQ_THRESHOLD;
465 extern unsigned IOCTL_SNDCTL_SYNTH_INFO;
466 extern unsigned IOCTL_SNDCTL_SYNTH_MEMAVL;
467 extern unsigned IOCTL_SNDCTL_TMR_CONTINUE;
468 extern unsigned IOCTL_SNDCTL_TMR_METRONOME;
469 extern unsigned IOCTL_SNDCTL_TMR_SELECT;
470 extern unsigned IOCTL_SNDCTL_TMR_SOURCE;
471 extern unsigned IOCTL_SNDCTL_TMR_START;
472 extern unsigned IOCTL_SNDCTL_TMR_STOP;
473 extern unsigned IOCTL_SNDCTL_TMR_TEMPO;
474 extern unsigned IOCTL_SNDCTL_TMR_TIMEBASE;
475 extern unsigned IOCTL_SOUND_MIXER_READ_ALTPCM;
476 extern unsigned IOCTL_SOUND_MIXER_READ_BASS;
477 extern unsigned IOCTL_SOUND_MIXER_READ_CAPS;
478 extern unsigned IOCTL_SOUND_MIXER_READ_CD;
479 extern unsigned IOCTL_SOUND_MIXER_READ_DEVMASK;
480 extern unsigned IOCTL_SOUND_MIXER_READ_ENHANCE;
481 extern unsigned IOCTL_SOUND_MIXER_READ_IGAIN;
482 extern unsigned IOCTL_SOUND_MIXER_READ_IMIX;
483 extern unsigned IOCTL_SOUND_MIXER_READ_LINE1;
484 extern unsigned IOCTL_SOUND_MIXER_READ_LINE2;
485 extern unsigned IOCTL_SOUND_MIXER_READ_LINE3;
486 extern unsigned IOCTL_SOUND_MIXER_READ_LINE;
487 extern unsigned IOCTL_SOUND_MIXER_READ_LOUD;
488 extern unsigned IOCTL_SOUND_MIXER_READ_MIC;
489 extern unsigned IOCTL_SOUND_MIXER_READ_MUTE;
490 extern unsigned IOCTL_SOUND_MIXER_READ_OGAIN;
491 extern unsigned IOCTL_SOUND_MIXER_READ_PCM;
492 extern unsigned IOCTL_SOUND_MIXER_READ_RECLEV;
493 extern unsigned IOCTL_SOUND_MIXER_READ_RECMASK;
494 extern unsigned IOCTL_SOUND_MIXER_READ_RECSRC;
495 extern unsigned IOCTL_SOUND_MIXER_READ_SPEAKER;
496 extern unsigned IOCTL_SOUND_MIXER_READ_STEREODEVS;
497 extern unsigned IOCTL_SOUND_MIXER_READ_SYNTH;
498 extern unsigned IOCTL_SOUND_MIXER_READ_TREBLE;
499 extern unsigned IOCTL_SOUND_MIXER_READ_VOLUME;
500 extern unsigned IOCTL_SOUND_MIXER_WRITE_ALTPCM;
501 extern unsigned IOCTL_SOUND_MIXER_WRITE_BASS;
502 extern unsigned IOCTL_SOUND_MIXER_WRITE_CD;
503 extern unsigned IOCTL_SOUND_MIXER_WRITE_ENHANCE;
504 extern unsigned IOCTL_SOUND_MIXER_WRITE_IGAIN;
505 extern unsigned IOCTL_SOUND_MIXER_WRITE_IMIX;
506 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE1;
507 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE2;
508 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE3;
509 extern unsigned IOCTL_SOUND_MIXER_WRITE_LINE;
510 extern unsigned IOCTL_SOUND_MIXER_WRITE_LOUD;
511 extern unsigned IOCTL_SOUND_MIXER_WRITE_MIC;
512 extern unsigned IOCTL_SOUND_MIXER_WRITE_MUTE;
513 extern unsigned IOCTL_SOUND_MIXER_WRITE_OGAIN;
514 extern unsigned IOCTL_SOUND_MIXER_WRITE_PCM;
515 extern unsigned IOCTL_SOUND_MIXER_WRITE_RECLEV;
516 extern unsigned IOCTL_SOUND_MIXER_WRITE_RECSRC;
517 extern unsigned IOCTL_SOUND_MIXER_WRITE_SPEAKER;
518 extern unsigned IOCTL_SOUND_MIXER_WRITE_SYNTH;
519 extern unsigned IOCTL_SOUND_MIXER_WRITE_TREBLE;
520 extern unsigned IOCTL_SOUND_MIXER_WRITE_VOLUME;
521 extern unsigned IOCTL_SOUND_PCM_READ_BITS;
522 extern unsigned IOCTL_SOUND_PCM_READ_CHANNELS;
523 extern unsigned IOCTL_SOUND_PCM_READ_FILTER;
524 extern unsigned IOCTL_SOUND_PCM_READ_RATE;
525 extern unsigned IOCTL_SOUND_PCM_WRITE_CHANNELS;
526 extern unsigned IOCTL_SOUND_PCM_WRITE_FILTER;
527 extern unsigned IOCTL_VT_ACTIVATE;
528 extern unsigned IOCTL_VT_GETMODE;
529 extern unsigned IOCTL_VT_OPENQRY;
530 extern unsigned IOCTL_VT_RELDISP;
531 extern unsigned IOCTL_VT_SETMODE;
532 extern unsigned IOCTL_VT_WAITACTIVE;
533 extern unsigned IOCTL_KDDISABIO;
534 extern unsigned IOCTL_KDENABIO;
535 extern unsigned IOCTL_KDGETLED;
536 extern unsigned IOCTL_KDGKBMODE;
537 extern unsigned IOCTL_KDGKBTYPE;
538 extern unsigned IOCTL_KDMKTONE;
539 extern unsigned IOCTL_KDSETLED;
540 extern unsigned IOCTL_KDSETMODE;
541 extern unsigned IOCTL_KDSKBMODE;
543 extern const int si_SEGV_MAPERR;
544 extern const int si_SEGV_ACCERR;
545 } // namespace __sanitizer
547 #define CHECK_TYPE_SIZE(TYPE) \
548 COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE))
550 #define CHECK_SIZE_AND_OFFSET(CLASS, MEMBER) \
551 COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *)NULL)->MEMBER) == \
552 sizeof(((CLASS *)NULL)->MEMBER)); \
553 COMPILER_CHECK(offsetof(__sanitizer_##CLASS, MEMBER) == \
554 offsetof(CLASS, MEMBER))
556 // For sigaction, which is a function and struct at the same time,
557 // and thus requires explicit "struct" in sizeof() expression.
558 #define CHECK_STRUCT_SIZE_AND_OFFSET(CLASS, MEMBER) \
559 COMPILER_CHECK(sizeof(((struct __sanitizer_##CLASS *)NULL)->MEMBER) == \
560 sizeof(((struct CLASS *)NULL)->MEMBER)); \
561 COMPILER_CHECK(offsetof(struct __sanitizer_##CLASS, MEMBER) == \
562 offsetof(struct CLASS, MEMBER))
564 #endif // SANITIZER_NETBSD
566 #endif