- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Write -> Read data-raceMemory read at "stream.c":67 conflicts with a prior memory write at "_flsbuf.c":137 (flow dependence)
Write -> Write data-raceMemory write at "_open.c":198 conflicts with a prior memory write at "_getbuf.c":50 (output dependence)
Read -> Write data-raceMemory write at "_getbuf.c":50 conflicts with a prior memory read at "_open.c":198 (anti dependence)
I am using win32 threads, VC++ 6.0 on winxpsp2
I am seeing the above errors in the thread checker, all of which are related to the opening, writingand reading of files.All of the errors reference a call to "fgets" or "fopen" or "fprintf", but none of them are working on the same file, so I am confused why they would be occurring.
The output of my application is correct, but I want some assurance that these errors can be safely ignored. I think perhaps I am linking into a non-threadsafe library that is used for file operations?
Thank you for your assistance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which C runtime library are you linking with?
By default, VC6 links with a CRT that is not thread-safe. Use /MD, or /MDd (or /MT or /MTd) to link with a thread-safeCRT. This should remove these error messages that you are seeing.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page