On Wed, 2009-02-11 at 20:54 -0700, Xiao Xiao wrote:
> Hi,
> when I run the testcase
> /usr/lib/ltp/testcases/bin/openposix/conformance/interfaces/strftime/2-1.test,it
> appeared some segment fault belows:
> dell1:/usr/lib/ltp/testcases/bin/openposix/conformance/interfaces/strftime
> # 
> /usr/lib/ltp/testcases/bin/openposix/conformance/interfaces/strftime/2-1.test
> 
> STRING IS:   Thu 12 Feb 2009 11:41:38 AM EST
> 
> EC   Bytes 2           20     PASS
> EX   Bytes 11           11:41:38 AM   PASS
> EY   Bytes 4           2009   PASS
> Od   Bytes 2           12     PASS
> Oe   Bytes 2           12     PASS
> OH   Bytes 2           11     PASS
> OI   Bytes 2           11     PASS
> Om   Bytes 2           02     PASS
> OM   Bytes 2           41     PASS
> OS   Bytes 2           38     PASS
> Ou   Bytes 1           4      PASS
> OU   Bytes 2           06     PASS
> OV   Bytes 2           07     PASS
> Ow   Bytes 1           4      PASS
> OW   Bytes 2           06     PASS
> 
> Segmentation fault
> 
> In the source of strftime/2-1.c, there is array named text[20], I think
> it is too short ,after I set it as "char text[100]",it does work,below
> is the results.

True.

> 
> dell1:/usr/lib/ltp/testcases/bin/openposix/conformance/interfaces/strftime
> # 
> /usr/lib/ltp/testcases/bin/openposix/conformance/interfaces/strftime/2-1.test
> 
> STRING IS:   Thu 12 Feb 2009 11:44:45 AM EST
> 
> EC   Bytes 2           20     PASS
> EX   Bytes 11           11:44:45 AM   PASS
> EY   Bytes 4           2009   PASS
> Od   Bytes 2           12     PASS
> Oe   Bytes 2           12     PASS
> OH   Bytes 2           11     PASS
> OI   Bytes 2           11     PASS
> Om   Bytes 2           02     PASS
> OM   Bytes 2           44     PASS
> OS   Bytes 2           45     PASS
> Ou   Bytes 1           4      PASS
> OU   Bytes 2           06     PASS
> OV   Bytes 2           07     PASS
> Ow   Bytes 1           4      PASS
> OW   Bytes 2           06     PASS
> 
> Signed-off-by: Xiao Xiao <[email protected]>

Thanks.

Regards--
Subrata

> 
> Index:
> testcases/open_posix_testsuite/conformance/interfaces/strftime/2-1.c  
> ===================================================================
> ---
> ltp-full-20090131_orig/testcases/open_posix_testsuite/conformance/interfaces/strftime/2-1.c
>    2009-02-12
> 11:46:53.000000000 +0800
> +++
> ltp-full-20090131/testcases/open_posix_testsuite/conformance/interfaces/strftime/2-1.c
>         2009-02-12
> 11:48:01.000000000 +0800
> @@ -25,7 +25,7 @@ int main () {
>      /* current time */
>      time_t t = time(NULL);
>      struct tm* local_t = localtime(&t);
> -    char text[20];
> +    char text[100];
>      int result;
>  
>      setlocale(LC_TIME, "");
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________ Ltp-list mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to