Logo Hardware.com.br
niTsumuji
niTsumuji Veterano Registrado
1.4K Mensagens 1 Curtida

corrupted double-linked list?

#1 Por niTsumuji 17/02/2006 - 21:38
Estou tendo um problema aqui no meu programa que está dando o seguinte erro:
*** glibc detected *** corrupted double-linked list: 0x08c9cea8 ***
Acontece toda vez que sai do programa. Depois que eu criei essas estruturas é que começou a aparecer esse erro:
	struct objsEditor{
int indice;
float translate[3];
float rotate[4];
int id_objeto;
int id_textura;
};
std::string editArqmapa;
objsEditor* editObjeto_Corrente;
objsEditor* editObjeto;

Não tem nada de errado aqui certo?
Então as instancio assim:
editObjeto_Corrente = new objsEditor;
editObjeto = new objsEditor[65535];

Certo. Mas porque diabos está dando isso? O programa funciona normal. Só dá o pau quando encerro.
pflynn
pflynn Ubbergeek Registrado
5.5K Mensagens 122 Curtidas
#4 Por pflynn
20/02/2006 - 21:02
Postei isso em outro lugar, há algum tempo atrás, para outra pessoa, com a mesma dúvida que você apresentou:

Veja se isso ajuda:

glibc

The version of glibc provided with Fedora Core 3 performs additional internal sanity checks to prevent and detect data corruption as early as possible. By default, should corruption be detected, a message similar to the following will be displayed on standard error (or logged via syslog if stderr is not open):

*** glibc detected *** double free or corruption: 0x0937d008 ***

By default, the program that generated this error will also be killed; however, this (and whether or not an error message is generated) can be controlled via the MALLOC_CHECK_ environment variable. The following settings are supported:

0 — Do not generate an error message, and do not kill the program
1 — Generate an error message, but do not kill the program
2 — Do not generate an error message, but kill the program
3 — Generate an error message and kill the program

Note

If MALLOC_CHECK_ is explicitly set a value other than 0, this causes glibc to perform more tests that are more extensive than the default, and may impact performance.

Should you have a program from a third party ISV that triggers these corruption checks and displays a message, you should file a defect report with the application's vendor, since this indicates a serious bug.

Fonte
------------------------------------------------
Muito bom. Mas tijolo não revida!
------------------------------------------------
© 1999-2024 Hardware.com.br. Todos os direitos reservados.
Imagem do Modal