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 (1ULextended + 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; iextended))[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; jextended))[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]