From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Henry Bausley <hbausley@deltatau.com>
Cc: "Xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] segfaults when using xenomai shared library
Date: Thu, 23 Apr 2015 16:34:07 +0200 [thread overview]
Message-ID: <20150423143407.GI7109@hermes.click-hack.org> (raw)
In-Reply-To: <1429798709.21270.3.camel@lx-henry>
On Thu, Apr 23, 2015 at 07:18:29AM -0700, Henry Bausley wrote:
> I am seeing a intermittent segfaults when linking to a shared library
> that links with xenomai.
>
> I sometimes get
> [30354.351344] projpp[25002]: segfault at c ip b751bcfa sp b770c238
> error 4 in libpthread-2.19.so[b7511000+18000]
>
> My shared library libppmac.so contains a single function and absolutely
> nothing else
>
> int Test(void)
> {
> return 1 + 1;
> }
>
> ldd returns
>
> root@10.34.9.73:/opt/ppmac/libppmac# ldd libppmac.so
> linux-gate.so.1 => (0xb7779000)
> libpthread_rt.so.1 => /usr/lib/libpthread_rt.so.1 (0xb774e000)
> libxenomai.so.0 => /usr/lib/libxenomai.so.0 (0xb7746000)
> libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7596000)
> libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb757a000)
> librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb7571000)
> /lib/ld-linux.so.2 (0xb777a000)
>
> My application does not even call the function in the shared library.
> Its code is as follows
>
> #include <pthread.h>
> #include <dlfcn.h>
>
> int Test(void);
>
> int main(int argc, char *argv[])
> {
> printf("pthread_setschedparam(pthread_self(),SCHED_OTHER,¶m);\n");
> }
>
> int CallLibraryToBreak(void)
> {
> Test();
> }
>
> The application does not segfault if I do not link the xenomai libraries
> ie.
There is a case you seem to not have tested. What about linking with
xenomai libraries without linking to libppmac.so ?
--
Gilles.
next prev parent reply other threads:[~2015-04-23 14:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 14:18 [Xenomai] segfaults when using xenomai shared library Henry Bausley
2015-04-23 14:34 ` Gilles Chanteperdrix [this message]
2015-04-23 14:47 ` Henry Bausley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150423143407.GI7109@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=hbausley@deltatau.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.