• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37881
77%

Build:
DEFAULT BRANCH: master
Ran 25 Aug 2024 11:22AM UTC
Jobs 1
Files 359
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Aug 2024 03:35AM UTC coverage: 85.137% (-2.1%) from 87.259%
#37881

push

local

web-flow
Fix self-recursion in generic triangular (l/r)mul! (#55547)

This fixes a stack-overflow in the following:
```julia
julia> using LinearAlgebra

julia> struct MyTriangularWithoutLRMul{T, A<:LinearAlgebra.AbstractTriangular{T}} <: LinearAlgebra.AbstractTriangular{T}
           data :: A
       end

julia> Base.size(A::MyTriangularWithoutLRMul) = size(A.data)

julia> Base.getindex(A::MyTriangularWithoutLRMul, i::Int, j::Int) = A.data[i,j]

julia> M = MyTriangularWithoutLRMul(UpperTriangular(rand(4,4)));

julia> A = rand(4,4);

julia> lmul!(M, A)
Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.
ERROR: StackOverflowError:
Stacktrace:
     [1] unsafe_copyto!
       @ ./genericmemory.jl:122 [inlined]
     [2] _copyto_impl!
       @ ./array.jl:308 [inlined]
     [3] copyto!
       @ ./array.jl:299 [inlined]
     [4] copyto!
       @ ./array.jl:322 [inlined]
     [5] _trimul!(C::Matrix{Float64}, A::MyTriangularWithoutLRMul{Float64, UpperTriangular{Float64, Matrix{Float64}}}, B::Matrix{Float64})
       @ LinearAlgebra ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/LinearAlgebra/src/triangular.jl:961
     [6] lmul!(A::MyTriangularWithoutLRMul{Float64, UpperTriangular{Float64, Matrix{Float64}}}, B::Matrix{Float64})
       @ LinearAlgebra ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/LinearAlgebra/src/triangular.jl:982--- the above 2 lines are repeated 39990 more times ---
```
This is done by rerouting the generic `lmul!`/`rmul!` methods to those
for `UpperTriangular` or `LowerTriangular`, depending on which
triangular half is populated.

A similar issue with `ldiv!`/`rdiv!` is also resolved.

16 of 16 new or added lines in 1 file covered. (100.0%)

2397 existing lines in 73 files now uncovered.

75732 of 88953 relevant lines covered (85.14%)

14910158.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #37881.1 25 Aug 2024 11:22AM UTC 0
85.14
Source Files on build #37881
Detailed source file information is not available for this build.
  • Back to Repo
  • eb5587da on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc