All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Problem throwing a C++ Exception on Blackfin
@ 2010-03-15 14:00 Kolja Waschk
  2010-03-15 14:30 ` Philippe Gerum
  0 siblings, 1 reply; 11+ messages in thread
From: Kolja Waschk @ 2010-03-15 14:00 UTC (permalink / raw)
  To: xenomai

Hi,

first I have to admit that my report is actually about a problem with a quite old Xenomai (Nucleus 2.4.7, I-pipe 1.10) in "stock" Blackfin uClinux kernel 2.6.28 as it comes in Blackfin uClinux-dist 2009R1-RC6.

Testing a newer code base would probably require some days of work to update a custom driver and bring up other problems, so I'm trying to find out whether it is worth the effort at this time. Maybe someone can (roughly) identify the problem's cause (from memory?) and help me to decide whether there is a simple solution, or an upgrade is necessary:

A simple C++ program that creates a task, which does nothing but throws an exception, crashes my BF537. Currently, it results in

> Data access CPLB miss
>  - Used by the MMU to signal a CPLB miss on a data access.
...
>  RETS: <0x004b02be> [ /tmp/test + 0x302be ]
>  PC  : <0x004aff88> [ /tmp/test + 0x2ff88 ]
> DCPLB_FAULT_ADDR: <0xf1380095> /* kernel dynamic memory */
> ICPLB_FAULT_ADDR: <0x004aff88> [ /tmp/test + 0x2ff88 ]

/tmp/test + 0x2ff88 resolves to /usr/src/packages/BUILD/blackfin-toolchain-09r1/../gcc-4.1/gcc/unwind-dw2-fde.c:273

I stripped it down to the small remainder which still triggers the problem (error handling for example was there but I left it out for this post). It doesn't always happen on the first start, but certainly on the second.

The last line showing up if I step through the program is the 'throw "foo"' here in test.cc.

#include <native/task.h>
void task_main(void* arg) {
     try {
         throw "foo";
     }
     catch (...) { }
}

int main() {
     RT_TASK task;
     rt_task_create(&task, "task", 128*1024, 99, T_FPU|T_JOINABLE);
     rt_task_start(&task, task_main, NULL);
}

Any first ideas? I'm going to install more recent versions of kernel and Adeos/I-PIPE/Xenomai, but ideally I would like to keep as much as in the 2009R1 (or 2009R1.1) release version of Blacking uClinux-dist..

Many thanks for taking a look at my problem in advance!
Kolja



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-03-16 14:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15 14:00 [Xenomai-help] Problem throwing a C++ Exception on Blackfin Kolja Waschk
2010-03-15 14:30 ` Philippe Gerum
2010-03-15 16:40   ` Gilles Chanteperdrix
2010-03-15 17:10     ` Philippe Gerum
2010-03-15 17:57       ` Gilles Chanteperdrix
2010-03-15 18:10         ` Philippe Gerum
2010-03-15 18:15           ` Gilles Chanteperdrix
2010-03-16  9:12             ` Kolja Waschk
     [not found]             ` <alpine.DEB.1.10.1003161001560.29063@domain.hid>
2010-03-16  9:15               ` Philippe Gerum
2010-03-16  9:23                 ` Kolja Waschk
2010-03-16 14:11                 ` Kolja Waschk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.