You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Damjan Jovanovic <da...@apache.org> on 2016/10/18 18:41:02 UTC

BSD/Mac-only crash on throwing unspecified exceptions?

Hi

On FreeBSD, and (according to 1 bug reporter) MacOS X, throwing an
exception from a method which isn't specified by that method's exception
specifier, eg. "throw Exception();" when the specifier was
"throw(RuntimeException)",  ends up calling unexpected() and crashing.

I've fixed 2 bugs with this problem (125868 and 127165), but it doesn't
happen on Linux or Windows. Any ideas why?

Damjan

Re: BSD/Mac-only crash on throwing unspecified exceptions?

Posted by Damjan Jovanovic <da...@apache.org>.
According to http://stackoverflow.com/a/13088009 it's the use of
-fno-enforce-eh-specs, which GCC supports and
main/solenv/gbuild/platform/linux.mk uses, but freebsd.mk and
macosx.mk don't use and can't use because Clang apparently doesn't
support it.

This is a major issue. If support can't be added to Clang, substantial
amounts of code need to be audited and fixed to stabilize *BSD and
Mac.

I've opened issue 127252 to track it.

On Tue, Oct 18, 2016 at 8:41 PM, Damjan Jovanovic <da...@apache.org> wrote:
> Hi
>
> On FreeBSD, and (according to 1 bug reporter) MacOS X, throwing an exception
> from a method which isn't specified by that method's exception specifier,
> eg. "throw Exception();" when the specifier was "throw(RuntimeException)",
> ends up calling unexpected() and crashing.
>
> I've fixed 2 bugs with this problem (125868 and 127165), but it doesn't
> happen on Linux or Windows. Any ideas why?
>
> Damjan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: BSD/Mac-only crash on throwing unspecified exceptions?

Posted by Patricia Shanahan <pa...@acm.org>.
On 10/18/2016 11:41 AM, Damjan Jovanovic wrote:
> Hi
>
> On FreeBSD, and (according to 1 bug reporter) MacOS X, throwing an
> exception from a method which isn't specified by that method's exception
> specifier, eg. "throw Exception();" when the specifier was
> "throw(RuntimeException)",  ends up calling unexpected() and crashing.
>
> I've fixed 2 bugs with this problem (125868 and 127165), but it doesn't
> happen on Linux or Windows. Any ideas why?

Could it be a matter of compiler options and defaults?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org