New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Fri May 3 18:45:58 UTC 2024
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
3 new defect(s) introduced to LibreOffice found with Coverity Scan.
5 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1585038: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2943 in boost::container::vector<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, void>::priv_insert_forward_range_expand_forward<boost::container::dtl::insert_range_proxy<boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>, std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *>>(std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, unsigned long, T1, boost::move_detail::integral_constant<bool, (bool)0>)()
________________________________________________________________________________________________________
*** CID 1585038: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2943 in boost::container::vector<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, void>::priv_insert_forward_range_expand_forward<boost::container::dtl::insert_range_proxy<boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>, std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *>>(std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, unsigned long, T1, boost::move_detail::integral_constant<bool, (bool)0>)()
2937
2938 template <class InsertionProxy>
2939 BOOST_CONTAINER_FORCEINLINE void priv_insert_forward_range_expand_forward(T* const raw_pos, const size_type n, InsertionProxy insert_range_proxy, dtl::false_type)
2940 {
2941 //There is enough memory
2942 boost::container::expand_forward_and_insert_alloc
>>> CID 1585038: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "insert_range_proxy" is passed-by-value as parameter to "expand_forward_and_insert_alloc" when it could be moved instead.
2943 ( this->m_holder.alloc(), raw_pos, this->priv_raw_end(), n, insert_range_proxy);
2944 this->m_holder.inc_stored_size(n);
2945 }
2946
2947 template <class InsertionProxy>
2948 void priv_insert_forward_range_new_allocation
** CID 1584285: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2957 in boost::container::vector<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, void>::priv_insert_forward_range_new_allocation<boost::container::dtl::insert_range_proxy<boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>, std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *>>(std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, unsigned long, std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, unsigned long, T1)()
________________________________________________________________________________________________________
*** CID 1584285: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 2957 in boost::container::vector<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, void>::priv_insert_forward_range_new_allocation<boost::container::dtl::insert_range_proxy<boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>, std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *>>(std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, unsigned long, std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, unsigned long, T1)()
2951 //n can be zero, if we want to reallocate!
2952 allocator_type &a = this->m_holder.alloc();
2953 T * const raw_old_buffer = this->priv_raw_begin();
2954
2955 typename value_traits::ArrayDeallocator new_buffer_deallocator(new_start, a, new_cap);
2956 boost::container::uninitialized_move_and_insert_alloc
>>> CID 1584285: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "insert_range_proxy" is passed-by-value as parameter to "uninitialized_move_and_insert_alloc" when it could be moved instead.
2957 (a, raw_old_buffer, pos, this->priv_raw_end(), new_start, n, insert_range_proxy);
2958 new_buffer_deallocator.release();
2959
2960 //Destroy and deallocate old elements
2961 if(raw_old_buffer){
2962 BOOST_IF_CONSTEXPR(!has_trivial_destructor_after_move<value_type>::value)
** CID 1583837: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 1985 in boost::container::vector<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, void>::insert<boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>>(boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>, T1, T1, boost::move_detail::disable_if_or<void, boost::move_detail::is_convertible<T1, unsigned long>, boost::container::dtl::is_input_iterator<T1, (boost::container::dtl::has_iterator_category<T1>::value)>, boost::move_detail::bool_<(bool)0>, boost::move_detail::bool_<(bool)0>>::type *)()
________________________________________________________________________________________________________
*** CID 1583837: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
/usr/include/boost/container/vector.hpp: 1985 in boost::container::vector<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::small_vector_allocator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>, boost::container::new_allocator<void>, void>, void>::insert<boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>>(boost::container::vec_iterator<std::shared_ptr<cppuhelper::ServiceManager::Data::Implementation> *, (bool)1>, T1, T1, boost::move_detail::disable_if_or<void, boost::move_detail::is_convertible<T1, unsigned long>, boost::container::dtl::is_input_iterator<T1, (boost::container::dtl::has_iterator_category<T1>::value)>, boost::move_detail::bool_<(bool)0>, boost::move_detail::bool_<(bool)0>>::type *)()
1979 const typename iterator_traits<FwdIt>::size_type sz = boost::container::iterator_distance(first, last);
1980 if (sz > size_type(-1)){
1981 boost::container::throw_length_error("vector::insert, FwdIt's max length reached");
1982 }
1983
1984 dtl::insert_range_proxy<allocator_type, FwdIt, T*> proxy(first);
>>> CID 1583837: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
>>> "proxy" is passed-by-value as parameter to "priv_insert_forward_range" when it could be moved instead.
1985 return this->priv_insert_forward_range(vector_iterator_get_ptr(pos), static_cast<size_type>(sz), proxy);
1986 }
1987 #endif
1988
1989 //! <b>Requires</b>: p must be a valid iterator of *this. num, must
1990 //! be equal to boost::container::iterator_distance(first, last)
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DhVvB_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtFNDLAppiLTbBsg27ede1iYJw4HcKOMvHi05WIM0IrZcUfuD0hNNl18-2F09-2F0ROVNkSzcC4jKOkZekMyDtNLnzMqkyzKkqvdWhTVTOmd9Gqggy7y6aGc-2B7S0ysKYVrWw-2FQtYXInh8x40579iOKFiL5qnrOQ-2FitapH3j-2FnVDgfsS7k-3D
More information about the LibreOffice
mailing list