When fixing this bug, it is probably a good idea to change the code to use the 
support functions in osaf_time.h for time calculations.


---

** [tickets:#918] log: Wrong timeout time on 32-bit systems**

**Status:** unassigned
**Milestone:** 4.4.1
**Created:** Tue May 20, 2014 01:06 PM UTC by Anders Widell
**Last Updated:** Tue May 20, 2014 01:06 PM UTC
**Owner:** nobody

There is a bug in the function get_timeout_time() in lgs_file.c, that makes it 
calculate the wrong timeout-time on 32-bit systems:

    uint64_t millisec1,millisec2;
        
    GETTIME(start_time);
        
    /* Convert to ms */
    millisec1 = (start_time.tv_sec * 1000) + (start_time.tv_nsec / 1000000);

start_time.tv_sec is of type time_t, which is a 32_bit integer on 32-bit 
platforms. Multiplying this with 1000 may overflow (actually it will, if time 
is an absolute time in number of seconds since 1970). The solution is to case 
tv_sec to a 64-bit integer before multiplying it with 1000.


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to