Lines Matching defs:strd
465 char *strd = strdup(str1);
466 ASSERT_ZERO_LABEL(strd);
467 ASSERT_ZERO_LABEL(strd[0]);
468 ASSERT_LABEL(strd[3], i_label);
470 for (int i = 0; i < strlen(strd); ++i) {
471 if (!dfsan_get_label(strd[i]))
473 ASSERT_INIT_ORIGIN(&(strd[i]), str1_o[i]);
476 free(strd);
484 char *strd = strncpy(str2, str1, 5);
485 assert(strd == str2);
487 ASSERT_ZERO_LABEL(strd);
488 ASSERT_ZERO_LABEL(strd[0]);
489 ASSERT_ZERO_LABEL(strd[1]);
490 ASSERT_ZERO_LABEL(strd[2]);
491 ASSERT_LABEL(strd[3], i_label);
492 ASSERT_INIT_ORIGIN_EQ_ORIGIN(&(strd[3]), str1[3]);
496 strd = strncpy(p2, str1, 3);
497 assert(strd == str2);
499 ASSERT_LABEL(strd, j_label);
500 ASSERT_EQ_ORIGIN(strd, p2);
501 // When -dfsan-combine-pointer-labels-on-load is on, strd's label propagates
502 // to strd[i]'s label. When ORIGIN_TRACKING is defined,
506 ASSERT_ZERO_LABEL(strd[0]);
507 ASSERT_ZERO_LABEL(strd[1]);
508 ASSERT_ZERO_LABEL(strd[2]);
510 ASSERT_LABEL(strd[0], j_label);
511 ASSERT_LABEL(strd[1], j_label);
512 ASSERT_LABEL(strd[2], j_label);