<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-07-25)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-25 Joel Sherrill <joel.sherrill@oarcorp.com>

        * libcsupport/src/gxx_wrappers.c: Free contents of key not key itself.
        Kye pointer will never be malloc'ed.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2517&r2=text&tr2=1.2518&diff_format=h">M</a></td><td width='1%'>1.2518</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/gxx_wrappers.c.diff?r1=text&tr1=1.20&r2=text&tr2=1.21&diff_format=h">M</a></td><td width='1%'>1.21</td><td width='100%'>cpukit/libcsupport/src/gxx_wrappers.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2517 rtems/cpukit/ChangeLog:1.2518
--- rtems/cpukit/ChangeLog:1.2517       Sat Jul 24 11:12:48 2010
+++ rtems/cpukit/ChangeLog      Sun Jul 25 09:52:27 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-07-25    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libcsupport/src/gxx_wrappers.c: Free contents of key not key itself.
+       Kye pointer will never be malloc'ed.
+
</font> 2010-07-24        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * libcsupport/Makefile.am, libcsupport/src/termios_baud2num.c,

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.20 rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.21
--- rtems/cpukit/libcsupport/src/gxx_wrappers.c:1.20    Thu Jul  1 10:37:48 2010
+++ rtems/cpukit/libcsupport/src/gxx_wrappers.c Sun Jul 25 09:52:27 2010
</font><font color='#997700'>@@ -122,9 +122,10 @@
</font>   status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
   if ( status == RTEMS_SUCCESSFUL ) {
     /* Hmm - hopefully all tasks using this key have gone away... */
<font color='#880000'>-    if ( key ) free( (void *)key );
</font><font color='#000088'>+    if ( key ) free( *(void **)key );
</font>     return 0;
   }
<font color='#000088'>+  key = NULL;
</font>   return 0;
 }
 
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-07-25 Joel Sherrill <joel.sherrill@oarcorp.com>

        * gxx01/gxx01.scn, gxx01/init.c: Add more testcases.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.211&r2=text&tr2=1.212&diff_format=h">M</a></td><td width='1%'>1.212</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/gxx01/gxx01.scn.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/libtests/gxx01/gxx01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/gxx01/init.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/libtests/gxx01/init.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.211 rtems/testsuites/libtests/ChangeLog:1.212
--- rtems/testsuites/libtests/ChangeLog:1.211   Thu Jul 22 06:54:10 2010
+++ rtems/testsuites/libtests/ChangeLog Sun Jul 25 09:53:37 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-07-25    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * gxx01/gxx01.scn, gxx01/init.c: Add more testcases.
+
</font> 2010-07-22        Bharath Suri <bharath.s.jois@gmail.com>
 
        * devfs02/init.c, devfs02/devfs02.doc, devfs02/devfs02.scn,

<font color='#006600'>diff -u rtems/testsuites/libtests/gxx01/gxx01.scn:1.1 rtems/testsuites/libtests/gxx01/gxx01.scn:1.2
--- rtems/testsuites/libtests/gxx01/gxx01.scn:1.1       Thu Jul  1 09:37:43 2010
+++ rtems/testsuites/libtests/gxx01/gxx01.scn   Sun Jul 25 09:53:37 2010
</font><font color='#997700'>@@ -12,6 +12,8 @@
</font> rtems_gxx_recursive_mutex_unlock() - OK
 rtems_gxx_recursive_mutex_lock() - OK
 rtems_gxx_recursive_mutex_unlock() - OK
<font color='#000088'>+rtems_gxx_mutex_destroy(mutex) - OK
+rtems_gxx_mutex_destroy(mutex) - NOT OK
</font> 
 Call once method the first time
 Running once method
<font color='#997700'>@@ -21,6 +23,12 @@
</font> rtems_gxx_key_delete(key) - OK
 rtems_gxx_key_create(&key, key_dtor) - OK
 rtems_gxx_setspecific() - OK
<font color='#880000'>-rtems_gxx_petspecific() - OK
</font><font color='#000088'>+rtems_gxx_getspecific(key) already existing - OK
</font> rtems_gxx_key_delete(key) - OK
<font color='#000088'>+rtems_gxx_getspecific(key_for_testing) non-existent - OK
+rtems_gxx_key_delete(key_for_testing) - OK
+
+rtems_gxx_mutex_init() until exhausted and panic
+rtems_gxx_mutex_init
+fatal error, exiting
</font> *** END OF TEST GXX 01 ***

