New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why native crash protection is disabled by default in BridJ? #394

Closed
sarxos opened this Issue Apr 12, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@sarxos
Contributor

sarxos commented Apr 12, 2013

Hi,

I was looking for the variables names to setup debug logs to be printed by BridJ, and accidentally found this setting:

Protected("bridj.protected", "BRIDJ_PROTECTED", false,
    "Protect all native calls (including memory accesses) against native crashes."
),

Is that mean that BridJ can prevents JVM crashes when root cause lies in native call? If so, what is the impact when I would like to enable it. I'm asking because it seems pretty strange for me that such useful feature is disabled by default.

@ochafik

This comment has been minimized.

Show comment
Hide comment
@ochafik

ochafik Apr 20, 2013

Member

Hi @sarxos ,

BridJ's protected mode adds some overhead to each call and disables raw assembly optimizations, which is why it is not turned on by default.
(also, it may interfere with the JVM's signal handlers on some platforms)

Cheers

Member

ochafik commented Apr 20, 2013

Hi @sarxos ,

BridJ's protected mode adds some overhead to each call and disables raw assembly optimizations, which is why it is not turned on by default.
(also, it may interfere with the JVM's signal handlers on some platforms)

Cheers

@ochafik ochafik closed this Apr 20, 2013

@sarxos

This comment has been minimized.

Show comment
Hide comment
@sarxos

sarxos Apr 20, 2013

Contributor

Ok, got it :) Thank you Olivier!

Contributor

sarxos commented Apr 20, 2013

Ok, got it :) Thank you Olivier!

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