https://bz.apache.org/ooo/show_bug.cgi?id=127252

Pedro Giffuni <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Pedro Giffuni <[email protected]> ---
(In reply to damjan from comment #0)
> A lot of C++ code in AOO doesn't follow the C++ specifications when handling
> exceptions, for example exceptions are thrown without being declared in the
> function's prototype, which SHOULD result in a call to unexpected() and
> termination of the application.
> 

Interesting, thanks!

> AOO however hides this fact using the -fno-enforce-eh-specs flag to GCC on
> Linux (see main/solenv/gbuild/platform/linux.mk), and something similar on
> Windows, so those platforms and compilers don't end up in unexpected() and
> there is no crash. Clang, used on at least MacOS and FreeBSD, doesn't
> support that flag, so they will crash in cases where Windows and Linux
> don't, making those platforms DANGEROUSLY UNSTABLE!!!
> 
> See bug 125868 and its fix in commit 1765488 for a real world example.
> *Many* more cases could exist!
> 

Perhaps opengrok'ing throw(), but I see almost 7000 occurrences ?

> Unless support can be added to Clang, a thorough audit of all code in AOO
> will be needed to find and fix all the exception handling. Hopefully there's
> a way to automate it somehow.

There was a small discussion in Nov 2012 in the clang lists:

http://clang-developers.42468.n3.nabble.com/Does-clang-support-fno-enforce-eh-specs-option-of-gcc-td4028196.html

I don't think clang will be adding support for it. A clang plugin would be
extremely interesting for other projects as well (but I don't know how to use
them).

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to