https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115735

--- Comment #9 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to Sam James from comment #4)
> Hi David, I started hacking up a list based on the man pages I had from
> `man-pages` & removing the POSIX list of safe functions, but it's kind of
> gross. It's not something we could put in the build system.
> 
> A friend pointed out we might be able to get the list from glibc's docs
> (texi) which have markers. See e.g.
> https://www.gnu.org/software/libc/manual/html_node/syslog_003b-vsyslog.html
> which has:
> >  Preliminary: | MT-Safe env locale | AS-Unsafe corrupt heap lock dlopen | 
> > AC-Unsafe corrupt lock mem fd | See POSIX Safety Concepts. 
> 
> We want to parse the "AS-Unsafe" part out.
> 
> I don't know what's best here.

We could perhaps have a Python script in the "contrib" to regenerate a .def
file included by sm-signal.cc

Could take the lists of "all functions" and "known safe functions" and generate
an unsafe list by taking the difference.

Note that the POSIX list might not be redistributable, and the stuff in glibc
is probably under the GFDL rather than the GPL.  Using glibc's is probably the
better bet; maybe we can get blanket permissions from the FSF to regenerate
this GCC file from glibc's docs?

Reply via email to