Unrue
11-06-2008, 14:06
Ciao a tutti,
ho patchato il gcc 4.0.2 aggiungendo il bound checking. Quindi, compilando con le opzioni di debug e -fbounds-checking, rileva eventuali sforamenti degli array. Il problema è che gli indirizzi di memoria che mi riporta sono tutti nulli:
Bounds Checking GCC v gcc-4.0.2-3.2 Copyright (C) 1995 Richard W.M. Jones
Bounds Checking comes with ABSOLUTELY NO WARRANTY. For details see file
`COPYING' that should have come with the source to this program.
Bounds Checking is free software, and you are welcome to redistribute it
under certain conditions. See the file `COPYING' for details.
For more information, set GCC_BOUNDS_OPTS to `-help'
prova_stack.c:6:Bounds error: array reference (10) outside bounds of the array.
prova_stack.c:6: Pointer value: 0x0
prova_stack.c:6: Object `x':
prova_stack.c:6: Address in memory: 0x0 .. 0xf
prova_stack.c:6: Size: 80 bytes
prova_stack.c:6: Element size: 8 bytes
prova_stack.c:6: Number of elements: 10
prova_stack.c:6: Created at: prova_stack.c, line 4
prova_stack.c:6: Storage class: stack
Aborted
tale patch, l'ho provata su un pc e funziona. Cambiando pc, mi dà questo problema. Cosa può essere che dà fastidio? Grazie.
ho patchato il gcc 4.0.2 aggiungendo il bound checking. Quindi, compilando con le opzioni di debug e -fbounds-checking, rileva eventuali sforamenti degli array. Il problema è che gli indirizzi di memoria che mi riporta sono tutti nulli:
Bounds Checking GCC v gcc-4.0.2-3.2 Copyright (C) 1995 Richard W.M. Jones
Bounds Checking comes with ABSOLUTELY NO WARRANTY. For details see file
`COPYING' that should have come with the source to this program.
Bounds Checking is free software, and you are welcome to redistribute it
under certain conditions. See the file `COPYING' for details.
For more information, set GCC_BOUNDS_OPTS to `-help'
prova_stack.c:6:Bounds error: array reference (10) outside bounds of the array.
prova_stack.c:6: Pointer value: 0x0
prova_stack.c:6: Object `x':
prova_stack.c:6: Address in memory: 0x0 .. 0xf
prova_stack.c:6: Size: 80 bytes
prova_stack.c:6: Element size: 8 bytes
prova_stack.c:6: Number of elements: 10
prova_stack.c:6: Created at: prova_stack.c, line 4
prova_stack.c:6: Storage class: stack
Aborted
tale patch, l'ho provata su un pc e funziona. Cambiando pc, mi dà questo problema. Cosa può essere che dà fastidio? Grazie.