|
| 1 | +#include <stdint.h> |
| 2 | +#include <string> |
| 3 | + |
| 4 | +size_t touch_string(std::string &in_str) { |
| 5 | + return in_str.size(); // Break here to look at bad string |
| 6 | +} |
| 7 | + |
| 8 | +int main() { |
| 9 | + std::wstring wempty(L""); |
| 10 | + std::wstring s(L"hello world! מזל טוב!"); |
| 11 | + std::wstring S(L"!!!!"); |
| 12 | + const wchar_t *mazeltov = L"מזל טוב"; |
| 13 | + std::string empty(""); |
| 14 | + std::string q("hello world"); |
| 15 | + std::string Q("quite a long std::strin with lots of info inside it"); |
| 16 | + std::string TheVeryLongOne( |
| 17 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 18 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 19 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 20 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 21 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 22 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 23 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 24 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 25 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 26 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 27 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 28 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 29 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 30 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 31 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 32 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 33 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 34 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 35 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 36 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 37 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 38 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 39 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 40 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 41 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 42 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 43 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 44 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 45 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 46 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 47 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 48 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 49 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 50 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 51 | + "9012345678901234567890123456789012345678901234567890someText123456789012" |
| 52 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 53 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 54 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 55 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 56 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 57 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 58 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 59 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 60 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 61 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 62 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 63 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 64 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 65 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 66 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 67 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 68 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 69 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 70 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 71 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 72 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 73 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 74 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 75 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 76 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 77 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 78 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 79 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 80 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 81 | + "123456789012345678901234567890123456789012345678901234567890123456789012" |
| 82 | + "345678901234567890123456789012345678901234567890123456789012345678901234" |
| 83 | + "567890123456789012345678901234567890123456789012345678901234567890123456" |
| 84 | + "789012345678901234567890123456789012345678901234567890123456789012345678" |
| 85 | + "901234567890123456789012345678901234567890123456789012345678901234567890" |
| 86 | + "1234567890123456789012345678901234567890"); |
| 87 | + std::string IHaveEmbeddedZeros("a\0b\0c\0d", 7); |
| 88 | + std::wstring IHaveEmbeddedZerosToo( |
| 89 | + L"hello world!\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監", 38); |
| 90 | + std::u16string u16_string(u"ß水氶"); |
| 91 | + std::u16string u16_empty(u""); |
| 92 | + std::u32string u32_string(U"🍄🍅🍆🍌"); |
| 93 | + std::u32string u32_empty(U""); |
| 94 | + std::string *null_str = nullptr; |
| 95 | + auto &rq = q; |
| 96 | + auto &rQ = Q; |
| 97 | + std::string *pq = &q; |
| 98 | + std::string *pQ = &Q; |
| 99 | + |
| 100 | + S.assign(L"!!!!!"); // Set break point at this line. |
| 101 | + std::string *not_a_string = (std::string *)0x0; |
| 102 | + touch_string(*not_a_string); |
| 103 | + return 0; |
| 104 | +} |
0 commit comments