Francois Gouget : testbot/TestAgent: Make sure we don't overflow alarm()' s 32-bit limit.

Alexandre Julliard julliard at winehq.org
Thu May 15 15:13:55 CDT 2014


Module: tools
Branch: master
Commit: 4f9cf46a80f18139f326d611f3575075d4d22d85
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=4f9cf46a80f18139f326d611f3575075d4d22d85

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu May 15 15:55:45 2014 +0200

testbot/TestAgent: Make sure we don't overflow alarm()'s 32-bit limit.

---

 testbot/lib/WineTestBot/TestAgent.pm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index 3c84d49..1acb0cd 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -174,7 +174,8 @@ sub _SetAlarm($)
   {
     my $Timeout = $self->{deadline} - time();
     die "timeout" if ($Timeout <= 0);
-    alarm($Timeout);
+    # alarm() has a 32-bit limit, even on 64-bit systems
+    alarm($Timeout <= 0xffffffff ? $Timeout : 0xffffffff);
   }
 }
 




More information about the wine-cvs mailing list