Skip to content

Conversation

earlephilhower
Copy link
Collaborator

@earlephilhower earlephilhower commented Feb 13, 2019

Match __FUNCTION__ linking, keep C++ function names out of rodata/heap.

Match __FUNCTION__ linking, keep C++ function names out of rodata/heap.
@cr1st1p
Copy link

cr1st1p commented Aug 25, 2019

Guys, not sure if this was announced or not, but this looks like a rather big change.
On one hand it is good (for those doing logging - it frees some RAM), but on the other hand... you should NOT expect that GCC definition is ONLY used via Arduino's String() class !
Possible wrong cases, where pull request #6368 probably does nothing:

  • allocating some memory (new/malloc), building a string, doing then a strcat(dest, __PRETTY_FUNCTION) (untested)
  • doing std:string s(PRETTY_FUNCTION) - crashes (real life example :-( )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants