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

Crash when overloading * on a simple type #31264

Closed
dpsanders opened this issue Mar 5, 2019 · 2 comments
Closed

Crash when overloading * on a simple type #31264

dpsanders opened this issue Mar 5, 2019 · 2 comments

Comments

@dpsanders
Copy link
Contributor

I did the overloading wrong, but this should give me a StackOverflow instead of crashing:

julia> struct MyType
       val
       end

julia> Base.:*(x::MyType, y) = MyType(x.val) * y

julia> x = MyType(3)
MyType(3)

julia> y = 4
4

julia> x * y
Bus error: 10
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
@yuyichao
Copy link
Contributor

yuyichao commented Mar 5, 2019

99% dup of #17109

@yuyichao
Copy link
Contributor

yuyichao commented Mar 5, 2019

Stack overflows on linux so yes this is a dup.

@yuyichao yuyichao closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants