Question about "6961186: Better VM handling of unexpected exceptions from application native code"

Volker Simonis volker.simonis at
Mon Jul 4 02:51:46 PDT 2011

Hi David,

first I thought you're right, but actually you're not:) isn't linked dynamically against libstdc++, but statically.
See make/linux/makefiles/gcc.make:

# statically link, work with gcc but ignored by g++
STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic

And actually 'set_terminate' is already included in the current

> nm -C jdk1.6.0_26/jre/lib/amd64/server/ | grep set_terminate
00000000008791f0 t std::set_terminate(void (*)())

Nevertheless you're probably right that it is not worth while porting
the change to Linux as well.


On Thu, Jun 30, 2011 at 12:13 PM, David Holmes <David.Holmes at> wrote:
> Hi Volker,
> Volker Simonis said the following on 06/29/11 18:26:
>> recently the bug "6961186: Better VM handling of unexpected exceptions
>> from application native code" has been fixed but the fix only applies
>> for Windows and Solaris platforms.
>> While the bug evaluation at
>> mentions that the fix
>> for Solaris and Linux would be the same (i.e. using set_terminate to
>> catch uncaught C++ exceptions), the fix was apparently not implemented
>> for Linux.
>> Has the Linux fix been omitted intentionally or accidentally?
> As I understand it, while the suggested fix should work for Linux we
> actually don't link with the C++ library on Linux that provides this API,
> and we did not want to start doing so for an obscure problem that hasn't
> even been reported on Linux. For Linux the error is apparently much clearer
> even without additional handling by the VM.
> The problems we've seen here have predominantly been on Windows. Solaris was
> included as it was trivial to do so.
> David Holmes
>> Regards,
>> Volker

More information about the hotspot-runtime-dev mailing list