Happy little incidents

Mcu32

Well-known member
R.I.P Bob Ross

#1 (More to come)

Code:
#include <Arduino.h>
void incident_1()
{
  double d = 1.0 / 3;
  //correct:
  unsigned char n = 5;
  String s1( d, n); Serial.println(s1);
  //Happy little crash here:
  n = 200;
  String s2( d, n); Serial.print(s2);
  // just don't use a fixed ( char [40]) )
}

void setup() {
  while(!Serial) {;}
  incident_1();
}
void loop() {}
 
AI: WString.cpp contains several critical bugs, memory errors, potential undefined behavior, and thread-safety issues.
I'll post a few here, but do yourself a favor and take a look for yourselves.
Maybe other users would like to help??
Check out all the other files, too.

I don't use Teensy anymore, but I still want Teensyduino to become more bug-free.
 
Last edited:
PR#24 (by me): also it looks like issue#23 had a solution, if not a PR.

But I see you archived that exact repository just yesterday. I leave it to the observer to judge whether that is a coincidence, and whether you truly want the Teensy ecosystem to “become more bug free”.
 
So, you have found 1 (one).

I don't see a bugfix in your PR. It's a optional change, not needed fpr this lib.
It was indeed a coincidence. Thaks for the reminder. I will not update it anymore (and some other libs, too). I left them archived so hey still can be used.
I think forks are still possible.
 
Back
Top