JuliaLang/julia

Displaying array with unsigned indices throws

Aperta

#53.907 aperta il 31 mar 2024

 (3 commenti) (0 reazioni) (0 assegnatari)Julia (5773 fork)batch import
display and printinggood first issue

Metriche repository

Star
 (48.709 stelle)
Metriche merge PR
 (Merge medio 20g 6h) (157 PR mergiate in 30 g)

Descrizione

In the spirit of #44895, displaying an AbstractArray subtype with unsigned indices can throw an OutOfMemory exception. The offending lines are https://github.com/JuliaLang/julia/blob/a3f710e2a35402bb7f7f96f874e6c696dfc911da/base/arrayshow.jl#L138-L141 The max(0, difference of unsigned) is obviously not safe.

Guida contributor