Fabrício de Novaes Kucinskis
2014-07-28 18:43:24 UTC
Hello Sebastian, and thanks for your answer.
The following example is enough to illustrate the problem I'm facing:
rtems_task Init(rtems_task_argument argument)
{
int *var = new int[10];
var[0] = 2;
printk("testing... %i", var[0]);
}
If 'var' is allocated on the stack ("int var[10]"), the program runs ok.
When using the 'new' operator (and hence using the heap), the execution
doesn't achieve the Init task, stopping at some instruction inside
_Thread_Start_multitasking() thats what I vaguely called crash before,
sorry for that.
This happens when linking with RTEMS 4.11 for the SIS BSP. Using RTEMS 4.10
for the same BSP, this problem doesn't occur.
I have two suspicions:
1) [more likely] Some problem with my compiling environment that I
could not trace yet, or
2) Some change on the heap setup for the SPARC BSP between the
release 4.10 and the current head of the git repository. I noticed some
change on this aspect with the addition of a 'bsp_early_malloc' function
that didn't exist on 4.10, but I don't think an error like this wouldn't be
noticed previously.
Thanks again and best regards,
Fabrício.
problem.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : <http://lists.rtems.org/mailman/listinfo/users> sebastian.huber
at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
---
Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus está ativa.
http://www.avast.com
The following example is enough to illustrate the problem I'm facing:
rtems_task Init(rtems_task_argument argument)
{
int *var = new int[10];
var[0] = 2;
printk("testing... %i", var[0]);
}
If 'var' is allocated on the stack ("int var[10]"), the program runs ok.
When using the 'new' operator (and hence using the heap), the execution
doesn't achieve the Init task, stopping at some instruction inside
_Thread_Start_multitasking() thats what I vaguely called crash before,
sorry for that.
This happens when linking with RTEMS 4.11 for the SIS BSP. Using RTEMS 4.10
for the same BSP, this problem doesn't occur.
I have two suspicions:
1) [more likely] Some problem with my compiling environment that I
could not trace yet, or
2) Some change on the heap setup for the SPARC BSP between the
release 4.10 and the current head of the git repository. I noticed some
change on this aspect with the addition of a 'bsp_early_malloc' function
that didn't exist on 4.10, but I don't think an error like this wouldn't be
noticed previously.
Thanks again and best regards,
Fabrício.
Hi all,
Ive recently installed RTEMS 4.11 from the git head and am facing a
strangeIve recently installed RTEMS 4.11 from the git head and am facing a
problem: whenever I use the new operator for a C++ application, the
application crashes.
What do you mean with crash?application crashes.
If, for instance, I have a printk instruction some lines before calling
new (as int *a = new int[10];), there is no output. It seems that the
addition of new is forcing the link to some C++ library that is not ok
working well.
I would follow the printk() call and figure out why there is no output.new (as int *a = new int[10];), there is no output. It seems that the
addition of new is forcing the link to some C++ library that is not ok
working well.
RTEMS 4.10 and 4.11 are installed in different computers).
Im feeling dumb right now for not having any idea about what is going on.
Any tips?
It helps if you provide a self contained example that reproduces theIm feeling dumb right now for not having any idea about what is going on.
Any tips?
problem.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : <http://lists.rtems.org/mailman/listinfo/users> sebastian.huber
at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
---
Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus está ativa.
http://www.avast.com