All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edouard Tisserant <edouard.tisserant@gmail.com>
To: Philippe Gerum <rpm@xenomai.org>,
	"Xenomai (xenomai@xenomai.org)" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Crash with longer dlopen/dlcose sequence
Date: Fri, 27 Apr 2018 12:31:06 +0200	[thread overview]
Message-ID: <e937a73f-ef0f-5394-bdae-400fcfe30ddb@gmail.com> (raw)
In-Reply-To: <1dbe3f00-a866-248c-3799-a0d8efeee4e4@gmail.com>


> It seems that __xenomai_init() calls many things from the setup list, in
> multiple shared objects. So I would need to build another flavor of the
> boilerplate: bootstrap.so, from witch I can call xenomai_init() directly
> using python's ctypes. Does it look realistic ?

For the record, following python code calls xenomai_init_dso() directly
from libcobalt.so.

from ctypes import *
# declaration
argvp_type = POINTER(POINTER(POINTER(c_char)))
cobalt = cdll.LoadLibrary("libcobalt.so")
cobalt.xenomai_init_dso.argtypes = (POINTER(c_int), argvp_type)
# init params
argc = c_int(0)
argv = (POINTER(c_char) * 2)()
argv[0] = create_string_buffer("prog_name")
argv[1] = None
# call
cobalt.xenomai_init_dso(pointer(argc), cast(pointer(argv), argvp_type))

Now let see if dlopen/dlclose some code using alchemy segfaults or not...

--
Edouard




  reply	other threads:[~2018-04-27 10:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26  7:02 [Xenomai] Crash with longer dlopen/dlcose sequence Edouard Tisserant
2018-04-26  7:39 ` Edouard Tisserant
2018-04-26  9:24   ` Edouard Tisserant
2018-04-26 11:07     ` Henning Schild
2018-04-26 15:30     ` Philippe Gerum
2018-04-26 17:16       ` Edouard Tisserant
2018-04-27 10:31         ` Edouard Tisserant [this message]
2018-04-27 14:43           ` Edouard Tisserant
2018-04-27 15:43             ` Philippe Gerum
2018-05-09  7:45               ` Edouard Tisserant
2018-05-09  8:57                 ` Edouard Tisserant
2018-05-09 10:27                   ` Edouard Tisserant
2018-05-12 17:08                     ` Philippe Gerum
2018-05-16  9:20                       ` Edouard Tisserant
2018-05-18  7:08                         ` Philippe Gerum

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=e937a73f-ef0f-5394-bdae-400fcfe30ddb@gmail.com \
    --to=edouard.tisserant@gmail.com \
    --cc=rpm@xenomai.org \
    --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.