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

          Issue ID: 127252
        Issue Type: DEFECT
           Summary: All of AOO doesn't handle C++ exceptions properly,
                    making Clang unusable
           Product: Build Tools
           Version: 4.2.0-dev
          Hardware: All
                OS: Other OS
            Status: CONFIRMED
          Severity: Major
          Priority: P5 (lowest)
         Component: code
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

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.

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!

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.

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

Reply via email to