Class: FiberAudit::Static::Rules::IOSelect
- Defined in:
- lib/fiber_audit/static/rules/io_select.rb
Overview
FA1005: Detects explicit IO.select calls that may bypass scheduler-aware I/O and block the scheduler thread.
Constant Summary collapse
- TITLE =
'Explicit IO.select call'- CATEGORY =
:blocking_io- MESSAGE =
'IO.select may bypass scheduler-aware I/O and block the thread running the fiber scheduler.'- REMEDIATION =
'Use scheduler-aware I/O APIs or allow the active Fiber scheduler to manage readiness.'- TARGETS =
{ 'IO' => :select, 'Kernel' => :select }.freeze
Constants inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
confidence, default_confidence, default_severity, description, id, #initialize, severity
Constructor Details
This class inherits a constructor from FiberAudit::Static::Rules::Base
Class Method Details
.category ⇒ Object
32 |
# File 'lib/fiber_audit/static/rules/io_select.rb', line 32 def category = CATEGORY |
.title ⇒ Object
31 |
# File 'lib/fiber_audit/static/rules/io_select.rb', line 31 def title = TITLE |
Instance Method Details
#analyze(call_sites:) ⇒ Object
35 36 37 |
# File 'lib/fiber_audit/static/rules/io_select.rb', line 35 def analyze(call_sites:) call_sites.filter_map { |site| match(site) } end |