Closed derekbruening closed 9 years ago
From derek.br...@gmail.com on April 05, 2010 08:03:21
note to me: this is PR 534421
Status: Accepted
From timurrrr@google.com on May 21, 2010 07:45:47
Will it be fixed in the next release?
re: other issues being fixed - awesome! Can't wait to test 1.0.11 :-)
From derek.br...@gmail.com on May 21, 2010 08:46:59
This one I have not gotten to yet. I have Issue 284 as higher priority. I may put out a release before these 2 b/c I'd like feedback on the new non-perl infrastructure from real-world use.
From timurrrr@google.com on May 21, 2010 08:48:51
Sounds good.
From timurrrr@google.com on May 31, 2010 03:44:23
This may be related to issue #309
From timurrrr@google.com on June 16, 2010 15:15:05
Derek, what's the status on this issue?
Can you please point me at some functions which may be related to these false reports? Looks like some of the "UNINITIALIZED READS" are from register and some of them are from stack. Maybe the initialization in event_thread_init (drmemory/drmemory.c) or shadow_registers_thread_init (drmemory/shadow.c) is incomplete? I think I can try some extra logging locally to find out what we're missing.
Cc: derek.bruening
From derek.br...@gmail.com on June 20, 2010 09:14:30
this is a known issue: not initializing shadow for initial structures for a new thread on Windows
I plan to re-open issue #117 to get the mcontext
From timurrrr@google.com on June 21, 2010 14:20:18
As far as I can see from the 117 and from the code, we can't get mcontext before the first basic block/trace of each thread is about to be executed. a) is it difficult to know the mcontext on thread creation? b) if a) is difficult -> we can workaround by having a per-thread shadow_values_initialized bit and call the appropriate function on the first bb/trace for each thread.
From derek.br...@gmail.com on June 23, 2010 06:59:22
a) no, it's not difficult for subsequent threads: for the initial thread, however, the whole scheme of DR init being split from starting execution does not make it easy to get the info to the events w/o changes that affect parts of the start/stop API, etc.
b) this is what I'm already doing for the process-initial mc.
I will probably go with a combination: providing mc for subsequent threads but not initial, and keeping the existing delayed init for the initial thread.
From derek.br...@gmail.com on June 27, 2010 17:46:11
status update: I have Dr. Memory properly handling new thread TEB and stack, and fixed a bug in handling 0-arg syscalls that showed up in my thread tests, but there are still a few uninits in new threads that I am tracking down.
From derek.br...@gmail.com on June 29, 2010 22:07:29
the uninits are from not propagating NtContinue CONTEXT shadow vals to regs, so it all looks good now. will export fix once finalized.
From derek.br...@gmail.com on July 02, 2010 08:25:19
in drmem r23 :
Fixed multiple false positives reported for each thread creation on Windows:
Status: Fixed
From derek.br...@gmail.com on July 02, 2010 08:25:59
assigning for verify and close
Owner: timur...@google.com
From timurrrr@google.com on July 22, 2010 04:18:34
There's still a NtCreateThread report when CreateThread is called. (See https://code.google.com/p/drmemory/issues/detail?id=13 )
The child-thread reports are not present anymore, so I mark this issue as Verified
Status: Verified
From timurrrr@google.com on April 05, 2010 10:50:58
I've been testing Chromium base_unittests under DrMemory 1.0.10 on Windows and sometimes it was giving me some strange reports when threads were created. I was able to reproduce these reports by running ThreadSanitizer unittests. Here is a short reproducer:
include
include
class MyThread { public: typedef void (*worker_t)();
MyThread(workert worker, const char *name = NULL) :w(worker), name_(name) {}
~MyThread(){}
void Start() { DWORD thrid = 0; t = ::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadBody, this, 0, &thr_id); // Line 15 }
void Join() { ::WaitForSingleObject(t_, INFINITE); }
HANDLE tid() const { return t_; } private: static DWORD WINAPI ThreadBody(MyThread my_thread) { if (mythread->name) { // Line 25 printf("Started thread '%s'\n", mythread->name); }
mythread->w(); // Line 28 return 0; } HANDLE t_; workert w; const char name_; };
void foo() { printf("foo()\n"); }
int main() { MyThread mt(foo); mt.Start(); mt.Join(); // Line 43 return 0; }
To my mind, this code doesn't have any uninitialized reads.
Here is the report: Error
#1
: UNINITIALIZED READ 136 byte(s) Elapsed time = 0:00:00.734 in thread 5768 system call NtCreateThread