Re: [PATCH v3 3/3] Aarch64: Fix segfault when casting dummy calls

Alan Hayward
2018-10-23T16:08:48Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1656 bytes --]

> On 19 Oct 2018, at 12:35, Pedro Alves <palves@redhat.com> wrote:
>

<snip>

>> to calculate lang_struct_return. This information is available in the
>> return_method enum. The fix is to simply use this instead.
>>
>> Add common test case using a shared library to ensure FUNC resolving.
>
> What does "common" mean here?

By common I just meant not-aarch64-specific. I guess what I really meant
was any target that supported shared libraries.

>
> And what does "to ensure FUNC resolving" mean too, btw?
> AFAICT, the only reason to use a shared library is to
> compile it with or without debug information, right?
> Come to think of it, you could instead eliminate the
> shared library and compile a separate .o file instead, right?
> That would simplify the testcase a bit and expose it to more
> targets.
>

I could only get the bug to expose itself when using a .so

If I do the following using current HEAD then the bug is not present:

g++ -c condbreak-solib-main.cc -o condbreak-solib-main.o -fno-inline
g++ -c condbreak-solib-lib.cc -o condbreak-solib-lib.o -fno-inline
g++ condbreak-solib-main.o condbreak-solib-lib.o

It causes the type of the return value to be detected as
TYPE_CODE_PTR->TYPE_CODE_INT.

Or was there another method you were thinking?

"Ok" for all the other comments (including 1/3 and 2/3).

As a side note, many of the GNU style issues I kept hitting in the tests
are due to me relying too much on check_GNU_style.sh (from gcc) which
ignores any files in the testsuite directory. Tools are great, until
they aren’t :)

Alan.

\x16º&Öéj×!zÊÞ¶êç×{÷‰b²Ö«r\x18\x1dn–­r\x17¬