Skip to content

Commit

Permalink
Prevent NPE in deallocate_pages (#688)
Browse files Browse the repository at this point in the history
Prevent NPE in `deallocate_pages`

If `deallocate_pages` is called on a job for which `allocate_pages`
has not been called (see `iterate_start_jobs` for conditions under
which this is true), `allocated_pages` is `None`, raising a NPE
when attempting to iterate.

In particular, this prevents `clear_queue` from working. In
practice, this problem readily occurs when starting a few jobs
and then calling `clear_queue`.
  • Loading branch information
p-e-w authored Dec 1, 2024
1 parent 663eea1 commit db78601
Show file tree
Hide file tree
Showing 2 changed files with 349 additions and 3 deletions.
Loading

0 comments on commit db78601

Please sign in to comment.