Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM's libunwind crashes in an ASAN build with "getRegister - unsupported x86_64 register" #7092

Closed
mbautin opened this issue Feb 3, 2021 · 2 comments
Assignees

Comments

@mbautin
Copy link
Contributor

mbautin commented Feb 3, 2021

Repro:

./yb_build.sh --clang11 asan --cxx-test pg_libpq-test --gtest_filter PgLibPqTest.ConcurrentInsertTruncateForeignKey

[m-1] W0203 22:31:12.307447 20568 long_operation_tracker.cc:113] ScopedRWOperation running for 3.003s:
[m-1]     @     0x7f3ebff903ff 
[m-1]     @     0x7f3ee34465dd  internal_syscall<unsigned long, int, __sanitizer::MutexState, int, int, int> (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_syscall_linux_x86_64.inc:73)
[m-1]     @     0x7f3ee34465dd  Lock (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:664)
[m-1]     @     0x7f3ee3465ebf  GenericScopedLock (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_mutex.h:183)
[m-1]     @     0x7f3ee3465ebf  GetFromAllocator (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_allocator_primary64.h:146)
[m-1]     @     0x7f3ee3465dc2  Refill (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_allocator_local_cache.h:102)
[m-1]     @     0x7f3ee3465a3e  Allocate (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_allocator_local_cache.h:38)
[m-1]     @     0x7f3ee3465a3e  Allocate (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_allocator_combined.h:69)
[m-1]     @     0x7f3ee3461133  Allocate (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp:469)
[m-1]     @     0x7f3ee3461cd9  asan_memalign (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/asan_allocator.cpp:952)
[m-1]     @     0x7f3ee34e5c72  operator new (/opt/yb-build/llvm/yb-llvm-v11.0.0-1607398732-build/src/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:99)
[m-1]     @     0x7f3eda015840  std::__libcpp_allocate(unsigned long, unsigned long) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210129065108-35a57c6c37-centos7-clang11/installed/asan/libcxx/include/c++/v1/new:253)
[m-1]     @     0x7f3eda285e35  std::allocator<std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*> >::allocate(unsigned long) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210129065108-35a57c6c37-centos7-clang11/installed/asan/libcxx/include/c++/v1/memory:1789)
[m-1]     @     0x7f3eda285be0  std::allocator_traits<std::allocator<std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*> > >::allocate(std::allocator<std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*> >&, unsigned long) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210129065108-35a57c6c37-centos7-clang11/installed/asan/libcxx/include/c++/v1/memory:1525)
[m-1]     @     0x7f3eda289bd9  unique_ptr<std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*>, std::__tree_node_destructor<std::allocator<std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*> > > > std::__tree<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::__map_value_compare<yb::docdb::PrimitiveValue, std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::less<yb::docdb::PrimitiveValue>, true>, std::allocator<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument> > >::__construct_node<yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument>(yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument&&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210129065108-35a57c6c37-centos7-clang11/installed/asan/libcxx/include/c++/v1/__tree:2193)
[m-1]     @     0x7f3eda289981  std::pair<std::__tree_iterator<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*>*, long>, bool> std::__tree<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::__map_value_compare<yb::docdb::PrimitiveValue, std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::less<yb::docdb::PrimitiveValue>, true>, std::allocator<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument> > >::__emplace_unique_key_args<yb::docdb::PrimitiveValue, yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument>(yb::docdb::PrimitiveValue const&, yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument&&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210129065108-35a57c6c37-centos7-clang11/installed/asan/libcxx/include/c++/v1/__tree:2139)
[m-1]     @     0x7f3eda2897ec  std::enable_if<__can_extract_map_key<yb::docdb::PrimitiveValue const&, yb::docdb::PrimitiveValue, std::pair<yb::docdb::PrimitiveValue const, yb::docdb::SubDocument> >::value, std::pair<std::__tree_iterator<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*>*, long>, bool> >::type std::__tree<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::__map_value_compare<yb::docdb::PrimitiveValue, std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::less<yb::docdb::PrimitiveValue>, true>, std::allocator<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument> > >::__emplace_unique<yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument>(yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument&&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210129065108-35a57c6c37-centos7-clang11/installed/asan/libcxx/include/c++/v1/__tree:1182)
[m-1]     @     0x7f3eda282d19  std::pair<std::__map_iterator<std::__tree_iterator<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, std::__tree_node<std::__value_type<yb::docdb::PrimitiveValue, yb::docdb::SubDocument>, void*>*, long> >, bool> std::map<yb::docdb::PrimitiveValue, yb::docdb::SubDocument, std::less<yb::docdb::PrimitiveValue>, std::allocator<std::pair<yb::docdb::PrimitiveValue const, yb::docdb::SubDocument> > >::emplace<yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument>(yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument&&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210129065108-35a57c6c37-centos7-clang11/installed/asan/libcxx/include/c++/v1/map:1150)
[m-1]     @     0x7f3eda27f704  yb::docdb::SubDocument::SetChild(yb::docdb::PrimitiveValue const&, yb::docdb::SubDocument&&) (src/yb/docdb/subdocument.cc:235)
[m-1] libunwind: getRegister - unsupported x86_64 register
[m-1] *** Aborted at 1612391484 (unix time) try "date -d @1612391484" if you are using GNU date ***
[m-1] PC: @                0x0 (unknown)
[m-1] libunwind: getRegister - unsupported x86_64 register
@mbautin mbautin self-assigned this Feb 3, 2021
@mbautin mbautin changed the title libunwind crashes in an ASAN build with "getRegister - unsupported x86_64 register" LLVM's libunwind crashes in an ASAN build with "getRegister - unsupported x86_64 register" Jun 5, 2021
@mbautin
Copy link
Contributor Author

