OK, to put things a bit more in perspective; I'm not saying all MDMA contains carcinogens in any appreciable quantity, but some quite probably do. Of those that do contain such impurities, it also likely that these compounds aren't as nasty as the examples I described. BUT, there is a distinct possibility that such substances could be in street gear as there is most likely no quality control in place for the majority of illegally produced drugs. Drug raids have reported an occasional lab with a GC/MS but these are are the exception, not the rule.
Although safrole is probably not so carcinogenic as to mean a single low dose exposure will cause liver cancer, it is nonetheless listed as a liver carcinogen. So to eat a pill/ powder that has an odour of safrole (because it's either added or present as an impurity) is to consume a known carcinogen, be it a small amount. To be fair, the odour could in some cases be due to another intermediate which may not be as toxic as safrole.
So, as a consumer of illict drugs, you don't really know what impurities may be in a pill, and forensic profiling is hardly ever done, let alone analytical results broadcast as a warning to the public. We have to be thankful we are getting some results in relation to PMA and the recent high dose reports such as with the green mitzis. Who knows, perhaps resources will one day be allocated for this, but I wouldn't hold my breath.