Vinay Sharma <vinay0410sha...@gmail.com> added the comment:

I have 8GB of ram and 128 GB of hard disk.

Now, creating a shared memory segment of size 10^12 (1 terabyte) somehow 
succeeds.

Creating a shared memory segment of 10^15 (1 petabyte), mmap (not ftruncate) 
throws an error stating cannot allocate memory.

Creating a shared memory segment of 10^18 (1 exabyte), causes the system to 
crash.

Now, I understand that this should be documented for a genuine user.

But, if documented this can be used by malicious softwares using python to 
crash systems abruptly.

Also, I understand that this is an issue with macos, but shouldn't python 
handle this so that atleast python's APIs are safe.

Creating shared memory segments of size 1 exabyte are not reasonable, but if 
some makes a mistake then, we must throw an error instead of a crash.

Also, can we set a max limit on creating shared memory segments to 1TB ?
because no one would genuinily need to create a segment of that size on a 
single machine.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39584>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to