mbautin commented Sep 18, 2021

Also happened in initdb on AlmaLinux 8 with Clang 12, also in ASAN.

[m-1] W0918 06:29:21.332002  2017 long_operation_tracker.cc:113] ScopedRWOperation running for 3.000s in thread 2200:
[m-1]     @     0x7f7b7b7723ff
[m-1]     @     0x7f7b974e133e  google::protobuf::internal::WireFormatLite::MessageSize(google::protobuf::MessageLite const&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210916160348-44ba371965-almalinux8-x86_64-clang12/installed/asan/include/google/protobuf/wire_format_lite_inl.h:1020)
[m-1]     @     0x7f7b7dff88a1  yb::PgsqlWriteRequestPB::ByteSizeLong() const (src/yb/common/pgsql_protocol.pb.cc:5279)
[m-1]     @     0x7f7b974e1354  google::protobuf::internal::WireFormatLite::MessageSize(google::protobuf::MessageLite const&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210916160348-44ba371965-almalinux8-x86_64-clang12/installed/asan/include/google/protobuf/wire_format_lite_inl.h:1020)
[m-1]     @     0x7f7b8aebd641  yb::tserver::WriteRequestPB::ByteSizeLong() const (src/yb/tserver/tserver.pb.cc:2334)
[m-1]     @     0x7f7ba2cb7794  yb::master::SysCatalogTable::CopyPgsqlTables(std::vector<string, std::allocator<string > > const&, std::vector<string, std::allocator<string > > const&, long) (src/yb/master/sys_catalog.cc:1221)
[m-1]     @     0x7f7ba284b252  yb::master::CatalogManager::CopyPgsqlSysTables(string const&, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > > const&) (src/yb/master/catalog_manager.cc:2745)
[m-1]     @     0x7f7ba2895e10  yb::master::CatalogManager::ProcessPendingNamespace(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata) (src/yb/master/catalog_manager.cc:6452)
[m-1]     @     0x7f7ba29d674a  decltype(*(std::forward<yb::master::CatalogManager*&>(fp0)).*fp(std::forward<string&>(fp1), std::forward<std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >&>(fp1), std::forward<yb::TransactionMetadata&>(fp1))) std::__invoke<void (yb::master::Catal
ogManager::*&)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), yb::master::CatalogManager*&, string&, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >&, yb::TransactionMetadata&, void>
(void (yb::master::CatalogManager::*&)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), yb::master::CatalogManager*&, string&, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >&, yb::Tra
nsactionMetadata&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210916160348-44ba371965-almalinux8-x86_64-clang12/installed/asan/libcxx/include/c++/v1/type_traits:3635)
[m-1]     @     0x7f7ba29d6579  std::__bind_return<void (yb::master::CatalogManager::*)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), tuple<yb::master::CatalogManager*, string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocat
or<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata>, tuple<>, __is_valid_bind_return<void (yb::master::CatalogManager::*)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), tuple<yb::master::CatalogManager*, string, std::vecto
r<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata>, tuple<> >::value>::type std::__apply_functor<void (yb::master::CatalogManager::*)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::Transactio
nMetadata), tuple<yb::master::CatalogManager*, string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata>, 0ul, 1ul, 2ul, 3ul, tuple<> >(void (yb::master::CatalogManager::*&)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scope
d_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), tuple<yb::master::CatalogManager*, string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata>&, std::__tuple_indices<0ul, 1ul, 2ul, 3ul>, tuple<>&&) (/opt/yb-build/thirdparty/yugabyte-db-thi
rdparty-v20210916160348-44ba371965-almalinux8-x86_64-clang12/installed/asan/libcxx/include/c++/v1/functional:2857)
[m-1]     @     0x7f7ba29d64a3  std::__bind_return<void (yb::master::CatalogManager::*)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), tuple<yb::master::CatalogManager*, string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocat
or<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata>, tuple<>, __is_valid_bind_return<void (yb::master::CatalogManager::*)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), tuple<yb::master::CatalogManager*, string, std::vecto
r<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata>, tuple<> >::value>::type std::__bind<void (yb::master::CatalogManager::*)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata
), yb::master::CatalogManager*, string const&, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >&, yb::TransactionMetadata&>::operator()<>() (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210916160348-44ba371965-almalinux8-x86_64-clang12/installed/asan/libcxx/include/c++/v
1/functional:2890)
[m-1]     @     0x7f7ba29d619c  yb::RunnableImpl<std::__bind<void (yb::master::CatalogManager::*)(string, std::vector<scoped_refptr<yb::master::TableInfo>, std::allocator<scoped_refptr<yb::master::TableInfo> > >, yb::TransactionMetadata), yb::master::CatalogManager*, string const&, std::vector<scoped_refptr<yb::master::TableInfo>, s
td::allocator<scoped_refptr<yb::master::TableInfo> > >&, yb::TransactionMetadata&> >::Run() (src/yb/util/threadpool.h:76)
[m-1]     @     0x7f7b855fb339  yb::ThreadPool::DispatchThread(bool) (src/yb/util/threadpool.cc:611)
[m-1]     @     0x7f7b8561fa18  decltype(*(std::forward<yb::ThreadPool*&>(fp0)).*fp(std::forward<bool&>(fp1))) std::__invoke<void (yb::ThreadPool::*&)(bool), yb::ThreadPool*&, bool&, void>(void (yb::ThreadPool::*&)(bool), yb::ThreadPool*&, bool&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210916160348-44ba371965-almalinux8-
x86_64-clang12/installed/asan/libcxx/include/c++/v1/type_traits:3635)
[m-1]     @     0x7f7b8561f952  std::__bind_return<void (yb::ThreadPool::*)(bool), tuple<yb::ThreadPool*, bool>, tuple<>, __is_valid_bind_return<void (yb::ThreadPool::*)(bool), tuple<yb::ThreadPool*, bool>, tuple<> >::value>::type std::__apply_functor<void (yb::ThreadPool::*)(bool), tuple<yb::ThreadPool*, bool>, 0ul, 1ul, tuple<> >(
void (yb::ThreadPool::*&)(bool), tuple<yb::ThreadPool*, bool>&, std::__tuple_indices<0ul, 1ul>, tuple<>&&) (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210916160348-44ba371965-almalinux8-x86_64-clang12/installed/asan/libcxx/include/c++/v1/functional:2857)
[m-1]     @     0x7f7b8561f8b3  std::__bind_return<void (yb::ThreadPool::*)(bool), tuple<yb::ThreadPool*, bool>, tuple<>, __is_valid_bind_return<void (yb::ThreadPool::*)(bool), tuple<yb::ThreadPool*, bool>, tuple<> >::value>::type std::__bind<void (yb::ThreadPool::* const&)(bool), yb::ThreadPool* const&, bool const&>::operator()<>()
 (/opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20210916160348-44ba371965-almalinux8-x86_64-clang12/installed/asan/libcxx/include/c++/v1/functional:2890)
