Skip to content

How to effectively handle infinite loops? #430

Answered by s-hadinger
Sebight asked this question in Q&A
Discussion options

You must be logged in to vote

Sure, the heartbeat is managed here: https://github.com/arendst/Tasmota/blob/4fbe3590bea16b3d43fc870bda13807e5d223534/tasmota/tasmota_xdrv_driver/xdrv_52_9_berry.ino#L292-L301

And the observability callback is registered here: be_set_obs_hook(berry.vm, &BerryObservability); /* attach observability hook */

So every 1 million instructions, it has the opportunity to raise an exception and kill the infinite loop.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Sebight
Comment options

@s-hadinger
Comment options

@Sebight
Comment options

Answer selected by Sebight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants