10 More Discussions You Might Find Interesting
1. Programming
Hello,
This function was copied into my code, which was compiled without error/warning, but when executed there is always Segmentation fault at the end after the output (which seems correct!):
void get_hashes(unsigned int hash, unsigned char *in)
{
unsigned char *str = in;
int pos =... (7 Replies)
Discussion started by: yifangt
7 Replies
2. Programming
Hi
I have struggling a week to fix a program , in the begining i got SIGBUS , but after many attempts still the program gets SIGSEGV segment fault , In bellow i post the seg fault log + source codes. would really appreciate if experts help me to fix this segment fault error. any advice is... (2 Replies)
Discussion started by: pooyair
2 Replies
3. Programming
Hello everybody,
I've been working on a program on my Linux box, after finished the code, i compile it with gcc -Wall option, so i can see what's wrong or unused.
The Walll output shows nothing, so there are no loose ends on the program.
I run the program on my system, and it works PERFECTLY.... (5 Replies)
Discussion started by: Zykl0n-B
5 Replies
4. Programming
I always get segment fault, why? can sb help me and modify it, I have spend on much time on
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <string.h>
#define MAX 10
pthread_t thread;
void *thread1()
{
int *a;
int i, n;
... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
5. Programming
Hi,
Whether the following piece of code is placed in the read-only memory of code (text) segment or data segment?
char *a = "Hello";
I am getting two different answers while searching in google :( that's why the confusion is (7 Replies)
Discussion started by: royalibrahim
7 Replies
6. Programming
I´m writing this program in QNX , I`m kinda new to UNIX and programing in general, and when I try to run it it gives me the Memory Fault error. Can anyone help?
#include <stdio.h>
#include <fcntl.h>
void main(void)
{int a,ter;
char buf;
printf("a=");
scanf("%d",a);
ter=open... (6 Replies)
Discussion started by: GiganteAsesino
6 Replies
7. Programming
Hi all
In the ltp-posix test,there is a case in open_posix_testsuite\conformance\interfaces\timer_gettime\speculative/6-1.c
I run the above code,it will has a segment fault, if I modify it to below,it works well
Anybody can tell me why? (1 Reply)
Discussion started by: yanglei_fage
1 Replies
8. Programming
Hi
some help read............
I'm getting a segmentation fault when I run an AIX COBOL/Db2 program.
I initiate the program from the command line, but it hangs, and then when I press enter it generates a segmantation fault and produces a core dump.
The box is running AIX software level ... (5 Replies)
Discussion started by: steve_f
5 Replies
9. Programming
Dear all,
I used debugger from C++ and these are the message I got:
Program received signal SIGSEGV, Segmentation fault.
0x00323fc0 in free () from /lib/tls/libc.so.6
(gdb) info s
#0 0x00323fc0 in free () from /lib/tls/libc.so.6
#1 0x00794fa1 in operator delete () from... (5 Replies)
Discussion started by: napapanbkk
5 Replies
10. Programming
When run it, segment fault.
What is wrong?
#include <stdio.h>
#include <stdlib.h>
const int max =20;
//****************************************************
// Input Matrix
//****************************************************
void inMatrixAA(int *AA, int row, int col)... (9 Replies)
Discussion started by: zhshqzyc
9 Replies
uac(1) General Commands Manual uac(1)
NAME
uac - Unaligned Access Message Control
SYNOPSIS
uac p | s [value]
uac p | s [keyword]
OPTIONS
The following options are used with the uac command: Sets or displays the current option setting for the parent process Sets or displays
the current option setting for the system
The following keywords are used with the p option: Reset the current option settings to the default for the parent process Do not print the
unaligned access warning message for the parent process Do not fix the unaligned access for the parent process Deliver a SIGBUS signal to
the parent process
The following keywords are used with the s option: Reset the current option settings to the default for the system Do not print the
unaligned access warning message for the system
Usually, the parent process is the shell.
DESCRIPTION
Most complex instruction set computers (CISC) can access unaligned data but only at a significantly reduced speed. Most reduced instruc-
tion set computers (RISC) do not attempt to handle unaligned accesses. Instead, they generate an unaligned access trap and let the operat-
ing system handle the fault.
The default action for the operating system when an unaligned access fault occurs is to fix the unaligned access fault and then display a
warning message informing the user process that an unaligned access fault has occurred. The warning message has the following form:
"Unaligned access pid=nnn <prog_name> va=virtual_addr pc=pc_addr". If you want to change the code to prevent the unaligned access faults
from occurring in the future, the warning message gives you the information you need to locate the code causing a fault. (See the Program-
mer's Guide for details on the causes and effects of misaligned data.)
In addition, the default action for the operating system is to not deliver a SIGBUS signal to the parent process when an unaligned access
fault occurs.
These defaults are satisfactory for most users, but some users require a different behavior and want to specify their own Unaligned Access
Control (UAC).
The uac command enables or disables the display of "Unaligned access" messages. The command sets or displays the UAC_NOPRINT, UAC_NOFIX,
and UAC_SIGBUS options, as defined in setsysinfo(2).
If value is not specified, the current option setting is displayed. You can specify value as either 0 (zero) or 1 (one). If value is 0
(zero), the option is turned on and messages are not displayed. If value is 1 (one), the option is turned off and messages are displayed.
Keywords can be used singly, or in any combination. However, the reset keyword overrides any other keywords it is used with.
RESTRICTIONS
You must be superuser to set the system option.
EXAMPLES
Both of the following commands disable messages for the parent process: # uac p 0
# uac p noprint Both of the following commands enable messages for the system: # uac s 1
# uac s reset The following command disables fixing of an unaligned access fault, disables printing a message for an unaligned
access fault to the parent process, and enables delivery of a SIGBUS signal to the parent process: # uac p nofix noprint sigbus
SEE ALSO
getsysinfo(2), setsysinfo(2)
Programmer's Guide
uac(1)