It can occured when declaring something like this (in mululong.c) :
 struct some_struct {
 int a ;
 char b;
 long c ;};
union bil {
        struct {unsigned char b0,b1,b2,b3 ;} b;
        struct {unsigned int lo,hi ;} i;
        unsigned long l;
        struct { unsigned char b0; unsigned int i12; unsigned char b3;} bi;
} ;
Depending where sym of type structdef is allocated, then ((symbol *)sym)->etype isn't always NULL and can be an invalid pointer.
>> Commited a fix to avoid SDCC access violation when addsym is called with
>>parameter sym of type structdef.

>Could you give an example where this occured?