|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6029
|
[C] Gcc modificato con bound checking
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: Codice:
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 |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 11:03.