Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backslash operator on bad inputs causes segfaults #62

Closed
GeorgeXing opened this issue Jun 19, 2011 · 0 comments
Closed

Backslash operator on bad inputs causes segfaults #62

GeorgeXing opened this issue Jun 19, 2011 · 0 comments
Assignees
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@GeorgeXing
Copy link
Contributor

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.

@GeorgeXing GeorgeXing reopened this Jun 19, 2011
@ghost ghost assigned GeorgeXing Jun 19, 2011
StefanKarpinski pushed a commit that referenced this issue Feb 8, 2018
Added Ptr{T}(0) -> zero(Ptr{T}) conversion
cmcaine pushed a commit to cmcaine/julia that referenced this issue Sep 24, 2020
Remove license info from README
LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants