[PATCH] D37788: [ARM] builtins: Do not abort in clear_cache.

Manoj Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 08:59:51 PDT 2017


manojgupta added a comment.

Apologies for being light on details. The failure was  discovered in NaCl (Native Client) in Chrome browser when running on ChromeOS with details at https://bugs.chromium.org/p/chromium/issues/detail?id=761103.
I don't know much about NaCl except that it allows execution for some trusted processes natively in a sandbox. It is also pretty painful to debug.

I also found (same as Peter) that __builtin___clear_cache is mostly called on VMs/JITs. A quick search revealed art (Android runtime), halide, NaCl, openjdk, qemu, webkit, a bunch of profilers  etc. use this builtin.   Debugging a crash in any of these applications is non-trivial.
Only Nacl is  deployed on ChromeBook and it took a pretty painful debugging and still struggling (can't run gdb :( ) to reveal that clear_cache builtin is causing problems. There is no guarantee that any of the above applications may not crash if built on ARM with compiler-rt. In addition, when clear_cache builtin aborts, there is no clear way to know the root cause since Linux kernel does not dump error messages in cache flush syscalls.


https://reviews.llvm.org/D37788





More information about the llvm-commits mailing list