From: glenrendes Date: Tue, 29 Oct 2019 17:39:06 +0000 (+0100) Subject: still debugging to no avail X-Git-Url: https://git.reasoningtechnology.com/style/static/gitweb.js?a=commitdiff_plain;h=620bf50f9e4aa343d91070764ed128973b16ffa6;p=subu still debugging to no avail --- diff --git a/module/da/lib/libda.a b/module/da/lib/libda.a index 7b3adea..137836b 100644 Binary files a/module/da/lib/libda.a and b/module/da/lib/libda.a differ diff --git a/module/da/src/acc.lib.c b/module/da/src/acc.lib.c index d98f2f9..37ba2f3 100644 --- a/module/da/src/acc.lib.c +++ b/module/da/src/acc.lib.c @@ -22,7 +22,7 @@ AccChannel *acc_open(AccChannel *channel, Mode mode){//acc init } void *acc_malloc(size_t size, AccChannel *channel){ void *an_allocation_pt = malloc(size); - if( channel ) da_push((Da *)(channel->outstanding_malloc), &an_allocation_pt); + if( channel ) da_push((Da *)(channel->outstanding_malloc), &an_allocation_pt);//tried taking out reference but fixed nothing return (void *)an_allocation_pt; } void acc_free(void *pt, AccChannel *channel){ diff --git a/module/da/src/da.lib.c b/module/da/src/da.lib.c index 34d6b68..5bca280 100644 --- a/module/da/src/da.lib.c +++ b/module/da/src/da.lib.c @@ -96,6 +96,7 @@ char *da_index(Da *dap, size_t i){ // allocate space for a new element at the end of the array static char *da_push_alloc(Da *dap){ size_t element_off = dap->end - dap->base; + //printf("help help help I'm melting!"); dap->end += dap->element_size; if( dap->end > dap->base + dap->size ) da_expand(dap); return dap->base + element_off; diff --git a/module/da/test/exec/test_da b/module/da/test/exec/test_da index da6f030..def8c1c 100755 Binary files a/module/da/test/exec/test_da and b/module/da/test/exec/test_da differ diff --git a/module/da/test/lib/libtest.a b/module/da/test/lib/libtest.a index c1955ef..6eb3633 100644 Binary files a/module/da/test/lib/libtest.a and b/module/da/test/lib/libtest.a differ diff --git a/module/da/test/src/test_da.lib.c b/module/da/test/src/test_da.lib.c index 8a41111..7857883 100644 --- a/module/da/test/src/test_da.lib.c +++ b/module/da/test/src/test_da.lib.c @@ -881,10 +881,9 @@ bool test_da_accounting_0(){ AccChannel acc0; AccChannel *acc0_pt = acc_open(&acc0, acc_FULL); - Da da0; - Da *dap = (Da *)da_init(&da0, sizeof(int), NULL); + //Da da0; + //Da *dap = (Da *)da_init(&da0, sizeof(int), NULL); //trying to use acc0_pt results in even more immediate seg fault - printf("Outstanding Malloc: %d\n", (int)(acc0_pt->outstanding_malloc)); printf("Spurious Free: %d\n", (int)(acc0_pt->spurious_free)); acc_report(acc0_pt);