[Cook] Re: [Aegis] Cook fingerprints [increasingly OT]
Peter Miller
millerp at canb.auug.org.au
Thu Dec 23 16:32:50 EST 2004
On Thu, 2004-12-23 at 11:29, Greg McIntyre wrote:
> >> I tried using this 'cook -nl -st --fp-update' command and it didn't do
> >> anything, but we have our cook book in a subdirectory so I put in a '-b'
> >> switch so that it could find it and immediately it segfaulted.
I wish they were all this easy to find.
Patch attached.
--
Peter Miller <millerp at canb.auug.org.au>
-------------- next part --------------
MIME-Version: 1.0
Content-Type: application/aegis-patch
Subject: cook.2.25 - cook --fp-update segfault
Content-Name: cook.2.25.C022.patch
Content-Disposition: attachment; filename=cook.2.25.C022.patch
X-Aegis-Project-Name: cook.2.25
X-Aegis-Change-Number: 22
#
# A bug has been fixed in cook -fp-update, it would segfault in some
# cases.
#
# My thanks to Greg McIntyre <greg at symbionetworks.com> for reporting
# this problem.
#
# Aegis-Change-Set-Begin
# H4sIAAAAAAAAA12RTU7DMBCF9z7FiHUTpJBCq1AEK8SiJ6Ao8s84tZrYkWdMGyHujiNKJbqw
# ZHvmvfn0RkWHtjVIOrqRXfCwgRsdwgGKwo5FGo1kBMLOytTzzu/ETSOu2l9ApQ72kkAherDu
# hAach1+bi8sCHMMxpN5c/OYuCgOCloRUzvbz2U7Ae+kPBBzgNWIHW/3meYoIj11+PtM0qDwc
# +RjigUodhiewIULEMUR2vst6RzDGoHocyjO2lokwA+OJMXrZtxm7EYzELZ5wGDnXOCY8/6nM
# 1DuP18UMEJEoz2//a63sKdeJ58g2II/SzSw53U/swzig50ak5MwcmnxQVbWs18XqTpuithUW
# clljYdRqva6tXuJ9lZkpatiId/ElrOux9XLAvw3d2myOcYzO83w3pc4Cqc9rGYJxdsoDSXaz
# hkKKOuN9L8RHI34APCd1m/gBAAA=
# Aegis-Change-Set-End
#
Index: cook/fingerprint/find.c
*** cook/fingerprint/find.c
--- cook/fingerprint/find.c
***************
*** 141,146 ****
--- 141,162 ----
}
+ static symtab_ty *
+ get_main_stp(void)
+ {
+ if (!main_stp)
+ {
+ main_stp = symtab_alloc(100);
+ /*
+ * DO NOT set main_stp->reap
+ * as this will be done by fp_subdir_delete
+ */
+ quit_handler_prio(fp_find_flush);
+ }
+ return main_stp;
+ }
+
+
/*
* NAME
* fp_find_record
***************
*** 166,182 ****
* so do a quick lookup and see.
*/
trace(("fp_find_record(path = \"%s\")\n{\n", path_a->str_text));
- if (!main_stp)
- {
- main_stp = symtab_alloc(100);
- /*
- * DO NOT set main_stp->reap
- * as this will be done by fp_subdir_delete
- */
- quit_handler_prio(fp_find_flush);
- }
path_r = os_relative_if_possible(path_a);
! p = symtab_query(main_stp, path_r);
if (!p)
{
string_ty *dirname;
--- 182,189 ----
* so do a quick lookup and see.
*/
trace(("fp_find_record(path = \"%s\")\n{\n", path_a->str_text));
path_r = os_relative_if_possible(path_a);
! p = symtab_query(get_main_stp(), path_r);
if (!p)
{
string_ty *dirname;
***************
*** 295,301 ****
* it away. It could have been created recently, or delete
* could have over-ridden it, etc.
*/
! p = symtab_query(main_stp, filename);
if (p)
{
str_free(filename);
--- 302,308 ----
* it away. It could have been created recently, or delete
* could have over-ridden it, etc.
*/
! p = symtab_query(get_main_stp(), filename);
if (p)
{
str_free(filename);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20041223/cbea5165/attachment.pgp>
More information about the Cook-users
mailing list