All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Xenomai 2.5.0: rt_task_shadow fails when libnative is statically linked.
@ 2010-01-26 14:16 Henri Roosen
  2010-02-01 22:35 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Henri Roosen @ 2010-01-26 14:16 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

Hi all,

I get segmentation fault when calling rt_task_shadow. Actually
somewhere in the pthread library called from sigshadow_install_once();

This only happens on Xenomai 2.5 when libnative is statically linked.
Tested ok on 2.4.10 both dynamically and statically linked. I use
kernel version 2.6.30.10, xenomai 2.5.0 on x86.

Any idea what is wrong?

Reproduced it with basic app that is attached to this email. Compiled with:
gcc -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__
-I/usr/xenomai/include tst_basic.c -o tst_basic
/usr/xenomai/lib/libnative.a -lpthread

Segfailt in dmesg on xenomai 2.5.0:
tst_basic_2.5[1351]: segfault at 0 ip b7ff5a54 sp bfc9b46c error 4 in
libpthread-2.9.so[b7feb000+13000]

[-- Attachment #2: tst_basic.c --]
[-- Type: text/x-csrc, Size: 448 bytes --]

#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
#include <native/task.h>

static RT_TASK rt_task_desc;

int main(void)
{
	int ret;

	ret = mlockall(MCL_CURRENT | MCL_FUTURE);
	if (ret) {
		fprintf(stderr, "mlockall failed %d", ret);
		exit(1);
	}

	ret = rt_task_shadow(&rt_task_desc, "MAIN", 99, 0);
	if (ret) {
		fprintf(stderr, "rt_task_shadow failed %d", ret);
		exit(1);
	}

	while (1)
		rt_task_sleep(10000000LL);

	return 0;
}


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

end of thread, other threads:[~2010-02-02  9:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 14:16 [Xenomai-help] Xenomai 2.5.0: rt_task_shadow fails when libnative is statically linked Henri Roosen
2010-02-01 22:35 ` Gilles Chanteperdrix
2010-02-01 23:52   ` Gilles Chanteperdrix
2010-02-02  9:18     ` Henri Roosen
2010-02-02  9:21       ` Gilles Chanteperdrix

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.