Search:

Type: Posts; User: rk211083

Search: Search took 0.01 seconds.

  1. Replies
    18
    Views
    4,701

    Theoritically there can't be a stack over flow in...

    Theoritically there can't be a stack over flow in my scenario.

    As per my knowledege, structure definition is cross checked and read during compilation, whether it is through header file or else...
  2. Replies
    18
    Views
    4,701

    I tried that way, and actual issue got resolved....

    I tried that way, and actual issue got resolved.

    But still wanted to figure out the possible reason as to why it works sometimes and not some other time.
  3. Replies
    18
    Views
    4,701

    Yes correct. Now current this type of coding in...

    Yes correct.
    Now current this type of coding in our case was working fine since last say 1 year. But recently it started giving segmentation fault exactly at the point of structure variable...
  4. Replies
    18
    Views
    4,701

    Small modification in your program

    What if flow goes as below:

    def.c

    struct STRUCT_ABC {
    char *s;
    double x;
    };

    void def() // Fine
  5. Replies
    18
    Views
    4,701

    So standard wise its fine. Also, as per the...

    So standard wise its fine.
    Also, as per the example quoted in your reply, the structure with same name are present in both the c sources.
    In my case, one of the instance of structure is defined in...
  6. Replies
    18
    Views
    4,701

    Thanks Grumpy for the info. But how come it's...

    Thanks Grumpy for the info.

    But how come it's working fine sometime, and throwing segmentation fault some other time. I suppose if its a standard violation, then it should always throw error or...
  7. Replies
    18
    Views
    4,701

    Small correction

    As per my query, the structure is defined not inside any function or main function.
    Its specific to C source file and not any function.
  8. Replies
    18
    Views
    4,701

    Structure declaration

    Hi,
    Is the below mentioned coding practice valid?

    i. Declared one structure STRUCT_ABC in a header file abc.h
    ii. Included abc.h in abc.c file and used STRUCT_ABC in some function inside abc.c....
  9. Clarification

    The header file where same structure name is present is included in some other C sources under same project under which my particular C source is present. But not sure whether any of those sources...
  10. Got one clue.....

    Thanks for ur response.
    Above declaration in my code is also correct, it works correctly.

    While analysis, it was found that the structure name LOCAL_UTILS_STRUCT_TYPE was also present in one of...
  11. Got one clue......

    Yes, I used dbx to find out the exact line.

    While analysis, it was found that the structure name LOCAL_UTILS_STRUCT_TYPE was also present in one of the header files. But that header file is not...
  12. Segmentation fault while structure variable declaration

    I'm facing a segmentation fault(core) at the step where a structure variable is declared.

    PFB the code snippet:
    insert

    struct LOCAL_UTILS_struct_
    {
    tbaAmtType bigLimitAmt;
    ...
Results 1 to 12 of 12