All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: xenoka09@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] NULL pointer access on bfin when linking with xenomai and pthread
Date: Tue, 25 Jan 2011 12:21:33 +0100	[thread overview]
Message-ID: <4D3EB23D.1030500@domain.hid> (raw)
In-Reply-To: <alpine.DEB.1.10.1101251215520.12329@domain.hid>

Kolja Waschk wrote:
> Hi,
> 
>> If not, recompile xenomai with --enable-debug, try and put a breakpoint
>> on the function xeno_sigshadow_handler.  If you hit the breakpoint, try
>> and execute the function step by step, looking whether a pointer could
> 
> The breakpoint isn't hit...
> 
> With following setup:
> 
> # continue to "_dl_get_ready_to_run" to be able to load symbols
> break *($pc - 0xC60 + 0x41B6)
> cont
> 
> sharedlibrary
> break xeno_sigshadow_handler
> break main
> 
> ... the output is as quoted below. Should xeno_sigshadow_handler be called as an
> immediate result of xeno_sigshadow_install? If I break on xeno_sigshadow_install,
> the fault doesn't occur and execution continues without problems to main()...

Well, I am not sure about this. A signal should be received as a result
of the call to __wrap_pthread_setschedparam, but the application should
receive it well before the handler is installed. So, this signal is
probably ignored by default, which somehow makes the thing work.

Anyway, what you can try to do is to mask the SIGSHADOW signal with
pthread_sigmask around the call to sigaction, in order to avoid whatever
race seems to happen with the libpthread library.

-- 
                                                                Gilles.


  reply	other threads:[~2011-01-25 11:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  9:31 [Xenomai-help] NULL pointer access on bfin when linking with xenomai and pthread Kolja Waschk
2011-01-25  9:28 ` Gilles Chanteperdrix
2011-01-25  9:46   ` Kolja Waschk
2011-01-25  9:48   ` Kolja Waschk
2011-01-25  9:50   ` Kolja Waschk
2011-01-25  9:52     ` Gilles Chanteperdrix
2011-01-25 10:15       ` Kolja Waschk
2011-01-25 11:22       ` Kolja Waschk
2011-01-25 11:21         ` Gilles Chanteperdrix [this message]
2011-01-25 12:37           ` Kolja Waschk
2011-01-25 11:32       ` Kolja Waschk

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=4D3EB23D.1030500@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=xenoka09@domain.hid \
    --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.