Skip to content

sim_irq: guard NULL pool in avr_irq_register_notify during reset - #584

Open
dmcgougan wants to merge 1 commit into
buserror:masterfrom
dmcgougan:fix-irq-null-pool-during-reset
Open

sim_irq: guard NULL pool in avr_irq_register_notify during reset#584
dmcgougan wants to merge 1 commit into
buserror:masterfrom
dmcgougan:fix-irq-null-pool-during-reset

Conversation

@dmcgougan

Copy link
Copy Markdown

Interrupt-vector IRQs are created with pool == NULL. avr_watchdog_reset() re-registers its notify hook from within avr_reset (while avr->resetting is set), so avr_irq_register_notify() dereferences irq->pool->avr->resetting on an IRQ whose pool is NULL and segfaults on any watchdog reset.

Guard the NULL pool so the reset path is safe; the resetting-time value/flag reset simply does not apply to pool-less IRQs.

Interrupt-vector IRQs are created with pool == NULL. avr_watchdog_reset()
re-registers its notify hook from within avr_reset (while avr->resetting is
set), so avr_irq_register_notify() dereferences irq->pool->avr->resetting on
an IRQ whose pool is NULL and segfaults on any watchdog reset.

Guard the NULL pool so the reset path is safe; the resetting-time value/flag
reset simply does not apply to pool-less IRQs.
@gatk555

gatk555 commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Please post code and instructions to reproduce the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants