Skip to content

Backslash operator on bad inputs causes segfaults #62

@GeorgeXing

Description

@GeorgeXing

Using the \ operator on matrices with unequal numbers of rows causes segfaults to appear (not always in the same place). An example transcript:

julia> A = rand(2,3); b = rand(1,4)
0.91206938232058632 0.54042487514107229 0.06639860694511301 0.45407035177558663 

julia> A \ b
2.12491438834975988 0.29000399043165048 -0.44064826960265002 1.10118494911718057 

julia> A
0.41408160823125217 0.12696871086821648 0.0105299806962571 
0.34489290137506634 0.80644665662943371 0.96747404070762699 

julia> A[:,:]
0.41408160823125217 0.12696871086821648 0.0105299806962571 
0.34489290137506634 0.80644665662943371 0.96747404070762699 

julia> b
0.91206938232058632 0.54042487514107229 0.06639860694511301 0.45407035177558663 

julia> b[:,:]Segmentation fault

(Often, this will segfault on the A[:,:] call, and it sometimes doesn't segfault at all.) I suspect that this is simply a result of the code for the \ operator not checking that the inputs have the same number of rows.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions