12-17-2010
Compiling with debugger flag -g fixes SEGfault (fortran90)
So the title kinda says it all. I was getting a SEGfault, so I decided to compile with the -g option to find where, and low and behold the SEGfault doesn't occur.
I suppose the answer is "Problem solved! You fixed yet another SEGfault." But I am very curious how this could have happened.
Some info that may help:
1 At first the executable instantly killed itself. After removing some unnecessary variables from the header file, this was fixed. (stack overflow i assume)
2 This is the full compilation command:
ifort -r8 -i4 -mcmodel=large -i-dynamic -align all -g -o code code.f90
3 When compiling without debugger flag messages informing me that loops have been vectorized are printed to screen. Nothing is printed to screen when I compile WITH '-g'.
Thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello, sorry if this has been posted before but i was wondering if there is a way to run a program until a segmentation fault is found.
Currently i'm using a simple shell script which runs my program 100 times, sleeps 1 second because srand(time(0)) is dependent on seconds. Is there a possible... (1 Reply)
Discussion started by: aslambilal
1 Replies
2. Programming
After allocating memory for some variables, segfault is often to happen, due to the same reason: Address 0x1cd00000103 out of bounds
It is welcome to recommend some treatments. Thanks
e.g.
is_done = 0x1cd00000103 <Address 0x1cd00000103 out of bounds>,
hood = 0x23c00000247,
c =... (11 Replies)
Discussion started by: cdbug
11 Replies
3. Solaris
We have a Solaris 8 server which users login to via VNC to get a desktop. On that desktop these users use Netscape Communicator 4.9 to access a very important mail account. Unfortunately Netscape has started segfaulting regularly.
Does anyone have any ideas how I can try to find out what point... (1 Reply)
Discussion started by: aussieos
1 Replies
4. Programming
1. Even if i have the handles for ctrl+c it gives off a segfault
2. syslog doesn't log LOG_ERR event with log masked specified or non specified, it logs LOG_WARNING however...
#include <sys/types.h> /* include this before any other sys headers */
#include <sys/stat.h>
#include <fcntl.h>... (2 Replies)
Discussion started by: james2432
2 Replies
5. Programming
Hello everyone,
I'm writing a program using the id3lib unfortunately I've encountered with memory issue that cause segmentation fault. I tried to rerun and analyze the program with valgrind but it doesn't point me anywhere. I really stuck on this one.
Valgrind output:
==14716== Invalid read of... (2 Replies)
Discussion started by: errb
2 Replies
6. Programming
I have a program that allows users to specify the debug log file location and name.
I have tried using the access() and stat() but they both segfault if the drive say (d:\) is invalid. Both seem to be fine if the drive exists.
Could someone please point me in the direction to a function that... (1 Reply)
Discussion started by: robfwauk
1 Replies
7. Programming
GNU insight debugger is not available now a days and it is required to debug/inspect
assembly code as written in the book Assembly Language Programming step by step in Linux so my question is; is there any alternative to insight that I can use instead of insight in which I can get the same... (5 Replies)
Discussion started by: vectrum
5 Replies
8. Programming
hello all,
my question is not about How code can be rewritten, i just wanna know even though i am not using read only memory of C (i have declared str) why this function gives me segfault :wall:and the other code executes comfortably though both code uses same pointer arithmetic.
... (4 Replies)
Discussion started by: zius_oram
4 Replies
9. Programming
I am populating an array of string and print it.
But it going in infinite loop and causing segfault.
char Name = {
"yahoo",
"rediff",
"facebook",
NULL
};
main(int argc, char* argv)
{
int j = 0;
... (7 Replies)
Discussion started by: rupeshkp728
7 Replies
10. Programming
Another project, another bump in the road and another chance to learn. I've been trying to open gzipped files and parse data from them and hit a snag. I have data in gzips with a place followed by an ip or ip range sort of like this:
Some place:x.x.x.x-x.x.x.x
I was able to modify some code... (6 Replies)
Discussion started by: Azrael
6 Replies
LEARN ABOUT DEBIAN
io::lcdproc
LCDproc(3pm) User Contributed Perl Documentation LCDproc(3pm)
NAME
IO::LCDproc - Perl extension to connect to an LCDproc ready display.
SYNOPSIS
use IO::LCDproc;
my $client = IO::LCDproc::Client->new(name => "MYNAME");
my $screen = IO::LCDproc::Screen->new(name => "screen");
my $title = IO::LCDproc::Widget->new(
name => "date", type => "title"
);
my $first = IO::LCDproc::Widget->new(
name => "first", align => "center", xPos => 1, yPos => 2
);
my $second = IO::LCDproc::Widget->new(
name => "second", align => "center", xPos => 1, yPos => 3
);
my $third = IO::LCDproc::Widget->new(
name => "third", xPos => 1, yPos => 4
);
$client->add( $screen );
$screen->add( $title, $first, $second, $third );
$client->connect() or die "cannot connect: $!";
$client->initialize();
$title->set( data => "This is the title" );
$first->set( data => "First Line" );
$second->set( data => "Second line" );
$third->set( data => "Third Line" );
$client->flushAnswers();
DESCRIPTION
Follow the example above. Pretty straight forward. You create a client, assign a screen, add widgets, and then set the widgets.
IO::LCDproc::Client
It is the back engine of the module. It generates the connection to a ready listening server.
METHODS
new( name => 'Client_Name' [, host => $MYHOSTNAME] [, port => $MYPORTNUMBER] )
Constructor. Takes the following possible arguments (arguments must be given in key => value form):
host, port, and name. name is required.
add( SCREENREF )
Adds the screens that will be attached to this client.
connect()
Establishes connection to LCDproc server (LCDd).
initialize()
Initializes client, screen and all the widgets with the server.
answer()
Reads an answer from the server
flushAnswers()
Flushes all answers from the server (should be called regulary if you don't need the answers)
IO::LCDproc::Screen
METHODS
new( name => 'MYNAME')
Constructor. Allowed options:
heartbeat => 1 or 0.
add( @WIDGETS )
Adds the given widgets to this screen.
set_prio( $prio )
Sets the screen priority with $prio one of
hidden The screen will never be visible
background The screen is only visible when no normal info screens exists
info normal info screen, default priority
foreground an active client
alert The screen has an important message for the user.
input The client is doing interactive input.
IO::LCDproc::Widget
METHODS
new( name => 'MYNAME' )
Constructor. Allowed arguments:
align (left, center, rigth), type (string, title, vbar, hbar, ...), xPos, yPos, data
set()
Sets the widget to the spec'd args. They may be given on the function call or the may be
pre specified.
xPos, yPos, data
save()
Saves current data to be user later.
restore()
Restore previously saved data. (Implicitly calls set)
SEE ALSO
LCDd
AUTHOR
Juan C. Muller, <jcmuller@gmail.com>
COPYRIGHT AND LICENSE
Copyright 2005 by Juan C. Muller
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-04-15 LCDproc(3pm)