Hi,
I am getting the following problem on AIX.
I create a small shared library. And tried to load it in python.
It core dumps with the following message:
Segmentation fault (core dumped)
At other time with another shared lib I got:
Illegal instruction: core dump
* The program works fine on hp-ux 11.11 and solaris 7.
NOTE:
* python - version: 2.2.3 is compiled with cc_r (Visual age 6.0 compiler)
it is ##### 64 bit ######
* AIX 5
* I compiled the shared lib with xlC, cc_r and g++ to see if the compiler
was an issue
* Also note that: when I copy the pwd.so from lib-dynload/pwd.so and moved
lib-dynload/pwd.so to lib-dynload/pwd.so.org and then imported pwd.so it
when through fine.
* When I wrote a C main() program to load the shared library and load the
symbol using dlopen and dlsym it worked fine.
The python program is:
=============== =============== ===========
import os, sys
print "before import libspam"
import libspam ====> It dumps here
print "after import libspam"
print OK.
=============== =============== ===========
The shared lib code is also very simple
=============== =============== =============== =============== =====
PyObject *
spam_system(PyO bject *self, PyObject *args)
{
char *command;
int sts;
printf("\n In spam_system \n");
if (!PyArg_ParseTu ple(args, "s", &command))
{
printf("\n spam_system: FAILURE");
return NULL;
}
sts = system(command) ;
printf("\n spam_system: SUCCESS");
return Py_BuildValue(" i", sts);
}
static PyMethodDef mmdb_methods[] =
{
{ "spam", spam_system, METH_VARARGS,
"mmdb.contr ol( allow_fail, allow_fall_back ) -- Control the
kind of client that is created"
},
{ 0, 0, 0, 0 }
};
PyObject * initlibspam(voi d)
{
PyObject *module = Py_InitModule3( "libspam", mmdb_methods, "Test Spam");
return module;
}
=============== =============== =============== =============== ===== 0 1760 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Torsten Mohr |
last post by:
Hi,
i write an extension module in C at the moment.
I want to define some constants (integer mainly,
but maybe also some strings).
How do i do that best within this extension module
in C? Do i supply them as RO attributes?
|
by: Torsten Mohr |
last post by:
Hi,
i write an extension module in C at the moment. This
module does some work on some own data types that
consist of some values.
The functions that can change the data are written in C.
The question came up if this is by itself thread safe,
if some two or more threads try to change these data types,
are the C functions by themselves are "atomic" or can they
|
by: Paul Mahon |
last post by:
Hello, I recently managed to corrupt a table pretty badly. I read the
sections in the documentation about recovering after a crash. None of the
methods worked. All give output similar to the following:
% bin/myisamchk -t ~/tmp -f -o BROKE/EventsBROKE
- recovering (with keycache) MyISAM-table 'BROKE/EventsBROKE.MYI'
Data records: 101333504
bin/myisamchk: error: 127 for record at pos 0
MyISAM-table 'BROKE/EventsBROKE' is not fixed because...
|
by: Chandra |
last post by:
Hi, I developed a Visual C++ 6.0 MFC Application on Windows 2000 5.00.2195
Service Pack 4. THe Application runs fine on my machine. But when a customer
who also has Windows 2000 is trying to execute this application, they are
getting the following error.
"the NTVDM encountered an illegal instruction"
What is causing this error and what do i need to do to fix it?.
Thanks
|
by: Simon Burton |
last post by:
Hi,
I'm having some trouble linking one extension module to another because
the linker expects a "lib" prefix and my python modules cannot have
this prefix.
I found two ways of doing it on a linux box (either symlink or create a
dummy .so that links to extension module) but I can get neither of them
work on OSX (let alone windows).
| |
by: Mathias Waack |
last post by:
Hi,
I've embedded python into a legacy application. It works - most of the time.
In some special situations the app crashes executing the "import random".
There are two different situations:
1. the sources compiled with gcc 4.1.2 crash with illegal instruction error:
(running my application)
|
by: murali026 |
last post by:
Hi All,
Here I have an Application which will be running on Power PC Processor.
After some time i have receiving the following error.
Program received a SIGILL, Illegal Instruction.
I am debugging the application remotely from a Linux Machine(RHEL-4).
Could you please help in proceeding further to analyse this problem.
|
by: Just another C hacker |
last post by:
Hello friends,
I'm writing a program in C with some bits in inline asm for efficiency.
I'd like to be able to handle illegal instructions from within asm.
Here's an example of a standalone asm program,
..data
..text
|
by: justduick |
last post by:
I have developed a visual c# application which executes properly on my computer and others that have visual studio installed. however when attempting to run it on a computer without visual studio i receive the error message "the NTVDM CPU has encountered an illegal instruction" in a window titled "16-bit MS-DOS Subsystem". Does anyone know why this is happening or what i can do to get my application to execute?
thanks.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |