http://bugs.winehq.org/show_bug.cgi?id=22514
--- Comment #12 from Timur Iskhodzhanov timurrrr@google.com 2010-04-28 10:14:59 --- For me it's clearly a wine bug since the native Windows run of an .exe file gives different results from a run under wine.
===
Chromium uses the documented "If lpString is NULL, the return value is 0" feature.
What Valgrind is complaining about is reading *(NULL). I know you do it in the try-statement but a) I don't think it's a good idea to handle this case using exceptions b) the native implementation doesn't call SetLastError while Wine does