This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: compile/runtime testing for __cxa_atexit


Hi Benjamin,

>Hey people. I'm working on getting better tests for resource cleanups
>in mt_allocator. 
>
>Part of this testing is only useful for targets that have --enable-__cxa_atexit flipped.
>
>However, there appears to be no way to currently tell at runtime if a
>given host has enabled this, and it is being used. From a quick look at
>the g++ testsuite, it looks like
>
>dg-options "-fuse-cxa-atexit" 
>
>is being used. However, that's not really what I'm going for. I either
>want a macro (GLIBCXX_HAVE___CXA_ATEXIT comes immediately to mind) or
>something more elegant like the machinery used for threads/wchar_t/
>locales, where if the underlying system doesn't hack it, the test is
>not really run (ie is unsupported). The latter is more accurate I
>think: that's what I'm currently working on.
>
>Suggestions or ideas? Something I overlooked?
>  
>
Your plan makes perfect sense to me. Right now, I don't have anything
particularly useful to add, only, libstdc++/22205 come to my mind: we
still have unresolved that issue with systems not supporting debug-mode.
Indeed, as you observe in the report, fixing it seems easy: basically
just add some DejaGNU code very similar to what is already in place for
the named locales, slightly simpler in fact, because it suffices to
compile the testcase. Do you want me to work on this issue or maybe you
are going to take care of it together with the mt_allocator testing
work? Just let me know...

Thanks,
Paolo.


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