Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8262006

posix signals, call_chained_handler, should not modify libjsig memory

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 8, 11, 16, 17
    • hotspot

      While working on JDK-8260485, I tried to add a bit more const correctness with the sigaction structures handed around; while doing that, I noticed that `call_chained_handler` actually modifies the content of the sigaction structure it gets handed.

      This is not good style, especially since this function is called also for the libjsig case, where the sigaction pointer points into memory owned by the libjsig.

      We do this for two reasons, one is to just have a holder for a temporary sigset, which would be trivial to fix with a temporary local variable. And then, to switch off chaining for SA_NODEFER (mimicking one shot semantics). That would be a bit more difficult to implement, especially taking into consideration the libjsig case.

            Unassigned Unassigned
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: