This is the mail archive of the
mailing list for the GCC project.
Re: Is this a bug in libffi testsuite on solaris2.8?
Zack Weinberg writes:
> Bradley Lucier <email@example.com> writes:
> > My systems administrators told me they are getting the following in in
> > /var/adm/messages on the sparc-sun-solaris2.8 box I use to bootstrap
> > and regression-test mainline every night:
> > Oct 30 04:58:37 banach.math.purdue.edu genunix: [ID 533030
> > kern.notice] NOTICE: unwindtest.exe attempt to execute code on
> > stack by uid <xxx>
> > and I happen to be the lucky owner of uid <xxx>. The unwindtest.cc
> > tests pass on libffi, but is this a bug in the testsuite, a bogus
> > warning, or something else?
> Looking at libffi/src/sparc/ffi.c (ffi_prep_closure, in particular)
> leads me to believe that libffi intentionally places code on the stack
> and executes it. This is unfortunate but may be unavoidable.
Not necessarily: the memory for the trampoline is allocated by the
caller, and can be anywhere. However, unwindtest.c does indeed
allocate it on the stack.