[Ecls-list] crash on file not found

Dean O'Connor dean.oconnor at ite.com.au
Thu May 3 06:56:57 UTC 2007


in continuation of my last email ....

Ok found I using "make_constant_base_string"  instead of 
"make_simple_base_string" when I load files stopped the initial access 
violation exception error.
I'm finding it hard to get any clear doco on this.
eg.
cl_load(1, make_simple_base_string("enumerations/sequence-enumeration"));

However, if I specify an incorrect filename (ie. file not there) I also 
get an access violation exception error.

Does this mean I should only use cl_safe_eval()  and not use these 
functions, or is it a bug ????

I do not fully understand, but from having a quick look thru debugging 
it in VS2005 it seems that when "make_simple_base_string" was used, it 
caused the the file not to be found for some reason. Maybe eval'd to a 
symbol or something. Dunno.

But in the 2nd case when the file really wasn't there I get the same 
error. ie. seems to go thru same path.

Here is some debug & stack dump info.

In "load.d"
=======
            filename = Cnil;
    } end_loop_for_in;
    if (Null(filename)) {
        if (Null(if_does_not_exist))
            @(return Cnil)
        else
            FEcannot_open(source);      <<<======== went to here
    }
NOT_A_FILENAME:
    if (verbose != Cnil) {
        cl_format(3, Ct, make_constant_base_string("~&;;; Loading ~s~%"),
              filename);
    }

then jumped to "hash.d" for final crash:
=============================


static uint32_t
hash_string(uint32_t initval, const unsigned char *k, cl_index len)
{
  uint32_t a = 0, b = 0, c = initval;
  for (; len > 12; ) {     <<<<<<<================ crashes here !!!!!!
    a += (k[0] +((uint32_t)k[1]<<8) +((uint32_t)k[2]<<16) 
+((uint32_t)k[3]<<24));
    b += (k[4] +((uint32_t)k[5]<<8) +((uint32_t)k[6]<<16) 
+((uint32_t)k[7]<<24));
    c += (k[8] +((uint32_t)k[9]<<8) 
+((uint32_t)k[10]<<16)+((uint32_t)k[11]<<24));
    mix(a,b,c);
    k += 12; len -= 12;
  }

STACK DUMP (VS2005)

 >    ecl.dll!hash_string(unsigned int initval=0, const unsigned char * 
k=0x1013ee98, unsigned int len=9)  Line 68    C
     ecl.dll!_hash_equal(int depth=0, unsigned int h=0, cl_lispunion * 
x=0x01decb40)  Line 189 + 0x17 bytes    C
     ecl.dll!ecl_search_hash(cl_lispunion * key=0x10144fe8, cl_lispunion 
* hashtable=0x01de2b40)  Line 293 + 0xd bytes    C
     ecl.dll!ecl_gethash_safe(cl_lispunion * key=0x10144fe8, 
cl_lispunion * hashtable=0x01de2b40, cl_lispunion * def=0x101438d8)  
Line 352 + 0xd bytes    C
     ecl.dll!si_get_sysprop(cl_lispunion * sym=0x10144fe8, cl_lispunion 
* prop=0x01e04500)  Line 124 + 0x14 bytes    C
     ecl.dll!cl_typep(int narg=269760728, cl_lispunion * V1=0x023cfc30, 
cl_lispunion * V2=0x10144fe8, ...)  Line 869 + 0x12 bytes    C
     ecl.dll!L25coerce_to_condition(cl_lispunion * V1=0x023cfc30, 
cl_lispunion * V2=0x101438d8, cl_lispunion * V3=0x101480d8, cl_lispunion 
* V4=0x10145840)  Line 1147 + 0x11 bytes    C
     ecl.dll!L3universal_error_handler(cl_lispunion * V1=0x101438d8, 
cl_lispunion * V2=0x023cfc30, cl_lispunion * V3=0x101438d8)  Line 13 + 
0x1c bytes    C
     ecl.dll!APPLY_fixed(int n=3, cl_lispunion * (void)* fn=0x100196d0, 
cl_lispunion * * x=0x01e34fa8)  Line 676 + 0x17 bytes    C
     ecl.dll!cl_funcall(int narg=3, cl_lispunion * function=0x1014a3d0, 
...)  Line 221 + 0x1f bytes    C
     ecl.dll!FEerror(const char * s=0x10150f7c, int narg=0, ...)  Line 
64 + 0x2b bytes    C
     ecl.dll!handle_signal(int sig=11)  Line 118 + 0xc bytes    C
     ecl.dll!signal_catcher(int sig=11)  Line 166 + 0x9 bytes    C
     msvcr80d.dll!_XcptFilter(unsigned long xcptnum=3221225477, 
_EXCEPTION_POINTERS * pxcptinfoptrs=0x00033224)  Line 369 + 0xa bytes    C
     vizeq_lisp.exe!__tmainCRTStartup()  Line 614 + 0x17 bytes    C
     msvcr80d.dll!@_EH4_CallFilterFunc at 8()  + 0x12 bytes    Asm
     msvcr80d.dll!_except_handler4_common(unsigned int * 
CookiePointer=0x0041a040, void (unsigned int)* 
CookieCheckFunction=0x00411023, _EXCEPTION_RECORD * 
ExceptionRecord=0x00033330, _EXCEPTION_REGISTRATION_RECORD * 
EstablisherFrame=0x0012ffa8, _CONTEXT * ContextRecord=0x00033380, void * 
DispatcherContext=0x0003330c)  + 0xba bytes    C
     vizeq_lisp.exe!_except_handler4(_EXCEPTION_RECORD * 
ExceptionRecord=0x00033330, _EXCEPTION_REGISTRATION_RECORD * 
EstablisherFrame=0x0012ffa8, _CONTEXT * ContextRecord=0x00033380, void * 
DispatcherContext=0x0003330c)  + 0x22 bytes    C
     ntdll.dll!7d61ec22()    





More information about the ecl-devel mailing list