This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/68122] ICE in gcc/toplev.c:353 with -fsanitize=undefined and -fgnu-tm
- From: "torvald at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Dec 2015 14:27:34 +0000
- Subject: [Bug middle-end/68122] ICE in gcc/toplev.c:353 with -fsanitize=undefined and -fgnu-tm
- Auto-submitted: auto-generated
- References: <bug-68122-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68122
--- Comment #9 from torvald at gcc dot gnu.org ---
Marek, just skipping handling of internal functions is not correct I think. In
the worst case, it should treat them as txn-unsafe, unless they are considered
txn-pure. Do we have some idea of how many built-ins would be affected? For
example I believe it wouldn't be critical if TM wouldn't be compatible with
UBSan for now, but if there are builtins for code that would be intuitively
txn-safe, supporting them would be good.
Regarding UBSan specifically, I believe many of the checks could be handled in
a straight-forward way: All values returned by transactional memory accesses
will form a consistent snapshot, always. So, for example, an
addition-with-check call that takes values as arguments should be tm_pure
because it will check values that could have happened in some execution, even
if the transaction has to be rolled back later on.