Skip to Content.
Sympa Menu

cado-nfs - Re: [Cado-nfs-discuss] cado-nfs-2.1.1 crash during filtering

Subject: Discussion related to cado-nfs

List archive

Re: [Cado-nfs-discuss] cado-nfs-2.1.1 crash during filtering


Chronological Thread 
  • From: paul zimmermann <Paul.Zimmermann@inria.fr>
  • To: Francois Morain <morain@lix.polytechnique.fr>
  • Cc: cado-nfs-discuss@lists.gforge.inria.fr, marks@member.ams.org
  • Subject: Re: [Cado-nfs-discuss] cado-nfs-2.1.1 crash during filtering
  • Date: Mon, 29 Jun 2015 18:03:18 +0200
  • List-archive: <http://lists.gforge.inria.fr/pipermail/cado-nfs-discuss/>
  • List-id: A discussion list for Cado-NFS <cado-nfs-discuss.lists.gforge.inria.fr>

> The program now terminates with the error message appended at the bottom
> of this message. The file $WORKDIR/c184.duplicates1//0/dup1.1.0000.gz
> mentioned in the stderr below turns out to be a 20 byte file, which,
> when gunzipped, is a zero byte file.

it is a bug that a zero byte file is not accepted in dup2. I fixed this in
commit 73aa354 (review welcome).

Greg, please could you try again with this change?

--- a/filter/dup2.c
+++ b/filter/dup2.c
@@ -432,11 +432,18 @@ int check_whether_file_is_renumbered(const char *
filename, unsigned int npoly)
unsigned int count = 0;
char s[1024];
FILE *f_tmp = fopen_maybe_compressed (filename, "rb");
+
if (!f_tmp) {
fprintf(stderr, "%s: %s\n", filename, strerror(errno));
abort();
}

+ if (feof (f_tmp)) /* file is empty */
+ {
+ fclose_maybe_compressed (f_tmp, filename);
+ return 1; /* an empty file might be considered as renumbered */
+ }
+
/* Look for first non-comment line */
while (1) {
char *ret = fgets (s, 1024, f_tmp);

Paul




Archive powered by MHonArc 2.6.19+.

Top of Page