Nico Della Torre pushed to branch master at Debian Med / pbseqlib


Commits:
36ca473e by Nico Della Torre at 2026-11-20T11:10:58+01:00
Avoid operator[] past the end in GlobalChain

- - - - -
43b7ba74 by Nico Della Torre at 2026-11-20T16:33:15+01:00
Merge branch 'fix-globalchain-oob' into 'master'

Avoid operator[] past the end in GlobalChain

See merge request med-team/pbseqlib!1
- - - - -


3 changed files:

- debian/changelog
- + debian/patches/globalchain-empty-interval-oob.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+pbseqlib (5.3.5+dfsg-14) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add patch to avoid operator[] past the end of an empty interval in
+    GlobalChain, which made BLASR abort with _GLIBCXX_ASSERTIONS
+
+ -- Nico Della Torre <[email protected]>  Fri, 20 Nov 2026 11:10:58 +0100
+
 pbseqlib (5.3.5+dfsg-13) unstable; urgency=medium
 
   * Guard out-of-range reads when an anchor match list has exactly one entry


=====================================
debian/patches/globalchain-empty-interval-oob.patch
=====================================
@@ -0,0 +1,50 @@
+Description: Avoid operator[] on an empty interval in GlobalChain
+ The GlobalChain() wrappers and the RestrictedGlobalChain() callers take
+ the address of the first fragment with &v[start].  For an empty interval
+ start can be v.size(), and with _GLIBCXX_ASSERTIONS operator[] aborts
+ BLASR ("Assertion '__n < this->size()' failed") in the PBHoney tail
+ remapping step.  Use v.data() + start, which is valid there.
+Author: Nico Della Torre <[email protected]>
+Forwarded: not-needed
+Last-Update: 2026-11-20
+---
+--- a/alignment/algorithms/anchoring/FindMaxIntervalImpl.hpp
++++ b/alignment/algorithms/anchoring/FindMaxIntervalImpl.hpp
+@@ -568,7 +568,7 @@ int FastFindMaxIncreasingInterval(
+                 //  A different call that allows for indel penalties.
+                 //
+                 lisSize =
+-                    RestrictedGlobalChain(&pos[cur], next - cur, 0.1, 
lisIndices, scores, prevOpt);
++                    RestrictedGlobalChain(pos.data() + cur, next - cur, 0.1, 
lisIndices, scores, prevOpt);
+             }
+         }
+ 
+@@ -739,7 +739,7 @@ int ExhaustiveFindMaxIncreasingInterval(
+                 //  A different call that allows for indel penalties.
+                 //
+                 lisSize =
+-                    RestrictedGlobalChain(&pos[cur], next - cur, 0.1, 
lisIndices, scores, prevOpt);
++                    RestrictedGlobalChain(pos.data() + cur, next - cur, 0.1, 
lisIndices, scores, prevOpt);
+             }
+         }
+ 
+--- a/alignment/algorithms/anchoring/GlobalChainImpl.hpp
++++ b/alignment/algorithms/anchoring/GlobalChainImpl.hpp
+@@ -196,7 +196,7 @@ template <typename T_Fragment, typename
+ int GlobalChain(std::vector<T_Fragment> &fragments,
+                 std::vector<VectorIndex> &optFragmentChainIndices)
+ {
+-    return GlobalChain<T_Fragment, T_Endpoint>(&fragments[0], 
fragments.size(),
++    return GlobalChain<T_Fragment, T_Endpoint>(fragments.data(), 
fragments.size(),
+                                                optFragmentChainIndices);
+ }
+ 
+@@ -205,7 +205,7 @@ int GlobalChain(std::vector<T_Fragment>
+                 std::vector<VectorIndex> &optFragmentChainIndices,
+                 std::vector<T_Endpoint> *bufEndpointsPtr)
+ {
+-    return GlobalChain<T_Fragment, T_Endpoint>(&fragments[start], end - start,
++    return GlobalChain<T_Fragment, T_Endpoint>(fragments.data() + start, end 
- start,
+                                                optFragmentChainIndices, 
bufEndpointsPtr);
+ }
+ 


=====================================
debian/patches/series
=====================================
@@ -7,3 +7,4 @@ pbbam_2.3.0
 gcc-14.patch
 gcc-16.patch
 pbseqlib-findmaxinterval-size1-oob.patch
+globalchain-empty-interval-oob.patch



View it on GitLab: 
https://salsa.debian.org/med-team/pbseqlib/-/compare/72ab3c5f039b0c244783ea5334e9a43503b467e1...43b7ba74d1ae62cd75beeda9335ca964cad281cb

-- 
View it on GitLab: 
https://salsa.debian.org/med-team/pbseqlib/-/compare/72ab3c5f039b0c244783ea5334e9a43503b467e1...43b7ba74d1ae62cd75beeda9335ca964cad281cb
You're receiving this email because of your account on salsa.debian.org. Manage 
all notifications: https://salsa.debian.org/-/profile/notifications | Help: 
https://salsa.debian.org/help


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to