Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1731214 Details for
Bug 1899888
Undefined behaviour when getting address in do_basic_transform leads to crash
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for the rpm generation until upstream fixes it.
0001-Add-patch-for-bug-in-locale.patch (text/plain), 3.18 KB, created by
Sebastien Gonzalve
on 2020-11-20 10:27:21 UTC
(
hide
)
Description:
patch for the rpm generation until upstream fixes it.
Filename:
MIME Type:
Creator:
Sebastien Gonzalve
Created:
2020-11-20 10:27:21 UTC
Size:
3.18 KB
patch
obsolete
>From d8059265aaedaafb0daf2dfdc5b6995fee76a761 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?S=C3=A9bastien=20Gonzalve?= > <sebastien.gonzalve@aliceadsl.fr> >Date: Sat, 14 Nov 2020 14:17:27 +0100 >Subject: [PATCH] Add patch for bug in locale. > >--- > ...-access-element-when-vector-is-empty.patch | 37 +++++++++++++++++++ > boost.spec | 4 ++ > 2 files changed, 41 insertions(+) > create mode 100644 boost-Do-not-try-to-access-element-when-vector-is-empty.patch > >diff --git a/boost-Do-not-try-to-access-element-when-vector-is-empty.patch b/boost-Do-not-try-to-access-element-when-vector-is-empty.patch >new file mode 100644 >index 0000000..f5cc981 >--- /dev/null >+++ b/boost-Do-not-try-to-access-element-when-vector-is-empty.patch >@@ -0,0 +1,37 @@ >+From daf4ef50c88c2b9a6bf2c40b537eebc202caad6e Mon Sep 17 00:00:00 2001 >+From: =?UTF-8?q?S=C3=A9bastien=20Gonzalve?= >+ <sebastien.gonzalve@aliceadsl.fr> >+Date: Sat, 14 Nov 2020 10:39:47 +0100 >+Subject: [PATCH] Do not try to access element when vector is empty >+ >+Trying to access tmp[0] causes a crash on Fedora when assertion on STL >+are enabled. >+ >+/usr/include/c++/10/bits/stl_vector.h:1045: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>; std::vector<_Tp, _Alloc>::reference = unsigned char&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. >+ >+This patch just passes nullptr as pointer to getSortKey() when tmp size >+is 0, preventing dereferencing elements in empty vector. >+ >+I guess that &tmp[0] should be optimized as 'no real access' when >+disabling assertion, but actually leads to crash when assert are >+enabled. >+--- >+ src/icu/collator.cpp | 2 +- >+ 1 file changed, 1 insertion(+), 1 deletion(-) >+ >+diff --git a/libs/locale/src/icu/collator.cpp b/libs/locale/src/icu/collator.cpp >+index 7f1ea6a..dc59e8c 100644 >+--- a/libs/locale/src/icu/collator.cpp >++++ b/libs/locale/src/icu/collator.cpp >+@@ -93,7 +93,7 @@ namespace boost { >+ std::vector<uint8_t> tmp; >+ tmp.resize(str.length()); >+ icu::Collator *collate = get_collator(level); >+- int len = collate->getSortKey(str,&tmp[0],tmp.size()); >++ int len = collate->getSortKey(str,tmp.empty()?nullptr:&tmp[0],tmp.size()); >+ if(len > int(tmp.size())) { >+ tmp.resize(len); >+ collate->getSortKey(str,&tmp[0],tmp.size()); >+-- >+2.26.2 >+ >diff --git a/boost.spec b/boost.spec >index f60b6b3..67ba261 100644 >--- a/boost.spec >+++ b/boost.spec >@@ -171,6 +171,9 @@ Patch92: boost-1.73-mpi-vector-data.patch > # https://github.com/boostorg/python/issues/325 > Patch93: boost-1.73-python3.10.patch > >+#https://github.com/boostorg/locale/issues/52 >+Patch94: boost-Do-not-try-to-access-element-when-vector-is-empty.patch >+ > %bcond_with tests > %bcond_with docs_generated > >@@ -688,6 +691,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x > %patch91 -p1 > %patch92 -p1 > %patch93 -p1 >+%patch94 -p1 > > %build > # Dump the versions being used into the build logs. >-- >2.26.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1899888
: 1731214