Is a false positive possible? – Herpes

Is a false positive possible? - Herpes
Is a false positive possible? - Herpes

Run this test case (sorry for the length, was not able to make it smaller): #include #include #include #include #include #include using namespace std; char* list2byteArray() { // count data amount size_t data_size = 24; // copy data char *data = new char[data_size]; for (size_t i = 0; i < data_size; i++) { data[i] = 'a'; } data[data_size - 1] = 0; char *ret = strdup(data); delete[] data; return ret; } int addRecord() { char *data = list2byteArray(); usleep(100); free(data); return 0; } void *fillTable(void *ptr) { for (int i = 0; i < 100; i++) { string id("000"); id.append(1, 'a' + i); list record; record.push_back("some data"); addRecord(); } usleep(1000 * 1000); return NULL; } int main(int argc, char* argv[]) { int err; pthread_t thread1; pthread_t thread2; // create err = pthread_create(&thread1, NULL, &fillTable, NULL); if (err != 0) throw string("failed to create a thread."); err = pthread_create(&thread2, NULL, &fillTable, NULL); if (err != 0) throw string("failed to create a thread."); // join err = pthread_join(thread1, NULL); if (err != 0) throw string("Thread::join(): failed to join."); err = pthread_join(thread2, NULL); if (err != 0) throw string("Thread::join(): failed to join."); } Compiled with > g++ -std=c++11 -O0 -g test.cpp -lpthread -o test analysed with > valgrind –tool=drd ./test GCC-Information: g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 Valgrind SVN revision r13645. you tested + for high risk hpv which means it has a greater chance of progressing into cervical cancer if left untreated. * In case memcheck does not report any complaints, update Valgrind from SVN, rebuild and reinstall and rerun your program under drd with option –ptrace-addr=0x61d6fc8+8. i was completely stunned by this.

You may also like