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
The mojo runtime does not provide an error handling mechanism for failed allocations. I expect to be able one of the following to happen:
The returned pointer is null.
memory.memory._malloc raises, meaning that all methods which can allocate also raise.
Steps to reproduce
Run the following program on system with less than 256 GB of memory (vm.overcommit_memory=0 or vm.overcommit_memory=2, vm.overcommit_memory=1 will produce a segfault while walking the array):
Bug description
The mojo runtime does not provide an error handling mechanism for failed allocations. I expect to be able one of the following to happen:
memory.memory._malloc
raises, meaning that all methods which can allocate also raise.Steps to reproduce
Run the following program on system with less than 256 GB of memory (vm.overcommit_memory=0 or vm.overcommit_memory=2, vm.overcommit_memory=1 will produce a segfault while walking the array):
If you use
mojo run
, you getLLVM ERROR: out of memory
. If you usemojo build
, you get:Here's a C program that works as I expect:
System information
The text was updated successfully, but these errors were encountered: