Bug 170331 - [WinCairo] WebCore::PlatformDisplay::terminateEGLDisplay causes a crash in libGLESv2.dll while processing atexit
Summary: [WinCairo] WebCore::PlatformDisplay::terminateEGLDisplay causes a crash in li...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-31 01:25 PDT by Fujii Hironori
Modified: 2020-05-19 00:44 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.89 KB, patch)
2017-03-31 01:51 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2017-03-31 01:25:08 PDT
[WinCairo] WebCore::PlatformDisplay::terminateEGLDisplay causes a crash in libGLESv2.dll while processing atexit

Repro steps:

1) Start MiniBrowser
2) Close MiniBrowser
3) It crashes

Message box:

> Exception thrown at 0x00007FF89FAB7930 (ntdll.dll) in MiniBrowser.exe: 0xC0000005: Access violation reading location 0x0000000000000010.
> 
> If there is a handler for this exception, the program may be safely continued.

Callstack:

> ntdll.dll!00007ff89fab7930()	Unknown
> libGLESv2.dll!_malloc_base(unsigned __int64 size) Line 34	C++
> [External Code]	
> libGLESv2.dll!`anonymous namespace'::AllocateCurrent() Line 41	C++
> libGLESv2.dll!`anonymous namespace'::GetCurrentData() Line 70	C++
> libGLESv2.dll!gl::GetGlobalContext() Line 124	C++
> libGLESv2.dll!gl::GetValidGlobalContext() Line 131	C++
> libGLESv2.dll!gl::BindFramebuffer(unsigned int target, unsigned int framebuffer) Line 160	C++
> libGLESv2.dll!glBindFramebuffer(unsigned int target, unsigned int framebuffer) Line 42	C++
> WebKit.dll!glBindFramebuffer(unsigned int target, unsigned int framebuffer) Line 33	C++
> WebKit.dll!WebCore::GLContextEGL::~GLContextEGL() Line 243	C++
> [External Code]	
> WebKit.dll!WebCore::PlatformDisplay::terminateEGLDisplay() Line 233	C++
> WebKit.dll!WebCore::PlatformDisplay::initializeEGLDisplay::__l15::<lambda>() Line 225	C++
> WebKit.dll!void <lambda>(void)::<lambda_invoker_cdecl>() Line 226	C++
> [External Code]	
> MiniBrowser.exe!exit_or_terminate_process(const unsigned int return_code) Line 129	C++
> MiniBrowser.exe!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 265	C++
> [External Code]	

The atexit has been introduced in Bug 157973.
PlatformDisplay.cpp is not used by AppleWin port.
Comment 1 Fujii Hironori 2017-03-31 01:51:15 PDT
Created attachment 305955 [details]
Patch
Comment 2 WebKit Commit Bot 2017-03-31 15:03:42 PDT
Comment on attachment 305955 [details]
Patch

Clearing flags on attachment: 305955

Committed r214688: <http://trac.webkit.org/changeset/214688>
Comment 3 WebKit Commit Bot 2017-03-31 15:03:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Fujii Hironori 2020-05-19 00:38:52 PDT
r185411 (Bug 145832) fixed the same issue once.
But, r201595 (Bug 157973) removed the code.