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:
Sofia Faro 2021-05-17 15:04:23 +01:00 committed by GitHub
parent 0ab37b3774
commit 1edb110f99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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