Calloc was calling memset(0) on NULL when its implicit malloc failed,
causing a crash in UMM. Instead, only do the memset if the memory
allocation succeeds.
Fixes issue #4207
* Added _setError function in the header file
_setError function wraps a few lines to eliminate repetitiveness when debugging for errors.
* Added _setError function
_setError function wraps a few lines to eliminate repetitiveness when debugging for errors.
+ generates boards.rst
+ generate and replace boards section in package.json
+ generate ldscripts
+ new debug option: OOM
+ new led menu for generic board
* Added constant time strings comparison to avoid possible time-based attacks
* Fixed data types
* Fixed indentation
* Moved string comnparison in constant time to String class; modified function body to assure constant time comparison despite compiler optimizations
* Removed wrong code
* Fixed error and prevented compiler optimization to delete u1 local variable
* Avoid timing attacks on string comparison
* Minor
* changed counter names, removed else
* Add a workaround-delay in Serial.flush()
In relation to #2536 and #2502
Tested at 80MHz and 160MHz with flash-frequency at both 40MHz and 80MHz, the bug mentioned in the above issues manifests in all cases. The proposed workaround seems to work fine, I tested at 2400bps, 9600bps, 115200bps, 230400bps and 2Mbps and didn't see anomalous output.
* Remove extraneous character
* Update HardwareSerial.cpp
SDK uses final 4 sectors of flash for configuration data.
ESP.eraseConfig would only erase 2 sectors, so in some cases of
corrupted data ("system param error"), users could not fix the issue
using ESP.eraseConfig, and had to use esptool instead.
Thanks @HugoML for reporting this.
realloc() is called with newSize > 0 (at least 16), so newbuffer==0 means the old memory was not deallocated. Therefore, the pointer should still point to the old buffer. This change should resolve issue #3516.
UMM debugging strings are normally placed in RODATA, which uses up scarse
memory. Move them to PROGMEM and use macros to replace printf with a
version that can handle ROM strings.
Every assert() includes a __FILE__ constant string to RODATA which
can be quite large as it includes the complete path as well as
the filename.
Move that string into PMEM, and update the postmortem to work with
either PMEM or RAM strings for dumping abort/assert/exception
information.