Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


Aix5L compiled on the 64 places, the operation would coredump. . . . . ?

Aix5.2,64 spaces for the operating system. My code is very simple (a greenhorn, just to SCO on the aix), as follows :
Code :
[code]
#include "Stdio.h>;

Typedef struct st_node
{
Char name[20];
Char addess[100];
ST_NODE;)

Int main (void)
{
ST_NODE *node1;

Node1 = (ST_NODE *) malloc (sizeof (ST_NODE));
Printf ( "step1. . . \n ");
Bzero (node1, sizeof (ST_NODE));
Printf ( "step2. . . \n ");

Return 0
}
[code]

Assuming that the document, entitled tc.
1, I used the translation xlc -ot tc get t, t-operation, the output is as follows :
Step1. . .
Step2. . .
All normal.
2, I used the translation xlc -q64 -qarch=ppc64 -ot tc get t, t-operation, the output is as follows :
Step1. . .
Segmentation fault (coredump)
Coredump a very clear procedure.

Question :
Bzero will coredump Why? ? ? But ah yes, we can allocate memory using malloc.
Please help us to see. Thank you, the. . . [/code]

Aix5L compiled on the 64 places, the operation would coredump. . . . . ?

Include "stdlib.h>;

Aix5L compiled on the 64 places, the operation would coredump. . . . . ?

Thank you, the

Aix5L compiled on the 64 places, the operation would coredump. . . . . ?

I now encounter a new problem, there is also the sco to aix5L after the coredump.
#include "Stdlib.h>;

Typedef struct st_node
{
Void *data;
Struct st_node *next, *prev;
ST_NODE;)

Int main (void)
{
ST_NODE *node1, *node2;

Node1 = (ST_NODE *) malloc (sizeof (ST_NODE));
Bzero (node1, sizeof (ST_NODE));
Node2 = coredump node1->;next; 4003rd here, there is no problem in the sco

Return 0
}

Aix5L compiled on the 64 places, the operation would coredump. . . . . ?

The next sentence should be?
Node1->;next=NULL! So node2=NULL : :



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com