Description of problem: I wrote some misguided perl 5 code to search for trailing space which causes the RAM consumption to balloon and the system to freeze. Tried doing ulimit -Hm $((3500 * 1024)) in zsh and it did not help: The code is: ``` #!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; # TEST like( scalar(`ag -s '[ \\t]' .`), qr#\A[\r\n]*\z#, "No trailing space was found." ); ``` Version-Release number of selected component (if applicable): mga7 How reproducible: always Steps to Reproduce: 1. urpmi perl perl-Test-More the_silver_searcher 2. Run the code e.g in a https://github.com/shlomif/freecell-pro-0fc-deals clone. I have 7-8 GB of ram and 64 gb of swap. 3.
Assigning to the kernel maintainers, because Shlomi assigned it to kernel-5.1.11-1.mga7.src.rpm
Assignee: bugsquad => kernelCC: (none) => marja11
Replying to myself, I'd like to note that using "ulimit -H -d" appears to help: ``` ulimit -H -d $((1000 * 1000)) perl ~/consume-ram.pl ``` maybe "-m" is not enforced.