Replace ABI stubs with real implementations

Arduino library implements several gcc specific C++ ABI functions. Unfortunately, instead of real implementations stubs are used. This leads to undesired behavior in some circumstances.

Here is a pull request with better implementations for the functions:

It is not so good because it uses abort() instead of std::terminate from standard library. In case if you are ready to use standard library there is another request:

I've described purpose of these ABI functions and reasons why they must be implemented like I did here:
http://kibergus.su/en/node/92

Thanks. I hope that this post would produce a little more feedback, than pull requests.

You should join the "Developers" mailing list, and discuss these changes there.
http://arduino.cc/mailman/listinfo/developers_arduino.cc

westfw:
You should join the "Developers" mailing list, and discuss these changes there.
Redirecting to Google Groups

Well, you see, I've sent pull request 1.5 weeks ago. All interested people have received email notifications, I guess. I also don't believe that developers do not read this forum at all (if it is true, just close it). I've also posted issues to projects related to arduino, such as energia or wiring. Nobody cares.

And I've also seen issues in arduino bug tracker and pull requests about very strange choice for operator new implementation... These issues stay open and uncommented for months. This makes me thinking that nobody cares even more.

So I'm not going to hunt developers and force them to talk. If they want they can easily find a way to contact me. Instead I'll spend my time to make my project as robust as possible and arduino users may continue to have most weird crashes in their projects. If they want.

That's sucks!

I can add the modifications to my "mod" version :blush: not much but better than nothing I guess

The "developers" list (it's actually called that, it's not just a description) isn't just the Arduino owners; it include various community members that are interested in contributing or following (like me, or more relevantly Paul Stoffregen (teensy), Maniacbug (the c++lib you reference), Eric Weddington (atmel.com)) It does not receive pull requests, or even Google code issue updates (there's a separate list for the latter, recently created.)

Adding/changing error handling in the Arduino environment is likely to be discussion provoking. I think I agree that something is better than nothing, but I'm not enough of a C++ person to comment on implementation details. I think there is a general resistance to implementing large parts of a C++ runtime library, for example.

I think that in general, the preferred mechanism for getting changes into Arduino is something like:

  1. Discuss the issue on "developers."
  2. Create an "issue" at Google Code Archive - Long-term storage for Google Code Project Hosting.
  3. submit diffs via the issue (so other people could apply it before it is accepted to the official code), and/or via pull request (also somewhat depending on overall complexity of the patch.)

It's a little hard to tell, because there haven't been a lot of modifications from the community that have successfully made it through the process. :frowning: (lots of bugs have been open for months, even ones with patches.)

Fighting "management" to get new ideas accepted is certainly one of the less pleasant parts of software development :frowning:

(Keep in mind that this message reflects my personal opinions, and I'm NOT a member of the Arduino team.)

To set your expectations, changes are typically accepted to Arduino typically happen on the time scale of months, not days or weeks. Yeah, it's slow.

David (who is primary developer that approves changes) is very busy. He does read the developers mail list and the issue tracker. He might read this forum, but I wouldn't assume he sees anything posted here. The issue tracker or git pull requests are the best ways to submit patches.

Thanks for yours replies.

Adding/changing error handling in the Arduino environment is likely to be discussion provoking.

I understand this and that's why I've written a post with description of how it works to supply food for discussion. Looks like it was not enough.

I think there is a general resistance to implementing large parts of a C++ runtime library, for example.

I understand this resistance very much. Good implementation of stdlib needs a lot of effort. I can say, that even taking uClibc++ is not a very good choice: it provides quite good realization for basic algorithms, but it has some issues with containers and lacks some optimizations which gnu libstdc++ has, because they were not available when uClibc++ was developed.
That's why my pull request for ABI implementation uses abort() instead of std::terminate. And there is another pull request, which relies on presence of STL and uses std::terminate in ABI implementation. And it still uses small part of standard library, which does not require much effort to implement.

  1. Discuss the issue on "developers."
  2. Create an "issue" at Google Code Archive - Long-term storage for Google Code Project Hosting.
  3. submit diffs via the issue (so other people could apply it before it is accepted to the official code), and/or via pull request (also somewhat depending on overall complexity of the patch.)

I've made changes without discussion because I needed them myself. Pull requests on github and posts here serve for two purposes: backup copy of my changes and to give other people possibility to use them.

Fighting "management" to get new ideas accepted is certainly one of the less pleasant parts of software development :frowning:

I understand this but I don't really need these changes to be accepted. Right now I'm working on eliminating/separating usage of arduino libraries from my project because I need it to run on other hardware.

To set your expectations, changes are typically accepted to Arduino typically happen on the time scale of months, not days or weeks. Yeah, it's slow.

Purpose of these posts was to bring some attention and provoke discussion. When there is no answers it is impossible to say if anybody has noticed pull requests. Arduino team may think on suggested patches or may not think on them for any amount of time. But if you have any additions/objections/considerations about suggested patches I would be glad to discuss them.

re the on going conversation about arduino, and bug fixing,

it does worry me a little for the long term good of arduino,

Arduino is aimed fairly and squarely at the single coder me thinks,
probably one that is learning the ins and outs,

it does a great job of hiding some bits, and allowing people to get codding and running quickly,
but all the un fixed bugs , the unfixed warnings from just using the standard supplied libs like print,
and the feeling one is getting from the forums that no one seems to care about getting the basics fixed,

is a worry,