1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

14 Commits

Author SHA1 Message Date
Ivan Grokhotkov
1f32b7f66e Clean up core files
- remove ICACHE_FLASH_ATTR
- remove unneeded SDK includes
- split spiffs_api into .h and .cpp
2016-03-03 02:13:22 +03:00
Raheel Hameed
2d77eae599 Leverage realloc() in String::changeBuffer() 2016-02-28 02:50:48 -06:00
raheelh
fdf8599aaa Fix a crash in String::changeBuffer()
Calling String::reserve() causes a crash if String object was in invalidated state. Per the comment on the method's declaration in ESP_SSD1306.h, This method was supposed to recover invalidated strings. This change fixes the edge case bug in String::changeBuffer() which is the root cause of the crash exposed from String::reserve().

Following test code was used to reproduce the problem and also to validate the fix:

String result;
while(true){
  char c = 'A';
  result += c; // the loop will cause malloc() to fail at some point.
  if (result.c_str()==0)
  {
    Serial.println("String INVALIDATED!!!!!");
    result.reserve(0);   // before fix, this would crash.
    Serial.println("Trying to empty....");
    result=""; 
    Serial.println("Emptied!!!!");
    break;
  } 
}
2016-02-22 22:57:21 -06:00
Markus Sattler
7ea4eb452d fix String bug
length where returning something that is not 0 while buffer where NULL!?
2015-12-10 17:37:09 +01:00
Markus Sattler
996f2b53dd fix possible free of null in String 2015-10-09 14:32:19 +02:00
Ivan Grokhotkov
001a129c3a Fix heap node corruption (#428) 2015-09-28 11:59:34 +03:00
Makuna
81d27b403e PgmSpace working
PSTR() and F() macros correctly place string into flash memory relying
on PROGMEM
PROGMEM uses ICACHE_RODATA_ATTR
Print and String classes fixed up
str* classes fixed up
2015-05-13 11:27:54 -07:00
Markus Sattler
f165a0afcd use Eclipse auto Format to get rip auf the tab, space and code style inconsistency 2015-04-06 19:33:50 +02:00
Ivan Grokhotkov
e6f3a59a52 Add atof implementation
Fix #27
2015-04-03 00:55:41 +03:00
Ivan Grokhotkov
4cf6737823 More license headers 2014-12-19 01:43:18 +03:00
Ivan Grokhotkov
160f99c31c Move some code to flash and fix prototypes 2014-12-01 00:34:59 +03:00
Ivan Grokhotkov
e21371d6d0 Tidy up backend code for esp8266 (malloc, free, yield) 2014-11-21 19:15:40 +03:00
Ivan Grokhotkov
15b434f5e2 Fix build errors 2014-11-21 12:15:50 +03:00
Ivan Grokhotkov
04fe8e8b58 Basic support for esp8266 platform
This includes empty stubs for most core Arduino functions.
Need to actually implement all those digital reads writes whatever.
Need to prebuild toolchains (xtensa-elf-lx106) for 3 platforms and put them on some download server.
Need to do the same with esptool.
Need to fix 0x40000 binary generation and add correct upload commands.
Maybe even implement uploads over WiFi.
2014-11-15 10:45:08 +03:00