A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
142
stars
47
forks
source link
init.c: my_assert_handler: add 'nullptr' default message, if nullpointer is passed #99
This PR fixes an issue on RP firmware (and probably also other firmwares), where many Debug_Assert calls are done in a wrong way (canon bug).
Usually the first argument is used as an error description and is assumed being a string. For some reason, many locations of RPs firmware call it using a null pointer which makes the assert handler crash again resulting into less context info being shown on UART. The fix replaces the null pointer by the string "nullptr" in our crash handler before calling canon original handler to avoid the crash in the crash handler.
This PR fixes an issue on RP firmware (and probably also other firmwares), where many
Debug_Assert
calls are done in a wrong way (canon bug).Usually the first argument is used as an error description and is assumed being a string. For some reason, many locations of RPs firmware call it using a null pointer which makes the assert handler crash again resulting into less context info being shown on UART. The fix replaces the null pointer by the string "nullptr" in our crash handler before calling canon original handler to avoid the crash in the crash handler.