Lines Matching refs:STR
3410 // Here, we allocate a 8-byte aligned string str and initialize first 5 bytes.
3411 // Then one thread calls strlen(str) (as well as index & rindex)
3412 // and another thread initializes str[5]..str[7].
3417 char *str;
3420 CHECK(strlen(str) == 4);
3421 CHECK(index(str, 'X') == str);
3422 CHECK(index(str, 'x') == str+1);
3423 CHECK(index(str, 'Y') == NULL);
3424 CHECK(rindex(str, 'X') == str+2);
3425 CHECK(rindex(str, 'x') == str+3);
3426 CHECK(rindex(str, 'Y') == NULL);
3429 str[5] = 'Y';
3430 str[6] = 'Y';
3431 str[7] = '\0';
3435 str = new char[8];
3436 str[0] = 'X';
3437 str[1] = 'x';
3438 str[2] = 'X';
3439 str[3] = 'x';
3440 str[4] = '\0';
3449 printf("\tstrX=%s; strY=%s\n", str, str+5);
4775 const char *str = "Hey there!\n";
4776 IGNORE_RETURN_VALUE(write(fd_out, str, strlen(str) + 1));
6786 string *STR;
6792 MU.Lock(); CHECK(STR->length() >= 4); MU.Unlock();
6797 CHECK(STR->length() >= 4); // Unprotected!
6802 MU.Lock(); CHECK(STR->length() >= 4); MU.Unlock();
6807 MU.Lock(); *STR += " + a very very long string"; MU.Unlock();
6811 STR = new string ("The String");
6817 printf("%s\n", STR->c_str());
6818 delete STR;