change log for rtems (2010-06-21)

rtems-vc at rtems.org rtems-vc at rtems.org
Tue Jun 22 02:11:55 UTC 2010


 *ccj*:
2010-06-22      Chris Johns <chrisj at rtems.org>

        * startup/m68k-stub.c: PR 1539. Fix buffer overrun.

M  1.127  c/src/lib/libbsp/m68k/ods68302/ChangeLog
M   1.12  c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c

diff -u rtems/c/src/lib/libbsp/m68k/ods68302/ChangeLog:1.126 rtems/c/src/lib/libbsp/m68k/ods68302/ChangeLog:1.127
--- rtems/c/src/lib/libbsp/m68k/ods68302/ChangeLog:1.126	Fri Apr 30 11:44:16 2010
+++ rtems/c/src/lib/libbsp/m68k/ods68302/ChangeLog	Mon Jun 21 21:03:36 2010
@@ -1,3 +1,7 @@
+2010-06-22	Chris Johns <chrisj at rtems.org>
+
+	* startup/m68k-stub.c: PR 1539. Fix buffer overrun.
+	
 2010-04-30	Joel Sherrill <joel.sherrilL at OARcorp.com>
 
 	* include/bsp.h: Add BSP_SMALL_MEMORY.

diff -u rtems/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c:1.11 rtems/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c:1.12
--- rtems/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c:1.11	Wed Apr 28 14:43:37 2010
+++ rtems/c/src/lib/libbsp/m68k/ods68302/startup/m68k-stub.c	Mon Jun 21 21:03:36 2010
@@ -601,7 +601,7 @@
     count = 0;
 
     /* now, read until a # or end of buffer is found */
