summaryrefslogtreecommitdiff
path: root/storage/rocksdb
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-09-22 22:46:45 +0200
committerSergei Golubchik <serg@mariadb.org>2018-09-23 19:17:56 +0200
commit76098f45b8b1f2224eb25cf5d94450c6f4a1414c (patch)
tree5b645cfcc5daa5064e588e43075e929f1eaa5de7 /storage/rocksdb
parent2b45eb77f7845068e9e26b30ad63e99ac21c5aff (diff)
downloadmariadb-git-76098f45b8b1f2224eb25cf5d94450c6f4a1414c.tar.gz
RocksDB: workaround a compiler error on ppc64le
storage/rocksdb/rdb_datadic.cc: In member function 'int myrocks::Rdb_key_def::unpack_integer(myrocks::Rdb_field_packing*, Field*, uchar*, myrocks::Rdb_string_reader*, myrocks::Rdb_string_reader*) const' storage/rocksdb/rdb_datadic.cc:1781:1: internal compiler error: Segmentation fault } on ppc64le, ubuntu bionic gcc 7.3.0 and debian stretch gcc 6.3.0 The error happens with -ftree-loop-vectorize when trying to vectorize a particular loop (see Rdb_key_def::unpack_integer()) Compiler gets confused by __attribute__((optimize("O0")) that comes from ha_rocksdb_proto.h. The intention of this __attribute__ was to prevent function from being inlined (see ha_rocksdb.cc). Let's use a more specific attribute that prevents inlining but does not confuse loop vectorizer.
Diffstat (limited to 'storage/rocksdb')
-rw-r--r--storage/rocksdb/ha_rocksdb_proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/rocksdb/ha_rocksdb_proto.h b/storage/rocksdb/ha_rocksdb_proto.h
index deb65edddd3..08afd9780be 100644
--- a/storage/rocksdb/ha_rocksdb_proto.h
+++ b/storage/rocksdb/ha_rocksdb_proto.h
@@ -43,7 +43,7 @@ void rdb_handle_io_error(const rocksdb::Status status,
#if defined(__clang__)
MY_ATTRIBUTE((optnone));
#else
- MY_ATTRIBUTE((optimize("O0")));
+ MY_ATTRIBUTE((noinline,noclone));
#endif
int rdb_normalize_tablename(const std::string &tablename, std::string *str)