Hi John, would you mind applying the following patch, rebuilding and re-uploading? maybe we finally converged, thanks the infinite patience of Felix. -- gb
From: Felix Zielcke <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: chrony: just segfaults on amd64 Date: Tue, 25 Oct 2005 18:23:58 +0200 >now I think the attached patch (to be applied to the pristine chrony >sources) should solve the issue. it did. now chrony doestn't segfault anymore and seems to work :) From: [EMAIL PROTECTED] To: Felix Zielcke <[EMAIL PROTECTED]> Subject: Re: chrony: just segfaults on amd64 thank you, Felix. After exploring the code a bit more closely, I found out 1. that I made a stupid mistake (I added an indirection level, but the code was designed another way); 2. why the resulting buggy executable did not segfault on my server (because of my config file, some of the functions in addrfilt.c were not called --- in particular, open_node() was never called). now I think the attached patch (to be applied to the pristine chrony sources) should solve the issue. may I ask you to recompile and test this new patch? I attach both the patch and the modified addrfilt.c, in case you cannot easily apply the patch. best regards. --- /tmp/chrony-1.20.old/addrfilt.c 2005-10-25 12:45:15.561893000 +0200 +++ /tmp/chrony-1.20/addrfilt.c 2005-10-25 13:01:13.391766233 +0200 @@ -43,17 +43,15 @@ /* Define the table size */ #define TABLE_SIZE (1UL<<NBITS) -struct _TableNode; - -typedef struct _TableNode ExtendedTable[TABLE_SIZE]; - typedef enum {DENY, ALLOW, AS_PARENT} State; typedef struct _TableNode { State state; - ExtendedTable *extended; + struct _TableNode *extended; } TableNode; +typedef struct _TableNode ExtendedTable[TABLE_SIZE]; + struct ADF_AuthTableInst { TableNode base; }; @@ -102,7 +100,7 @@ if (node->extended != NULL) { for (i=0; i<TABLE_SIZE; i++) { - child_node = &((*(node->extended))[i]); + child_node = node->extended + i; close_node(child_node); } Free(node->extended); @@ -125,10 +123,10 @@ if (node->extended == NULL) { - node->extended = MallocArray(ExtendedTable, TABLE_SIZE); + node->extended = (TableNode *) MallocArray(ExtendedTable, TABLE_SIZE); for (i=0; i<TABLE_SIZE; i++) { - child_node = &((*(node->extended))[i]); + child_node = node->extended + i; child_node->state = AS_PARENT; child_node->extended = NULL; } @@ -169,7 +167,7 @@ if (!(node->extended)) { open_node(node); } - node = &((*(node->extended))[subnet]); + node = node->extended + subnet; bits_to_go -= NBITS; } @@ -188,7 +186,7 @@ if (!(node->extended)) { open_node(node); } - node = &((*(node->extended))[subnet]); + node = node->extended + subnet; bits_to_go -= NBITS; } @@ -200,7 +198,7 @@ } for (i=subnet, j=0; j<N; i++, j++) { - this_node = &((*(node->extended))[i]); + this_node = node->extended + i; if (delete_children) { close_node(this_node); } @@ -284,7 +282,7 @@ if (node->extended) { subnet = get_subnet(residual); residual = get_residual(residual); - node = &((*(node->extended))[subnet]); + node = node->extended + subnet; } else { /* Make decision on this node */ finished = 1; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]