Class: HotCell::Fixtures::StarvedSpawn

Inherits:
Operation
  • Object
show all
Defined in:
lib/hot_cell/test_operations.rb

Overview

A tool spawn that fails because the host is out of memory. fork raises Errno::ENOMEM under host pressure, before the tool has read a byte of the input, so this is the cell having a bad moment rather than a decompression bomb — and it must not be recorded as a permanent memory verdict.

Constant Summary

Constants inherited from Operation

Operation::READ_BYTES

Instance Method Summary collapse

Methods inherited from Operation

abstract_operation, abstract_operation?, before_fork, before_worker_boot, inherited, limits, operation, operation_name, #run_tool, unreadable

Instance Method Details

#perform(_inputs, _outputs) ⇒ Object

Raises:

  • (Errno::ENOMEM)


162
163
164
# File 'lib/hot_cell/test_operations.rb', line 162

def perform(_inputs, _outputs)
  raise Errno::ENOMEM, "Cannot allocate memory - fork(2)"
end