[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crash at unalign access

From: Mehmet . Ekici
Subject: crash at unalign access
Date: Tue, 25 Apr 2006 16:52:13 +0300

We have a global variable which is initialized to 1 and named AMLogging.
When we compile our source it does not cause any problem but when we change
AMLogging = 0;
and compile, if at run time we try to access to this variable it is causing
system to crash with a floating point exception to 4-byte aligned address.

We think that because the location of the variable moves to bss instead of data
section compiler makes alignment errors.

I also send the snippet from assembly

        .globl  AMLoggingClearedAlarms
        .section        .bss
        .align  2
        .type   AMLoggingClearedAlarms, @object
        .size   AMLoggingClearedAlarms, 4
        .space  4

        .globl  AMLoggingClearedAlarms
        .align  2
        .type   AMLoggingClearedAlarms, @object
        .size   AMLoggingClearedAlarms, 4
        .word   1

Following is about our compiler version and options used.

bt0puk:/home/mekici/crash/geltbas/acpu> mips-gcc -v -save-temps -DLANGUAGE_C
-nostdlib -I. -I./Includes -nostdinc -fsigned-char -fno-builtin -Wreturn-type
-Wuninitialized -Winline -Wswitch -Wchar-subscripts -Wshadow
-Wimplicit-function-declaration -DREL_220 -mlong-calls -mdivide-breaks -mfp32
-mhard-float -mdouble-float -march=rm9k -mips4 -EL -G 0 -c ./image-ver.c
Reading specs from /project/xana/gcc-3.4.3/bin/../lib/gcc/mips/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/home/beckers/crossdev
--target=mips --disable-threads --with-newlib --disable-shared
--enable-languages=c --with-stabs --nfp --with-gnu-as --with-gnu-ld
Thread model: single
gcc version 3.4.3
/project/xana/gcc-3.4.3/bin/../libexec/gcc/mips/3.4.3/cc1 -E -quiet -nostdinc
-v -I. -I./Includes -iprefix /project/xana/gcc-3.4.3/bin/../lib/gcc/mips/3.4.3/
-DGM_PM_TYPE_PROMPT -DREL_220 ./image-ver.c -G 0 -mel -mlong-calls
-mdivide-breaks -mfp32 -mhard-float -mdouble-float -march=rm9k -mips4
-Wreturn-type -Wuninitialized -Winline -Wswitch -Wchar-subscripts -Wshadow
-Wimplicit-function-declaration -fsigned-char -fno-builtin -fworking-directory
-O2 -o image-ver.i
#include "..." search starts here:
#include <...> search starts here:
End of search list.
/project/xana/gcc-3.4.3/bin/../libexec/gcc/mips/3.4.3/cc1 -fpreprocessed
image-ver.i -G 0 -mel -quiet -dumpbase image-ver.c -mlong-calls -mdivide-breaks
-mfp32 -mhard-float -mdouble-float -march=rm9k -mips4 -auxbase image-ver -g -O2
-Wreturn-type -Wuninitialized -Winline -Wswitch -Wchar-subscripts -Wshadow
-Wimplicit-function-declaration -version -fsigned-char -fno-builtin -o
GNU C version 3.4.3 (mips)
       compiled by GNU C version 2.95.3 20010315 (release).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
/project/xana/gcc-3.4.3/bin/../lib/gcc/mips/3.4.3/../../../../mips/bin/as -G 0
-EL -mips4 -O2 -g -no-mdebug -32 -march=rm9k -v -o image-ver.o image-ver.s
GNU assembler version 050111 (mips) using BFD version 050111 20050111

Mehmet Ali EKICI
Office Belgium: +32 3 240 37 46
Office Turkey: +90 216 579 24 07
Mobile: +90 532 740 18 79

reply via email to

[Prev in Thread] Current Thread [Next in Thread]