LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2005, 08:24 PM   #1
pilphil
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
Core dump in String lib function


I'm working with a piece of legacy code that puts together a rather large SQL statement to be executed at a remote server. The function that I'm having trouble with is assembling the SQL Statement with the help of sprintf and strcat library functions.

When executed on Linux 2.4.21-32 system, this piece of code executes ok, whereas, on a Linux 2.4.21-20 system, this code core dumps.

Using the disassemble command of gdb, the only difference that I can see between the 2 versions of the function is that on Linux2.3.21-32 the call to sprintf is replaced by __cxa_finalize@plt + <address> and the call to strcat is replaced by __deregister_frame_info@plt + <addr>

My question is, what are these __cxa_finalize and __deregister_frame_info functions?

Many thanks in advance for your advice.
 
Old 11-14-2005, 08:31 PM   #2
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
__cxa_atexit and __cxa_finalize are routines that handle destructors for static objects when a shared library is unloaded.
 
Old 11-14-2005, 09:00 PM   #3
pilphil
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks, bosewicht, for your reply. Does that mean something funky is going on - I can't imagine why a call to sprintf would be replaced by a rountine to handle destructors for shared objects? Or is that how it always works?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can a function return a string? hubabuba Programming 13 03-06-2005 03:51 PM
Hash-Function (string to int) Hady Programming 5 04-05-2004 02:53 AM
passing a string to a function jkobrien Programming 8 11-05-2003 02:41 PM
Which lib contains function abrb220 Programming 2 10-08-2003 07:36 AM
core dump while executing a c function from java using JNI kaustubh Linux - Newbie 0 05-25-2002 03:11 AM


All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration