Sponsored Content
Full Discussion: dlclose crashing in 64bit
Top Forums Programming dlclose crashing in 64bit Post 302098568 by jim mcnamara on Tuesday 5th of December 2006 05:44:31 AM
Old 12-05-2006
If it is on different hardware platforms then it's possible. SIGBUS usually means alignment problems - instead of a pointer being aligned on a page boundary or a longword boundary, it's off by a few bytes. Or, more likely, it references an address that is off.

The reason I suggested corruption (or something is changing the value) is because
the code obviously worked earlier in the code - dlclose is called after you're done.
The pointer "worked" earlier.

I'm guessing you are probably overwriting the stack somewhere earlier in the code.

Now, if you suspect the compilation issue, then compile locally, and do a test run. If problems go away, then you have runtime library differences from box to box that are trashing the pointer.

See the post by driver about tracking down mysterious corruption:
https://www.unix.com/programming/20704-memory-stack-problem.html
 

9 More Discussions You Might Find Interesting

1. Programming

dlclose on FreeBSD

Anyone knows how to use dynamic module loading through dlopen/dlsym/dlclose properly on FreeBSD? I wrote a tiny program to learn KDE programming. Perhaps I give you a small snippet to look at int IPTablesApp::Start(int argc, char* argv) { typedef void (*init_t)(int, char*); init_t init;... (0 Replies)
Discussion started by: cbkihong
0 Replies

2. Programming

c++ class keeps crashing

i just started learning to prog in c++, im using netbeans. i tryed to make a class and i keep getting this error. what am i doing wrong ? ----------------------------- class test { public: int funtime(); private: int time; }; int test::funtime()... (4 Replies)
Discussion started by: akira300
4 Replies

3. Solaris

Solaris 10 crashing

Hi, My system is crashing with following error .. i tried to boot from the network and unencapsulated the root disk from SVM .. but still not able to boot the box , can any one point me to some direction .. i do not want to build the box new as of now just want to troubleshoot if possible.. ... (3 Replies)
Discussion started by: fugitive
3 Replies

4. Red Hat

Fedora 11 crashing help

Using Fedora 11, just about every day the system started crashing. Becomes unresponsive to keyboard/mouse, nothing appears on screen but box is still running. Still responds to ping, arp address stays alive in the firewall, other than that its unresponsive Where can I look to find out... (1 Reply)
Discussion started by: ippy98
1 Replies

5. Programming

Why this C program is crashing?

Hi, Why I am getting 'SIGSEGV' in the following code? char* p="abcde"; printf("%s", 3); // Segmentation Fault (core dump) Kindly help me to understand what exactly makes the program to crash or the reason for the crashing. (7 Replies)
Discussion started by: royalibrahim
7 Replies

6. Web Development

MySQL Server Crashing need Help

Hi, we have some problem with mysql high cpu , would like some help with MySQL Tuning here are the mysqltuner & tuning-primer details mysqltuner: # mysqltuner >> MySQLTuner 1.1.1 - Major Hayden <major@mhtx.net> >> Run with '--help' for additional options and output filtering --------... (1 Reply)
Discussion started by: cataplexy
1 Replies

7. UNIX and Linux Applications

Firefox crashing

Firefox keeps on crashing every time I try to run it. I tried to create a new profile with no luck. When I try to open up the profile manager firefox crashes. I even deleted my profile folder and tried to start with a new profile. That did not work either. I don't know what the problem could be. I... (6 Replies)
Discussion started by: cokedude
6 Replies

8. UNIX for Dummies Questions & Answers

Random Crashing

Over the last month or so my CentOS server has been crashing for reasons I do not know. It has been running for over a year with regular yum updates without problems. The load on the server is perfectly normal with CPU usage at 5-6% and RAM usage at less than half of 32GB of RAM (multiple smaller... (3 Replies)
Discussion started by: spinner0205
3 Replies

9. Solaris

Solaris V440 keeps crashing

Hi, I have Sun Solaris V440, every two days or so, the system crashes and it's at OK prompt. After that I do the FSCK and clear all the bad sectors. Then system stays up for close to 48 hours. Then it crashes again. I checked the logs and I don't see anything under /var/adm/messages file. ... (1 Reply)
Discussion started by: samnyc
1 Replies
memalign(3C)															      memalign(3C)

NAME
memalign() - allocate aligned memory SYNOPSIS
DESCRIPTION
allocates space for a block of size bytes, whose address is a multiple of boundary. The space is not initialized. The boundary must be a power of 2. EXTERNAL INFLUENCES
employs the allocator. For tuning information, see the malloc(3C) man page. RETURN VALUE
Upon successful completion, returns a pointer to space aligned to a multiple of boundary. Otherwise, it returns a NULL pointer. DIAGNOSTICS
returns a NULL pointer if there is no available memory, or if the value of boundary is not a power of 2. ERRORS
sets to and returns a NULL pointer when an out-of-memory condition arises. sets to and returns a NULL pointer when the value of boundary is not a power of 2. sets to and returns a NULL pointer when the memory being managed by has been detectably corrupted. WARNINGS
For warnings, see the malloc(3C) man page. SEE ALSO
thread_safety(5). STANDARDS CONFORMANCE
There appear to be no standards applicable to Some implementations do not check that boundary is a power of 2. The HP-UX implementation is not derived from any predecessor. memalign(3C)
All times are GMT -4. The time now is 01:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy