NEW 25437
tcmalloc/Windows bug can cause random GetLastError() failures.
https://bugs.webkit.org/show_bug.cgi?id=25437
Summary tcmalloc/Windows bug can cause random GetLastError() failures.
Mike Belshe
Reported 2009-04-27 16:52:06 PDT
The latest release of tcmalloc for windows picks up an easy bug fix which can effect windows builds: TlsGetValue() will call SetLastError(0). If you have code which looks like: MakeSomeWindowsCall(foo()); if (GetLastError()) { ... } if foo() returns something which needs to be destructed, that can call into tcmalloc, which will use thread-local-storage, which will SetLastError(0). Fix: When calling TlsGetValue, do this: err = GetLastError() TlsGetValue() SetLastError(err)
Attachments
Ahmad Saleem
Comment 1 2024-04-19 08:58:33 PDT
If I search for 'TlsGetValue' in current code on GitHub, it is only in third party code like libwebrtc and ANGLE and not in WebKit / WebCore. https://searchfox.org/wubkat/search?q=TlsGetValue&path=&case=false&regexp=false @Fuji - just to get your input since it mentions 'Window'. Do we have any such impact or we can close this?
Note You need to log in before you can comment on or make changes to this bug.