public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GSoC, Make cp-demangle non-recursive and async-signal safety
@ 2022-04-08 10:06 Pedro Alves
  2022-04-13 13:53 ` Martin Jambor
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Alves @ 2022-04-08 10:06 UTC (permalink / raw)
  To: Martin Jambor, GCC Development

Hi!

I noticed the discussions about making cp-demangle use malloc/free instead of recursion,
and I wonder about signal handlers, and I don't see that mentioned in
https://gcc.gnu.org/wiki/SummerOfCode's description of the project.  

See my question to Ian a few years back, here, and his answer:

https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00696.html

~~~
 Ian says:
 > Pedro says:
 > Ian earlier mentioned that we've wanted to avoid malloc because some
 > programs call the demangler from a signal handler, but it seems like
 > we already do, these functions already aren't safe to use from
 > signal handlers as is.  Where does the "we can't use malloc" idea
 > come from?  Is there some entry point that avoids
 > the malloc/realloc/free calls?

 cplus_demangle_v3_callback and cplus_demangle_print_callback.
~~~

Grepping the gcc tree, I see that libsanitizer uses those entry points.

Is async-signal safety no longer a consideration/concern?  Or will those entry points
continue to work without calling malloc/free somehow?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-13 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 10:06 GSoC, Make cp-demangle non-recursive and async-signal safety Pedro Alves
2022-04-13 13:53 ` Martin Jambor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).