diff options
| author | John Högberg <[email protected]> | 2019-08-07 08:12:58 +0200 |
|---|---|---|
| committer | John Högberg <[email protected]> | 2019-08-07 08:12:58 +0200 |
| commit | 18ab59fe935799f6495ed8273a9c577c655d30ab (patch) | |
| tree | b7d02a7e18786f7ef645f6d72a826caa1e8e034e /lib/kernel | |
| parent | 86b0385622e25502222ae171a14f24aba998f2f9 (diff) | |
| parent | 2ea04617d18bc3c4f80fc3b28af47379a3ec26fc (diff) | |
| download | otp-18ab59fe935799f6495ed8273a9c577c655d30ab.tar.gz otp-18ab59fe935799f6495ed8273a9c577c655d30ab.tar.bz2 otp-18ab59fe935799f6495ed8273a9c577c655d30ab.zip | |
Merge branch 'john/compiler/explicit-call-exceptions'
* john/compiler/explicit-call-exceptions:
compiler: Simplify set_tuple_element optimization
compiler: Make 'succeeded' optimization more general
compiler: Simplify call type optimization
compiler: All calls may throw, so they all need success checks
erts_debug: Turn off unsafe optimizations in test case
Diffstat (limited to 'lib/kernel')
| -rw-r--r-- | lib/kernel/src/erts_debug.erl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/kernel/src/erts_debug.erl b/lib/kernel/src/erts_debug.erl index 42261d371d..7b9067d079 100644 --- a/lib/kernel/src/erts_debug.erl +++ b/lib/kernel/src/erts_debug.erl @@ -40,6 +40,15 @@ lc_graph/0, lc_graph_to_dot/2, lc_graph_merge/2, alloc_blocks_size/1]). +%% Reroutes calls to the given MFA to error_handler:breakpoint/3 +%% +%% Note that this is potentially unsafe as compiled code may assume that the +%% targeted function returns a specific type, triggering undefined behavior if +%% this function were to return something else. +%% +%% For reference, the debugger avoids the issue by purging the affected module +%% and interpreting all functions in the module, ensuring that no assumptions +%% are made with regard to return or argument types. -spec breakpoint(MFA, Flag) -> non_neg_integer() when MFA :: {Module :: module(), Function :: atom(), |
