[gabi++] Fix bug: Use un-exsited object in uncaught_exception.

We may call std::uncaught_exception before pthread_setspecific,
that means we should not use __cxa_get_globals_fast, since it won't get
the correct __cxa_eh_globals object. This will cause segmentation
fault at the following usage on the object.

Also, we can eliminate the redundant null pointer check since function
__cxa_get_globals will guarantee the returned value must not be NULL.

Change-Id: Ibcc177ab6da95331e212eee022f79c440cbcf821
Signed-off-by: WenHan Gu <Wenhan.gu@mediatek.com>
1 file changed