-    while (count < BUFMAX) {
+    while (count < (BUFMAX - 1)) {
       ch = getDebugChar() & 0x7f;
       if (ch == '#') break;
       checksum = checksum + ch;


 *joel*:
2010-06-21	Joel Sherrill <joel.sherrill at oarcorp.com>

	* Makefile.am, configure.ac, spfatal_support/init.c,
	spfatal_support/system.h: Add new tests to generate fatal errors in
	open_dev_console().
	* spfatal14/.cvsignore, spfatal14/Makefile.am, spfatal14/spfatal14.doc,
	spfatal14/spfatal14.scn, spfatal14/testcase.h, spfatal15/.cvsignore,
	spfatal15/Makefile.am, spfatal15/spfatal15.doc,
	spfatal15/spfatal15.scn, spfatal15/testcase.h,
	spfatal_support/consume_sems.c: New files.

M  1.380  testsuites/sptests/ChangeLog
M   1.88  testsuites/sptests/Makefile.am
M   1.93  testsuites/sptests/configure.ac
A    1.1  testsuites/sptests/spfatal14/.cvsignore
A    1.1  testsuites/sptests/spfatal14/Makefile.am
A    1.1  testsuites/sptests/spfatal14/spfatal14.doc
A    1.1  testsuites/sptests/spfatal14/spfatal14.scn
A    1.1  testsuites/sptests/spfatal14/testcase.h
A    1.1  testsuites/sptests/spfatal15/.cvsignore
A    1.1  testsuites/sptests/spfatal15/Makefile.am
A    1.1  testsuites/sptests/spfatal15/spfatal15.doc
A    1.1  testsuites/sptests/spfatal15/spfatal15.scn
A    1.1  testsuites/sptests/spfatal15/testcase.h
A    1.1  testsuites/sptests/spfatal_support/consume_sems.c
M    1.8  testsuites/sptests/spfatal_support/init.c
M    1.5  testsuites/sptests/spfatal_support/system.h

diff -u rtems/testsuites/sptests/ChangeLog:1.379 rtems/testsuites/sptests/ChangeLog:1.380
--- rtems/testsuites/sptests/ChangeLog:1.379	Mon Jun 21 17:54:24 2010
+++ rtems/testsuites/sptests/ChangeLog	Mon Jun 21 20:28:13 2010
@@ -1,5 +1,16 @@
 2010-06-21	Joel Sherrill <joel.sherrill at oarcorp.com>
 
+	* Makefile.am, configure.ac, spfatal_support/init.c,
+	spfatal_support/system.h: Add new tests to generate fatal errors in
+	open_dev_console().
+	* spfatal14/.cvsignore, spfatal14/Makefile.am, spfatal14/spfatal14.doc,
+	spfatal14/spfatal14.scn, spfatal14/testcase.h, spfatal15/.cvsignore,
+	spfatal15/Makefile.am, spfatal15/spfatal15.doc,
+	spfatal15/spfatal15.scn, spfatal15/testcase.h,
+	spfatal_support/consume_sems.c: New files.
+
+2010-06-21	Joel Sherrill <joel.sherrill at oarcorp.com>
+
 	* sp43/init.c: Remove more ITRON references.
 
 2010-06-21	Joel Sherrill <joel.sherrill at oarcorp.com>

diff -u rtems/testsuites/sptests/Makefile.am:1.87 rtems/testsuites/sptests/Makefile.am:1.88
--- rtems/testsuites/sptests/Makefile.am:1.87	Sun Jun 20 14:48:02 2010
+++ rtems/testsuites/sptests/Makefile.am	Mon Jun 21 20:28:13 2010
@@ -18,7 +18,8 @@
     spchain spclockget spcoverage spobjgetnext spnotepad01 spprintk spsize \
     spstkalloc spthreadq01 spwatchdog spwkspace \
     spfatal01 spfatal02 spfatal03 spfatal04 spfatal05 spfatal06 spfatal07 \
-    spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 \
+    spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
+    spfatal15 \
     spfifo01 spfifo02 spfifo03 spfifo04 spfifo08 \
     spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
     spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \

diff -u rtems/testsuites/sptests/configure.ac:1.92 rtems/testsuites/sptests/configure.ac:1.93
--- rtems/testsuites/sptests/configure.ac:1.92	Sun Jun 20 14:48:03 2010
+++ rtems/testsuites/sptests/configure.ac	Mon Jun 21 20:28:13 2010
@@ -112,6 +112,8 @@
 spfatal11/Makefile
 spfatal12/Makefile
 spfatal13/Makefile
+spfatal14/Makefile
+spfatal15/Makefile
 spfifo01/Makefile
 spfifo02/Makefile
 spfifo03/Makefile

diff -u /dev/null rtems/testsuites/sptests/spfatal14/.cvsignore:1.1
--- /dev/null	Mon Jun 21 21:11:53 2010
+++ rtems/testsuites/sptests/spfatal14/.cvsignore	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/sptests/spfatal14/Makefile.am:1.1
--- /dev/null	Mon Jun 21 21:11:53 2010
+++ rtems/testsuites/sptests/spfatal14/Makefile.am	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal14
+spfatal14_SOURCES = ../spfatal_support/init.c \
+    ../spfatal_support/consume_sems.c \
+    ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal14.scn
+dist_rtems_tests_DATA += spfatal14.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+AM_CPPFLAGS += -DSEMAPHORES_REMAINING=6
+
+LINK_OBJS = $(spfatal14_OBJECTS) $(spfatal14_LDADD)
+LINK_LIBS = $(spfatal14_LDLIBS)
+
+spfatal14$(EXEEXT): $(spfatal14_OBJECTS) $(spfatal14_DEPENDENCIES)
+	@rm -f spfatal14$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/sptests/spfatal14/spfatal14.doc:1.1
--- /dev/null	Mon Jun 21 21:11:53 2010
+++ rtems/testsuites/sptests/spfatal14/spfatal14.doc	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,24 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  spfatal14
+
+directives:
+
+  + open("dev/console")
+
+concepts:
+
++ fail to open stderr in open_dev_console.c
+
+

diff -u /dev/null rtems/testsuites/sptests/spfatal14/spfatal14.scn:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal14/spfatal14.scn	Mon Jun 21 20:28:13 2010
@@ -0,0 +1 @@
+Fatal error (fail to open stderr) hit

diff -u /dev/null rtems/testsuites/sptests/spfatal14/testcase.h:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal14/testcase.h	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,26 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+/* generate fatal errors in open_dev_console.c */
+
+#define FATAL_ERROR_TEST_NAME            "14"
+#define FATAL_ERROR_DESCRIPTION          "fail to open stdout"
+#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR       0x55544431
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+  CONSUME_SEMAPHORE_DRIVERS
+
+void force_error()
+{
+  /* we will not run this far */
+}

diff -u /dev/null rtems/testsuites/sptests/spfatal15/.cvsignore:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal15/.cvsignore	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/sptests/spfatal15/Makefile.am:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal15/Makefile.am	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,29 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spfatal15
+spfatal15_SOURCES = ../spfatal_support/init.c \
+    ../spfatal_support/consume_sems.c \
+    ../spfatal_support/system.h testcase.h
+
+dist_rtems_tests_DATA = spfatal15.scn
+dist_rtems_tests_DATA += spfatal15.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+AM_CPPFLAGS += -DSEMAPHORES_REMAINING=7
+
+LINK_OBJS = $(spfatal15_OBJECTS) $(spfatal15_LDADD)
+LINK_LIBS = $(spfatal15_LDLIBS)
+
+spfatal15$(EXEEXT): $(spfatal15_OBJECTS) $(spfatal15_DEPENDENCIES)
+	@rm -f spfatal15$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/sptests/spfatal15/spfatal15.doc:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal15/spfatal15.doc	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,22 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  On-Line Applications Research Corporation (OAR).
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  spfatal15
+
+directives:
+
+  + open("dev/console")
+
+concepts:
+
++ fail to open stderr in open_dev_console.c

diff -u /dev/null rtems/testsuites/sptests/spfatal15/spfatal15.scn:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal15/spfatal15.scn	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,5 @@
+*** TEST FATAL 15 ***
+Fatal error (fail to open stderr) NOT hit
+[joel at localhost spfatal15]$ make clean all >/dev/null && sis -i *.exe
+sparc-rtems4.11-run is /opt/rtems-4.11/bin/sparc-rtems4.11-run
+Fatal error (fail to open stderr) hit

diff -u /dev/null rtems/testsuites/sptests/spfatal15/testcase.h:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal15/testcase.h	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,25 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+/* generate fatal errors in open_dev_console.c */
+#define FATAL_ERROR_TEST_NAME            "15"
+#define FATAL_ERROR_DESCRIPTION          "fail to open stderr"
+#define FATAL_ERROR_EXPECTED_SOURCE      INTERNAL_ERROR_RTEMS_API
+#define FATAL_ERROR_EXPECTED_IS_INTERNAL FALSE
+#define FATAL_ERROR_EXPECTED_ERROR       0x55544432
+
+#define CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS \
+  { consume_semaphores_initialize, NULL, NULL, NULL, NULL, NULL }
+
+void force_error()
+{
+  /* we will not run this far */
+}

diff -u /dev/null rtems/testsuites/sptests/spfatal_support/consume_sems.c:1.1
--- /dev/null	Mon Jun 21 21:11:54 2010
+++ rtems/testsuites/sptests/spfatal_support/consume_sems.c	Mon Jun 21 20:28:13 2010
@@ -0,0 +1,54 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <rtems.h>
+
+#define MAXIMUM 20
+rtems_id Semaphores[MAXIMUM];
+
+rtems_device_driver consume_semaphores_initialize(
+  rtems_device_major_number major __attribute__((unused)),
+  rtems_device_minor_number minor __attribute__((unused)),
+  void *pargp __attribute__((unused))
+)
+{
+  int               sems;
+  rtems_status_code status;
+
+  for ( sems=0 ; sems<MAXIMUM ; sems++ ) {
+    status = rtems_semaphore_create(
+      rtems_build_name( 'S', 'M', '1', ' ' ),
+      1,
+      RTEMS_DEFAULT_MODES,
+      RTEMS_NO_PRIORITY,
+      &Semaphores[sems]
+    );
+    if ( status == RTEMS_TOO_MANY )
+     break;
+  }
+
+  #if 0
+    printk( "Consumed %d\n", sems );
+    printk( "Freeing %d\n", SEMAPHORES_REMAINING );
+  #endif
+
+  #if defined(SEMAPHORES_REMAINING)
+  {
+    int i;
+
+    for ( i=0 ; i<SEMAPHORES_REMAINING ; i++ ) {
+      (void) rtems_semaphore_delete( Semaphores[i] );
+    }
+  }
+  #endif
+  return RTEMS_SUCCESSFUL;
+}
+

diff -u rtems/testsuites/sptests/spfatal_support/init.c:1.7 rtems/testsuites/sptests/spfatal_support/init.c:1.8
--- rtems/testsuites/sptests/spfatal_support/init.c:1.7	Sat Jun 19 15:55:03 2010
+++ rtems/testsuites/sptests/spfatal_support/init.c	Mon Jun 21 20:28:13 2010
@@ -102,7 +102,7 @@
   }
   else if (source == INTERNAL_ERROR_RTEMS_API ){
     if (error >  RTEMS_NOT_IMPLEMENTED )
-      printk("Unknown Internal Rtems Error (%d)", error);
+      printk("Unknown Internal Rtems Error (0x%08x)", error);
     else
       printk( Errors_Rtems[ error ] );
   }

diff -u rtems/testsuites/sptests/spfatal_support/system.h:1.4 rtems/testsuites/sptests/spfatal_support/system.h:1.5
--- rtems/testsuites/sptests/spfatal_support/system.h:1.4	Sat Sep 26 10:47:16 2009
+++ rtems/testsuites/sptests/spfatal_support/system.h	Mon Jun 21 20:28:13 2010
@@ -45,6 +45,15 @@
 
 /* need some prototypes for test cases */
 
+rtems_device_driver consume_semaphores_initialize(
+  rtems_device_major_number major __attribute__((unused)),
+  rtems_device_minor_number minor __attribute__((unused)),
+  void *pargp __attribute__((unused))
+);
+
+#define CONSUME_SEMAPHORE_DRIVERS \
+  { consume_semaphores_initialize, NULL, NULL, NULL, NULL, NULL }
+
 #include "testcase.h"
 
 /* configuration information */



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100621/41aa7aac/attachment.html>


More information about the vc mailing list