You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@value
struct MyPet:
var name: String
var age: Int
fn __del__(owned self):
print("Destruct", self.name)
fn pets():
var a = MyPet("Loki", 4)
var b = MyPet("Sylvie", 2)
print(a.name)
# a.__del__() runs here for "Loki"
a = MyPet("Charlie", 8)
# a.__del__() runs immediately because "Charlie" is never used
print(b.name)
# b.__del__() runs here
fn main():
pets()
mojo main.mojo runs and crashes
Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file Casting.h, line 566.
Please submit a bug report to https://github.com/modularml/mojo/issues and include the crash backtrace along with all the relevant source codes.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 mojo 0x000000010435bc88 llvm_strlcpy + 54448
1 mojo 0x0000000104359de8 llvm_strlcpy + 46608
2 mojo 0x000000010435c328 llvm_strlcpy + 56144
3 libsystem_platform.dylib 0x000000019050b584 _sigtramp + 56
4 libsystem_pthread.dylib 0x00000001904dac20 pthread_kill + 288
5 libsystem_c.dylib 0x00000001903e7a20 abort + 180
6 libsystem_c.dylib 0x00000001903e6d10 err + 0
7 mojo 0x0000000106e1f8e8 mbedtls_ssl_handshake_server_step + 33192060
8 mojo 0x00000001055ebd90 mbedtls_ssl_handshake_server_step + 7814436
9 mojo 0x00000001055eb880 mbedtls_ssl_handshake_server_step + 7813140
10 mojo 0x00000001055ea780 mbedtls_ssl_handshake_server_step + 7808788
11 mojo 0x00000001055e9460 mbedtls_ssl_handshake_server_step + 7803892
12 mojo 0x00000001055e8da8 mbedtls_ssl_handshake_server_step + 7802172
13 mojo 0x00000001055e1144 mbedtls_ssl_handshake_server_step + 7770328
14 mojo 0x00000001069ff5b0 mbedtls_ssl_handshake_server_step + 28865860
15 mojo 0x00000001069ffc08 mbedtls_ssl_handshake_server_step + 28867484
16 mojo 0x0000000106a01cbc mbedtls_ssl_handshake_server_step + 28875856
17 mojo 0x00000001056369d8 mbedtls_ssl_handshake_server_step + 8120684
18 mojo 0x0000000104751c60 llvm_strlcpy + 4207752
19 mojo 0x0000000105636020 mbedtls_ssl_handshake_server_step + 8118196
20 mojo 0x0000000105635b60 mbedtls_ssl_handshake_server_step + 8116980
21 mojo 0x0000000105db44b8 mbedtls_ssl_handshake_server_step + 15975500
22 mojo 0x0000000105db4260 mbedtls_ssl_handshake_server_step + 15974900
23 mojo 0x0000000105db42fc mbedtls_ssl_handshake_server_step + 15975056
24 libsystem_pthread.dylib 0x00000001904daf94 _pthread_start + 136
25 libsystem_pthread.dylib 0x00000001904d5d34 thread_start + 8
0x107cb9300 crashed!
Please file a bug report.
[44504:795347:20240425,234857.980957:WARNING crash_report_exception_handler.cc:257] UniversalExceptionRaise: (os/kern) failure (5)
zsh: abort mojo main.mojo
Bug description
mojo main.mojo
runs and crashesSteps to reproduce
mojo main.mojo
runs and crashesSystem information
The text was updated successfully, but these errors were encountered: