reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

projects/compiler-rt/lib/dfsan/dfsan.cpp
   33 static const dfsan_label kInitializingLabel = -1;
   35 static const uptr kNumLabels = 1 << (sizeof(dfsan_label) * 8);
   42 SANITIZER_INTERFACE_ATTRIBUTE THREADLOCAL dfsan_label __dfsan_retval_tls;
   43 SANITIZER_INTERFACE_ATTRIBUTE THREADLOCAL dfsan_label __dfsan_arg_tls[64];
  149 static atomic_dfsan_label *union_table(dfsan_label l1, dfsan_label l2) {
  149 static atomic_dfsan_label *union_table(dfsan_label l1, dfsan_label l2) {
  154 static void dfsan_check_label(dfsan_label label) {
  164 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) {
  164 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) {
  164 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) {
  182   dfsan_label label = 0;
  211 dfsan_label __dfsan_union_load(const dfsan_label *ls, uptr n) {
  211 dfsan_label __dfsan_union_load(const dfsan_label *ls, uptr n) {
  212   dfsan_label label = ls[0];
  214     dfsan_label next_label = ls[i];
  247 SANITIZER_INTERFACE_ATTRIBUTE dfsan_label
  248 dfsan_union(dfsan_label l1, dfsan_label l2) {
  248 dfsan_union(dfsan_label l1, dfsan_label l2) {
  255 dfsan_label dfsan_create_label(const char *desc, void *userdata) {
  256   dfsan_label label =
  266 void __dfsan_set_label(dfsan_label label, void *addr, uptr size) {
  267   for (dfsan_label *labelp = shadow_for(addr); size != 0; --size, ++labelp) {
  284 void dfsan_set_label(dfsan_label label, void *addr, uptr size) {
  289 void dfsan_add_label(dfsan_label label, void *addr, uptr size) {
  290   for (dfsan_label *labelp = shadow_for(addr); size != 0; --size, ++labelp)
  298 extern "C" SANITIZER_INTERFACE_ATTRIBUTE dfsan_label
  299 __dfsw_dfsan_get_label(long data, dfsan_label data_label,
  300                        dfsan_label *ret_label) {
  305 SANITIZER_INTERFACE_ATTRIBUTE dfsan_label
  313 const struct dfsan_label_info *dfsan_get_label_info(dfsan_label label) {
  318 dfsan_has_label(dfsan_label label, dfsan_label elem) {
  318 dfsan_has_label(dfsan_label label, dfsan_label elem) {
  329 extern "C" SANITIZER_INTERFACE_ATTRIBUTE dfsan_label
  330 dfsan_has_label_with_desc(dfsan_label label, const char *desc) {
  342   dfsan_label max_label_allocated =
  350   dfsan_label last_label =
projects/compiler-rt/lib/dfsan/dfsan.h
   27   dfsan_label l1;
   28   dfsan_label l2;
   34 void dfsan_add_label(dfsan_label label, void *addr, uptr size);
   35 void dfsan_set_label(dfsan_label label, void *addr, uptr size);
   36 dfsan_label dfsan_read_label(const void *addr, uptr size);
   37 dfsan_label dfsan_union(dfsan_label l1, dfsan_label l2);
   37 dfsan_label dfsan_union(dfsan_label l1, dfsan_label l2);
   37 dfsan_label dfsan_union(dfsan_label l1, dfsan_label l2);
   41 void dfsan_set_label(dfsan_label label, T &data) {  // NOLINT
   49 inline dfsan_label *shadow_for(void *ptr) {
   53 inline const dfsan_label *shadow_for(const void *ptr) {
projects/compiler-rt/lib/dfsan/dfsan_custom.cpp
   55 __dfsw_stat(const char *path, struct stat *buf, dfsan_label path_label,
   56             dfsan_label buf_label, dfsan_label *ret_label) {
   56             dfsan_label buf_label, dfsan_label *ret_label) {
   65                                                dfsan_label fd_label,
   66                                                dfsan_label buf_label,
   67                                                dfsan_label *ret_label) {
   76                                                   dfsan_label s_label,
   77                                                   dfsan_label c_label,
   78                                                   dfsan_label *ret_label) {
   98                                                 size_t n, dfsan_label s1_label,
   99                                                 dfsan_label s2_label,
  100                                                 dfsan_label n_label,
  101                                                 dfsan_label *ret_label) {
  131                                                 dfsan_label s1_label,
  132                                                 dfsan_label s2_label,
  133                                                 dfsan_label *ret_label) {
  151 __dfsw_strcasecmp(const char *s1, const char *s2, dfsan_label s1_label,
  152                   dfsan_label s2_label, dfsan_label *ret_label) {
  152                   dfsan_label s2_label, dfsan_label *ret_label) {
  173                                                  size_t n, dfsan_label s1_label,
  174                                                  dfsan_label s2_label,
  175                                                  dfsan_label n_label,
  176                                                  dfsan_label *ret_label) {
  201                    dfsan_label s1_label, dfsan_label s2_label,
  201                    dfsan_label s1_label, dfsan_label s2_label,
  202                    dfsan_label n_label, dfsan_label *ret_label) {
  202                    dfsan_label n_label, dfsan_label *ret_label) {
  224                                                   dfsan_label nmemb_label,
  225                                                   dfsan_label size_label,
  226                                                   dfsan_label *ret_label) {
  234 __dfsw_strlen(const char *s, dfsan_label s_label, dfsan_label *ret_label) {
  234 __dfsw_strlen(const char *s, dfsan_label s_label, dfsan_label *ret_label) {
  246   dfsan_label *sdest = shadow_for(dest);
  247   const dfsan_label *ssrc = shadow_for(src);
  248   internal_memcpy((void *)sdest, (const void *)ssrc, n * sizeof(dfsan_label));
  252 static void dfsan_memset(void *s, int c, dfsan_label c_label, size_t n) {
  259                     dfsan_label dest_label, dfsan_label src_label,
  259                     dfsan_label dest_label, dfsan_label src_label,
  260                     dfsan_label n_label, dfsan_label *ret_label) {
  260                     dfsan_label n_label, dfsan_label *ret_label) {
  267                     dfsan_label s_label, dfsan_label c_label,
  267                     dfsan_label s_label, dfsan_label c_label,
  268                     dfsan_label n_label, dfsan_label *ret_label) {
  268                     dfsan_label n_label, dfsan_label *ret_label) {
  275 __dfsw_strdup(const char *s, dfsan_label s_label, dfsan_label *ret_label) {
  275 __dfsw_strdup(const char *s, dfsan_label s_label, dfsan_label *ret_label) {
  284 __dfsw_strncpy(char *s1, const char *s2, size_t n, dfsan_label s1_label,
  285                dfsan_label s2_label, dfsan_label n_label,
  285                dfsan_label s2_label, dfsan_label n_label,
  286                dfsan_label *ret_label) {
  301              dfsan_label fd_label, dfsan_label buf_label,
  301              dfsan_label fd_label, dfsan_label buf_label,
  302              dfsan_label count_label, dfsan_label offset_label,
  302              dfsan_label count_label, dfsan_label offset_label,
  303              dfsan_label *ret_label) {
  313              dfsan_label fd_label, dfsan_label buf_label,
  313              dfsan_label fd_label, dfsan_label buf_label,
  314              dfsan_label count_label,
  315              dfsan_label *ret_label) {
  325                                                        dfsan_label clk_id_label,
  326                                                        dfsan_label tp_label,
  327                                                        dfsan_label *ret_label) {
  343 __dfsw_dlopen(const char *filename, int flag, dfsan_label filename_label,
  344               dfsan_label flag_label, dfsan_label *ret_label) {
  344               dfsan_label flag_label, dfsan_label *ret_label) {
  354   void *(*start_routine_trampoline)(void *, void *, dfsan_label, dfsan_label *);
  354   void *(*start_routine_trampoline)(void *, void *, dfsan_label, dfsan_label *);
  362   dfsan_label ret_label;
  369     void *(*start_routine_trampoline)(void *, void *, dfsan_label,
  370                                       dfsan_label *),
  371     void *start_routine, void *arg, dfsan_label thread_label,
  372     dfsan_label attr_label, dfsan_label start_routine_label,
  372     dfsan_label attr_label, dfsan_label start_routine_label,
  373     dfsan_label arg_label, dfsan_label *ret_label) {
  373     dfsan_label arg_label, dfsan_label *ret_label) {
  388                              size_t size, void *data, dfsan_label info_label,
  389                              dfsan_label size_label, dfsan_label data_label,
  389                              dfsan_label size_label, dfsan_label data_label,
  390                              dfsan_label *ret_label);
  403   dfsan_label ret_label;
  410                                size_t size, void *data, dfsan_label info_label,
  411                                dfsan_label size_label, dfsan_label data_label,
  411                                dfsan_label size_label, dfsan_label data_label,
  412                                dfsan_label *ret_label),
  413     void *callback, void *data, dfsan_label callback_label,
  414     dfsan_label data_label, dfsan_label *ret_label) {
  414     dfsan_label data_label, dfsan_label *ret_label) {
  421 char *__dfsw_ctime_r(const time_t *timep, char *buf, dfsan_label timep_label,
  422                      dfsan_label buf_label, dfsan_label *ret_label) {
  422                      dfsan_label buf_label, dfsan_label *ret_label) {
  435 char *__dfsw_fgets(char *s, int size, FILE *stream, dfsan_label s_label,
  436                    dfsan_label size_label, dfsan_label stream_label,
  436                    dfsan_label size_label, dfsan_label stream_label,
  437                    dfsan_label *ret_label) {
  449 char *__dfsw_getcwd(char *buf, size_t size, dfsan_label buf_label,
  450                     dfsan_label size_label, dfsan_label *ret_label) {
  450                     dfsan_label size_label, dfsan_label *ret_label) {
  462 char *__dfsw_get_current_dir_name(dfsan_label *ret_label) {
  472 int __dfsw_gethostname(char *name, size_t len, dfsan_label name_label,
  473                        dfsan_label len_label, dfsan_label *ret_label) {
  473                        dfsan_label len_label, dfsan_label *ret_label) {
  484                      dfsan_label resource_label, dfsan_label rlim_label,
  484                      dfsan_label resource_label, dfsan_label rlim_label,
  485                      dfsan_label *ret_label) {
  495 int __dfsw_getrusage(int who, struct rusage *usage, dfsan_label who_label,
  496                      dfsan_label usage_label, dfsan_label *ret_label) {
  496                      dfsan_label usage_label, dfsan_label *ret_label) {
  506 char *__dfsw_strcpy(char *dest, const char *src, dfsan_label dst_label,
  507                     dfsan_label src_label, dfsan_label *ret_label) {
  507                     dfsan_label src_label, dfsan_label *ret_label) {
  511                     sizeof(dfsan_label) * (strlen(src) + 1));
  519                        dfsan_label nptr_label, dfsan_label endptr_label,
  519                        dfsan_label nptr_label, dfsan_label endptr_label,
  520                        dfsan_label base_label, dfsan_label *ret_label) {
  520                        dfsan_label base_label, dfsan_label *ret_label) {
  539                        dfsan_label nptr_label, dfsan_label endptr_label,
  539                        dfsan_label nptr_label, dfsan_label endptr_label,
  540                        dfsan_label *ret_label) {
  559                        dfsan_label nptr_label, dfsan_label endptr_label,
  559                        dfsan_label nptr_label, dfsan_label endptr_label,
  560                        dfsan_label base_label, dfsan_label *ret_label) {
  560                        dfsan_label base_label, dfsan_label *ret_label) {
  579                        dfsan_label nptr_label, dfsan_label endptr_label,
  579                        dfsan_label nptr_label, dfsan_label endptr_label,
  580                        dfsan_label base_label, dfsan_label *ret_label) {
  580                        dfsan_label base_label, dfsan_label *ret_label) {
  599                                        dfsan_label nptr_label,
  600                                        int base, dfsan_label endptr_label,
  601                                        dfsan_label base_label,
  602                                        dfsan_label *ret_label) {
  620 time_t __dfsw_time(time_t *t, dfsan_label t_label, dfsan_label *ret_label) {
  620 time_t __dfsw_time(time_t *t, dfsan_label t_label, dfsan_label *ret_label) {
  630 int __dfsw_inet_pton(int af, const char *src, void *dst, dfsan_label af_label,
  631                      dfsan_label src_label, dfsan_label dst_label,
  631                      dfsan_label src_label, dfsan_label dst_label,
  632                      dfsan_label *ret_label) {
  644                               dfsan_label timep_label, dfsan_label result_label,
  644                               dfsan_label timep_label, dfsan_label result_label,
  645                               dfsan_label *ret_label) {
  660                       dfsan_label uid_label, dfsan_label pwd_label,
  660                       dfsan_label uid_label, dfsan_label pwd_label,
  661                       dfsan_label buf_label, dfsan_label buflen_label,
  661                       dfsan_label buf_label, dfsan_label buflen_label,
  662                       dfsan_label result_label, dfsan_label *ret_label) {
  662                       dfsan_label result_label, dfsan_label *ret_label) {
  677                 dfsan_label dfs_label, dfsan_label nfds_label,
  677                 dfsan_label dfs_label, dfsan_label nfds_label,
  678                 dfsan_label timeout_label, dfsan_label *ret_label) {
  678                 dfsan_label timeout_label, dfsan_label *ret_label) {
  692                   dfsan_label nfds_label, dfsan_label readfds_label,
  692                   dfsan_label nfds_label, dfsan_label readfds_label,
  693                   dfsan_label writefds_label, dfsan_label exceptfds_label,
  693                   dfsan_label writefds_label, dfsan_label exceptfds_label,
  694                   dfsan_label timeout_label, dfsan_label *ret_label) {
  694                   dfsan_label timeout_label, dfsan_label *ret_label) {
  714                              dfsan_label pid_label,
  715                              dfsan_label cpusetsize_label,
  716                              dfsan_label mask_label, dfsan_label *ret_label) {
  716                              dfsan_label mask_label, dfsan_label *ret_label) {
  726 int __dfsw_sigemptyset(sigset_t *set, dfsan_label set_label,
  727                        dfsan_label *ret_label) {
  735                      struct sigaction *oldact, dfsan_label signum_label,
  736                      dfsan_label act_label, dfsan_label oldact_label,
  736                      dfsan_label act_label, dfsan_label oldact_label,
  737                      dfsan_label *ret_label) {
  748                         dfsan_label tv_label, dfsan_label tz_label,
  748                         dfsan_label tv_label, dfsan_label tz_label,
  749                         dfsan_label *ret_label) {
  762                                                   dfsan_label s_label,
  763                                                   dfsan_label c_label,
  764                                                   dfsan_label n_label,
  765                                                   dfsan_label *ret_label) {
  780                                                    dfsan_label s_label,
  781                                                    dfsan_label c_label,
  782                                                    dfsan_label *ret_label) {
  796                                                   dfsan_label haystack_label,
  797                                                   dfsan_label needle_label,
  798                                                   dfsan_label *ret_label) {
  815                                                    dfsan_label req_label,
  816                                                    dfsan_label rem_label,
  817                                                    dfsan_label *ret_label) {
  829                   dfsan_label domain_label, dfsan_label type_label,
  829                   dfsan_label domain_label, dfsan_label type_label,
  830                   dfsan_label protocol_label, dfsan_label sv_label,
  830                   dfsan_label protocol_label, dfsan_label sv_label,
  831                   dfsan_label *ret_label) {
  845     dfsan_label fd_label, dfsan_label buf_label, dfsan_label count_label);
  845     dfsan_label fd_label, dfsan_label buf_label, dfsan_label count_label);
  845     dfsan_label fd_label, dfsan_label buf_label, dfsan_label count_label);
  858     dfsan_label write_callback_label,
  859     dfsan_label *ret_label) {
  866              dfsan_label fd_label, dfsan_label buf_label,
  866              dfsan_label fd_label, dfsan_label buf_label,
  867              dfsan_label count_label, dfsan_label *ret_label) {
  867              dfsan_label count_label, dfsan_label *ret_label) {
  966                          dfsan_label *va_labels, dfsan_label *ret_label,
  966                          dfsan_label *va_labels, dfsan_label *ret_label,
 1057                           sizeof(dfsan_label) *
 1113 int __dfsw_sprintf(char *str, const char *format, dfsan_label str_label,
 1114                    dfsan_label format_label, dfsan_label *va_labels,
 1114                    dfsan_label format_label, dfsan_label *va_labels,
 1115                    dfsan_label *ret_label, ...) {
 1125                     dfsan_label str_label, dfsan_label size_label,
 1125                     dfsan_label str_label, dfsan_label size_label,
 1126                     dfsan_label format_label, dfsan_label *va_labels,
 1126                     dfsan_label format_label, dfsan_label *va_labels,
 1127                     dfsan_label *ret_label, ...) {