Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Prevent memory allocation in signal handler #16384

Merged
merged 5 commits into from
Feb 20, 2018

Commits on Feb 14, 2018

  1. Prevent memory allocation in signal handler

    If the signal occurs when heap being inconsistent we should not
    use heap. We should call signal-safe functions only from signal handler.
    
    fix https://github.com/dotnet/coreclr/issues/16338
    mlabiuk committed Feb 14, 2018
    Configuration menu
    Copy the full SHA
    dfa0a5b View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2018

  1. Revert "Prevent memory allocation in signal handler"

    This reverts commit fa6087f0c2856215e7141259b56e75b46746f74d.
    mlabiuk committed Feb 19, 2018
    Configuration menu
    Copy the full SHA
    ee26488 View commit details
    Browse the repository at this point in the history
  2. Do not allocate exception for signal from non managed code

    If the signal occurs in not managed code we cannot use heap.
    We should call signal-safe functions only from signal handler.
    
    Create exception object on stack for checking source of signal.
    If signal is from managed code we can use memory allocation to create
    persistent exception on heap as copy of volatile exception on stack.
    
    If signal from unmanaged code we do nothing and call base signal handler.
    
    fix https://github.com/dotnet/coreclr/issues/16338
    mlabiuk committed Feb 19, 2018
    Configuration menu
    Copy the full SHA
    f8dafbb View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2018

  1. Move exception allocation to PAL_SEHException

    PAL_SEHException::EnsureExceptionRecordsOnHeap() moves exception record
    to heap if needed.
    
    fix https://github.com/dotnet/coreclr/issues/16338
    mlabiuk committed Feb 20, 2018
    Configuration menu
    Copy the full SHA
    e7bf54e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5966e0e View commit details
    Browse the repository at this point in the history