[m-1] I0918 06:29:23.525223  2200 sys_catalog.cc:1227] CopyPgsqlTables: Batch# 4 copied 3712 rows with 524.87 KB bytes
[m-1] W0918 06:29:24.165827  2200 long_operation_tracker.cc:142] ScopedRWOperation took a long time: 5.833s
[m-1] I0918 06:29:26.439229  2200 sys_catalog.cc:1227] CopyPgsqlTables: Batch# 5 copied 3840 rows with 548.74 KB bytes
[m-1] I0918 06:29:29.699800  2200 sys_catalog.cc:1227] CopyPgsqlTables: Batch# 6 copied 1408 rows with 545.91 KB bytes
[m-1] libunwind: getRegister - unsupported x86_64 register
[m-1] *** Aborted at 1631946569 (unix time) try "date -d @1631946569" if you are using GNU date ***
[m-1] PC: @                0x0 (unknown)
[m-1] libunwind: getRegister - unsupported x86_64 register
I0918 06:29:30.818650  1981 tcp_stream.cc:321] { local: 127.0.0.1:4

@mbautin
Copy link
Contributor Author

mbautin commented Sep 18, 2021

Potentially related fix: https://reviews.llvm.org/D66685

mbautin added a commit to yugabyte/yugabyte-db-thirdparty that referenced this issue Oct 4, 2021
mbautin added a commit to mbautin/yugabyte-db that referenced this issue Oct 30, 2021
…ugabyte#10230] [yugabyte#10251] [yugabyte#10295] Enable Clang 12 ASAN build on AlmaLinux 8 and fix relevant bugs

Summary:
Enabling the Clang 12 ASAN build on AlmaLinux 8 and fixing these bugs from that build:
- yugabyte#7092 - pick up an updated version of LLVM where libunwind has been patched to work around crashing with an unknown x86_64 register error.
- yugabyte#10046 - suppress harmless undefined behavior in gflags.cc.
- yugabyte#10222 - increase the timeout for waiting for tablet server registration in mini cluster.
- yugabyte#10224 - when looping to wait for leader/follower of a tablet in TestUpdateLagMetrics, reset tablet server pointers to nullptr at every iteration.
- yugabyte#10230, yugabyte#10251 - use posix_spawn on Linux to create subprocesses to avoid getting stuck in the child process when allocating memory when setting environment variables because some memory allocation lock is already held by the parent process. On macOS, we still use fork+exec because posix_spawnp throws errors related to closing file descriptors. Making sure all files in our code are opened with FD_CLOEXEC is out of scope of this revision, and will be addressed by yugabyte#10321.
- yugabyte#10295 - fix undefined behavior (adding to a null pointer) in a Postgres sorting function.

Also removing Clang 7 ASAN build on CentOS 7 from Jenkins (we don't need two ASAN builds).

Test Plan: Jenkins

Reviewers: bogdan, steve.varnau, sergei

Reviewed By: sergei

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D13301
mbautin added a commit that referenced this issue Oct 30, 2021
…Clang 12 ASAN build on AlmaLinux 8 and fix relevant bugs

Summary:
Updating third-party dependencies from 44ba3719652858e1f7816df87b25101e09527c88 to 2d282c38cfcbc10af7bdc1c86bf1e8af88f36efd (updating the LLVM toolchain with a bug fix, and also picking up the program_options Boost library addition by @mikhpolitov, commit yugabyte/yugabyte-db-thirdparty@2d282c3).

yugabyte-db-thirdparty diff link:
https://github.com/yugabyte/yugabyte-db-thirdparty/compare/44ba3719652858e1f7816df87b25101e09527c88..2d282c38cfcbc10af7bdc1c86bf1e8af88f36efd

Enabling the Clang 12 ASAN build on AlmaLinux 8 and fixing these bugs from that build:
- #7092 - pick up an updated version of LLVM where libunwind has been patched to work around crashing with an unknown x86_64 register error.
- #10046 - suppress harmless undefined behavior in gflags.cc.
- #10222 - increase the timeout for waiting for tablet server registration in mini cluster.
- #10224 - when looping to wait for leader/follower of a tablet in TestUpdateLagMetrics, reset tablet server pointers to nullptr at every iteration.
- #10230, #10251 - use posix_spawn on Linux to create subprocesses to avoid getting stuck in the child process when allocating memory when setting environment variables because some memory allocation lock is already held by the parent process. On macOS, we still use fork+exec because posix_spawnp throws errors related to closing file descriptors. Making sure all files in our code are opened with FD_CLOEXEC is out of scope of this revision, and will be addressed by #10321.
- #10295 - fix undefined behavior (adding to a null pointer) in a Postgres sorting function.
- Fix HostPort& field type in ysql_upgrade.h (make it HostPort). Otherwise there is an ASAN issue accessing a deallocated stack value. (No separate GitHub issue for this bug.)

Also consolidating Status generation from a C standard library error number in errno.h and errno.c, and adding a few utility macros for convenient invocation of C functions that either return an errno as the return value, or return zero vs. non zero depending on whether there is an error, and set errno as a side effect.

As part of this diff, we are removing Clang 7 ASAN build on CentOS 7 from Jenkins (we don't need two different ASAN builds).

Test Plan: Jenkins

Reviewers: bogdan, steve.varnau, sergei

Reviewed By: sergei

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D13301
@mbautin mbautin closed this as completed Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant