This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix incorrect computation of DW_CFA_GNU_args_size in nested calls


On Mar 16, 2006, Ian Lance Taylor <ian@airs.com> wrote:

> Alexandre Oliva <aoliva@redhat.com> writes:
>> This patch fixes both issues, even though I don't have a testcase to
>> trigger the latter problem in 4.0+, but it would hit on any
>> no-accumulate-outgoing-args machine whose memcpy popped arguments upon
>> return.  Can anyone name such a machine? :-)

> i386 using -mrtd?

Thanks.  Unfortunately, that's not enough to actually trigger the
problem, unless we had all of GCC (or at least libgcc, libsupc++ and
portions of libc) compiled with this option.  GCC emits calls to
memcpy assuming it won't throw (i.e., exception regions don't cover
the memcpy call), so an execution testcase appears to be impossible to
create :-(

I've also tried to override the memcpy definition within a translation
unit using the stdcall attribute, but GCC wouldn't realize I was
overriding memcpy for purposes of these built-in calls to memcpy, not
even with -fno-builtin.  And then, even if I could succeed in
overriding it, I'd still hit the problem above :-(

So I'm officially giving up trying to come up with a testcase
involving the built-in use of memcpy for argument passing, and
proceeding to check in the patch RTH approved.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America        http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]