LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-27-2013, 02:29 AM   #1
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
@#&@$ Segmentation fault !!!


I have a PC with 64-bit Slackware 14.0 and multilib installed. I also have a netbook with 32-bit Slackware 14.0 installed.

I have blassic and dosbox installed on both (as 32 bit executables on the PC as well).

I find that when running blassic on the netbook, as soon as I try to dimension a string array, the program aborts with a "Segmentation fault" (and the Terminal program loses its cursor). No problem on the PC though.

Recently I decided to install Windows 3.1 on dosbox. I had no problems doing so on the netbook but I couldn't get very far on the PC before I got the dreaded "Segmentation fault".

This is a particularly unhelpful message as it is as if the system is trying to pretend that the program never ran. I am guessing that a library file might be the culprit but with no information whatsoever given when the fault appears, I am completely at a loss as to how I could track it down.

Is there any way to track down Segmentation faults? Could a static linking (if this is possible) help?
 
Old 07-27-2013, 04:04 AM   #2
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,183

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by psionl0 View Post
...
This is a particularly unhelpful message as
...
This is a particularly helpful message because it often reveals a memory handling problem early. Compile the segfaulted program with debug information and run it under gdb or valgrind will narrow the problem down.
 
Old 07-27-2013, 12:48 PM   #3
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722

Original Poster
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by guanx View Post
Compile the segfaulted program with debug information . . .
I'm not sure how I would modify a SlackBuild script to include the debug information.
 
Old 07-27-2013, 03:55 PM   #4
mariostg
Member
 
Registered: Apr 2011
Location: Gatineau, Quebec
Distribution: OpenBSD
Posts: 80

Rep: Reputation: 5
There are several places in the configure file where CXXFLAGS "seem" to be assigned "-g" (Line 2233 is one place, also 2291 to 2299) switch which would indicate build with debug option. I say "seem" because there are if/else stuff. Did you try to run under gdb as proposed by @guanx?
 
  


Reply



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
ubuntu & firefox - segmentation fault SyCo123 Linux - General 1 07-22-2008 07:49 AM
RPM segmentation fault & database corruption make Mandriva 2 04-17-2007 09:56 AM
Segmentation fault on toplevel = XtVaAppInitialize(&app, "Email", NULL, 0, &argc, cbranje Programming 0 02-19-2005 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:31 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
Open Source Consulting | Domain Registration