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: Profile mode maintenance patch


On 04/10/14 22:54 +0200, François Dumont wrote:
On 23/09/2014 13:27, Jonathan Wakely wrote:

Yes, OK for trunk - thanks very much.

Hi

There was in fact one last test failing, ext/profile/mh.cc, a profile mode specific test. It must have been failing for quite a while since malloc hooks has been deprecated.

I don't understand why that would make it fail, deprecated doesn't
mean it doesn't work.

However, the declaration of __malloc_initialize_hook has changed at
some point between glibc 2.11 and 2.18, so the test doesn't compile
for me on Fedora 20.

Secondly, the test is useless if it isn't actually run, so the
{ dg-do compile } must be removed.

Finally, the test returns 1, so even if it is executed it causes a
FAIL.

What a mess.

It is normally testing the profile mode protection against recursion if memory allocation functions are redefined. It was based on malloc but we use in fact new operator. So I rewrite the test using new/delete operators.

OK.

This new test version is attached, I removed those 2 lines at the beginning:

// { dg-do compile { target *-*-linux* *-*-gnu* } }
// { dg-xfail-if "" { uclibc } { "*" } { "" } }

I think that this test can now be executed and see no reason why it should fail with uclibc. Do you confirm ?

Yes, the test should be portable now, and should actually PASS.

The name of the test doesn't make much sense now though, maybe rename
it from mh.cc to replace_new.cc or something.

I attached the full patch again. I also remove useless virtual destructor or methods, no need for polymorphism.

OK.

(I still think we should just remove the whole Profile Mode ...)


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