RFR(XS): 8193308: Disallow installing user signal handlers for SIGBUS on OSX
mandy chung
mandy.chung at oracle.com
Sat Feb 10 07:18:29 UTC 2018
On 2/9/18 8:53 PM, David Holmes wrote:
> Hi Mandy,
>
> On 10/02/2018 9:14 AM, mandy chung wrote:
>> (fixed formatting)
>>
>> As documented in [1], SIGBUS is listed as the signals used by the
>> HotSpot implementation. It could be just that it was missed from day 1.
>
> That document has not been well maintained, nor does it accurately
> reflect the actual implementation details.
>
It should be updated. Please file a doc issue to include specific
change. I find the current form quite reasonable.
>> Have you checked the native signal chaining support via libjsig.so?
>> It should disallow to install a user native signal handler for SIGBUS.
>>
>> I think JVM_RegisterSignal should disallow installing a user handler
>> for one of the implementation-specific signals for all platforms.
>> That'll simplify your fix. I would think the compatibility risk
>> should be low as rare cases would want to intercept SIGBUS which is
>> also clearly documented in [1].
>
> Each platform defines its own set of signals that are used by the VM
> on that platform. While I've never thought it made any sense to
> attempt to install user "handlers" for SIGBUS or SIGSEGV (not that we
> allow the latter) others have argued that unless we use it then we
> should allow it. Hence no "lowest common denominator" approach -
> though that certainly would be simpler.
>
> In this case I believe it is simply another case where the OS X port
> copied the Linux code and it wasn't realized that OS X would generate
> SIGBUS when SIGSEGV is "expected" and so didn't list it as excluded.
Are we agreeing on disallowing SIGBUS for all platforms?
Mandy
More information about the hotspot-runtime-dev
mailing list