Hi,

[Patch 1/1] Patch for fixing the openposix_settime_speculative_12_1
testcase's segment fault

-modified the file
testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c

---
ltp-full-20081031.orig/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c
   2005-06-04
00:36:30.000000000 +0800
+++
ltp-full-20081031/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c
        2009-03-31
14:07:25.000000000 +0800
@@ -20,8 +20,8 @@ int main(int argc, char *argv[])
 {
        timer_t tid;
        struct itimerspec its;
-
-       tid = (timer_t) BOGUSTID;
+       int tval = BOGUSTID;
+       tid = (timer_t) & tval;
        its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
        its.it_value.tv_sec = 0; its.it_value.tv_nsec = 0;
 
-- 

Fan Fredrick He
R&D OPS QA Beijing PRC
Room 3603, Beijing Fortune Plaza, Office Tower A, No.7 Dongsanhuan
Zhonglu, Chaoyang District, Beijing, P.R., 100020
SUSE LINUX Products
[email protected]
Mainland-Mobile (86) 13661278596

--- 
ltp-full-20081031.orig/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c
       2005-06-04 00:36:30.000000000 +0800
+++ 
ltp-full-20081031/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative/12-1.c
    2009-03-31 14:07:25.000000000 +0800
@@ -20,8 +20,8 @@ int main(int argc, char *argv[])
 {
        timer_t tid;
        struct itimerspec its;
-
-       tid = (timer_t) BOGUSTID;
+       int tval = BOGUSTID;
+       tid = (timer_t) & tval;
        its.it_interval.tv_sec = 0; its.it_interval.tv_nsec = 0;
        its.it_value.tv_sec = 0; its.it_value.tv_nsec = 0;
 
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to