<font color='#006600'>diff -u rtems/testsuites/libtests/gxx01/init.c:1.1 rtems/testsuites/libtests/gxx01/init.c:1.2
--- rtems/testsuites/libtests/gxx01/init.c:1.1  Thu Jul  1 09:37:46 2010
+++ rtems/testsuites/libtests/gxx01/init.c      Sun Jul 25 09:53:37 2010
</font><font color='#997700'>@@ -46,6 +46,14 @@
</font>   puts( "rtems_gxx_recursive_mutex_unlock() - OK" );
   sc = rtems_gxx_recursive_mutex_unlock(&mutex);
   rtems_test_assert( sc == 0 );
<font color='#000088'>+
+  puts( "rtems_gxx_mutex_destroy(mutex) - OK" );
+  sc = rtems_gxx_mutex_destroy(&mutex);
+  rtems_test_assert( sc == 0 );
+
+  puts( "rtems_gxx_mutex_destroy(mutex) - NOT OK" );
+  sc = rtems_gxx_mutex_destroy(&mutex);
+  rtems_test_assert( sc == -1 );
</font> }
 
 void test_mutex(void)
<font color='#997700'>@@ -97,6 +105,7 @@
</font> }
 
 volatile bool key_dtor_ran;
<font color='#000088'>+void *key_for_testing;
</font> 
 void key_dtor(void *ptr)
 {
<font color='#997700'>@@ -125,7 +134,7 @@
</font>   sc = rtems_gxx_setspecific(key, (void *)0x1234);
   rtems_test_assert( sc == 0 );
 
<font color='#880000'>-  puts( "rtems_gxx_petspecific() - OK" );
</font><font color='#000088'>+  puts( "rtems_gxx_getspecific(key) already existing - OK" );
</font>   p = rtems_gxx_getspecific(key);
   rtems_test_assert( p == (void *)0x1234 );
 
<font color='#997700'>@@ -134,12 +143,38 @@
</font>   rtems_test_assert( sc == 0 );
   rtems_test_assert( key_dtor_ran == true );
 
<font color='#880000'>-#if 0
</font><font color='#000088'>+  puts( "rtems_gxx_getspecific(key_for_testing) non-existent - OK" );
+  p = rtems_gxx_getspecific((__gthread_key_t) &key_for_testing);
+  rtems_test_assert( p == NULL );
+  rtems_test_assert( key_for_testing == NULL );
+
+  key_for_testing = malloc(4);
+  rtems_test_assert( key_for_testing != NULL );
+<span style="background-color: #FF0000">  </span>
+  puts( "rtems_gxx_key_delete(key_for_testing) - OK" );
+  sc = rtems_gxx_key_delete((__gthread_key_t) &key_for_testing);
+  rtems_test_assert( sc == 0 );
+  rtems_test_assert( key_for_testing == NULL );
+}
+
+void _exit(int status) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
+
+void _exit(int status)
+{
+  puts( "*** END OF TEST GXX 01 ***" );
+
+  rtems_shutdown_executive(0);
+}
</font> 
<font color='#880000'>-void *rtems_gxx_getspecific(__gthread_key_t key);
</font><font color='#000088'>+void test_out_of_mutexes(void)
+{
+   __gthread_mutex_t mutex;
</font> 
<font color='#880000'>-int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr);
-#endif
</font><font color='#000088'>+  puts( "rtems_gxx_mutex_init() until exhausted and panic" );
+  while (1) {
+    rtems_gxx_mutex_init(&mutex);
+    rtems_test_assert( mutex != 0 );
+  }
</font> }
 
 rtems_task Init(
<font color='#997700'>@@ -158,10 +193,11 @@
</font>   puts( "" );
 
   test_key();
<font color='#000088'>+  puts( "" );
</font> 
<font color='#880000'>-  puts( "*** END OF TEST GXX 01 ***" );
</font><font color='#000088'>+  test_out_of_mutexes();
</font> 
<font color='#880000'>-  rtems_test_exit(0);
</font><font color='#000088'>+  /* does not return */
</font> }
 
 /* configuration information */
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>