On Thu, Mar 21, 2013 at 2:39 AM, Jeffrey Walton <[email protected]> wrote:
> On Thu, Mar 21, 2013 at 2:26 AM, Raistmer the Sorcerer <[email protected]> 
> wrote:
>>  I see crash after app's computations  completion and before " called 
>> boinc_finish" line appears in stderr. Crash is hard to reproduce but I get 
>> reports of such crash time to time (Windows, AstroPulse app)
>>
> By default, the 'safer' functions (<xxx>_s) don't return the error_t.
> They call abort if there after failing validation on Windows
> platforms. Did you install a handler via
> _set_invalid_parameter_handler? See "Security Enhancements in the CRT
> " (http://msdn.microsoft.com/en-us/library/8ef0s5kh(v=vs.80).aspx) and
> _set_invalid_parameter_handler
> (http://msdn.microsoft.com/en-us/library/a9yf33zb(v=vs.80).aspx)?
>
> ...
> Also, the Windows versions (perhaps others) do not check for success,
> which is defined as 0. They check for failure with a particular value.
My bad.... Here was the one that caught my eye on a quick scan:

// src/boinc-6.12.38/api/boinc_api.cpp, line 217
if (localtime_s(&tm, &x) == EINVAL) {
   ...
}

Also, strftime() ignores its return value. The function returns 0 on
failure or 'N >= sizefo(buf)' on truncation (where N is the number of
bytes written)..

Jeff
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to