For the time being, clang 3.5.0 doesn't seem to fail on this so I will use that version to test my Sanitizer support. But we probably should look at this issue a bit more carefully. It may simply boil down to some simple macro support.

AddressSanitizer doesn't report the overflow issue for these two cases any longer. In fact, test_cronodate.t always succeeded. However, test_approxidate.t fails with a similar symptom reported in Issue #715.

This comment has been minimized.

@grondo: Thanks. I am looking at the code for test_cronodate.t but I'm not sure exactly what's going on with test_cronodate.t after padding the structure. I can use your help if you are familiar with this code :-)

This comment has been minimized.

This comment has been minimized.

FYI -- I did make -i check at least to see what errors are reported across all of our regression tests. It turned out ASan reported many leaks and as a result failed many tests. Here is the leak reports:asan.zip. I have to think that the detected errors are a mixed bag of false and true positives. As such, it will take some time to go through each report and to fix or blacklist it until all regression tests will pass. I think that should be another PR.

What this is saying is, this can be executed concurrently through two different threads (main thread and pthread 1). ++ operator is almost always atomic but what we found is such a benign race can be malignant when combined with compiler optimization. BTW, is tap thread safe?

This comment has been minimized.

From ThreadSanitizer, I see many data race reports at czmq routines called by service callback routines. My initial guess is these are false positives: in particular if czmq/zmq uses its own way to synchronize memory accesses across threads...

This comment has been minimized.

OK. I looked through all of the reports, and it seems the basics of TSan work reasonably well. I will group all these issues above into a few categories and create an issue for each so that we can follow up in a manageable way.

Because Leak and Memory sanitizer aren't supported by lower version of compilers, I will submit a PR only with Address and ThreadSantizer. LeakSanitizer is only a subset of AddressSanitizer anyway.