mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
Fix simplifier safety for AnyExceptionMessage (#9707)
* Fix simplifier safety for AnyExceptionMessage This highlights the danger of shifting definitions. At some point this safety was correct (AnyException contained the message string directly, "throw" took a message argument), and then we decided to have AnyException call a function associated with the type (to speed up exception throwing & catching), and this safety became incorrect :-( changelog_begin changelog_end * s/may crash/may throw
This commit is contained in:
parent
0ab37b3774
commit
1edb110f99
@ -84,7 +84,7 @@ safetyStep = \case
|
||||
BEBool _ -> Safe 0
|
||||
BERoundingMode _ -> Safe 0
|
||||
BEError -> Safe 0
|
||||
BEAnyExceptionMessage -> Safe 1
|
||||
BEAnyExceptionMessage -> Safe 0 -- evaluates user-defined code which may throw
|
||||
BEAnyExceptionIsArithmeticError -> Safe 1
|
||||
BEAnyExceptionIsContractError -> Safe 1
|
||||
BEEqualGeneric -> Safe 1 -- may crash if values are incomparable
|
||||
|
Loading…
Reference in New Issue
Block a user