and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

This project is mirrored from git://git.sv.gnu.org/coreutils.git. Pull mirroring failed .
Last successful update .
  1. 20 Aug, 2012 1 commit
  2. 19 Aug, 2012 2 commits
  3. 18 Aug, 2012 3 commits
    • Jim Meyering's avatar
      tests: trigger the sort -u free-memory-read bug · 46444af9
      Jim Meyering authored
      * tests/misc/sort-u-FMR: New file.
      * tests/Makefile.am (TESTS): Add it.
      * tests/misc/sort: Add the test here, too.
      * NEWS (Bug fixes): Mention it.
      46444af9
    • Jim Meyering's avatar
      tests: wrap the valgrind-requiring assertion in a function · b8104e47
      Jim Meyering authored
      * tests/init.cfg (require_valgrind_): New function...
      * tests/misc/sort-stale-thread-mem: ...extracted from here.
      b8104e47
    • Paul Eggert's avatar
      sort: simpler fix for sort -u data-loss bug, and for a FMR bug · 574b7c7d
      Paul Eggert authored
      This also fixes a free-memory-read (FMR) bug: when fillbuf's realloc
      of buf->buf frees the buffer into which saved_line.text points,
      the processing of that just-read longer line includes comparison
      against the saved line in freed memory.
      * src/sort.c (overlap): Remove.
      (fillbuf): Do not try to copy saved lines, as that is too risky
      in the presence of parallelism, reallocated buffers, etc.
      (sort): Invalidate any saved line before sorting a new batch.
      574b7c7d
  4. 17 Aug, 2012 1 commit
    • Jim Meyering's avatar
      sort: sort --unique (-u) could cause data loss · eb3f5b3b
      Jim Meyering authored
      sort -u could omit one or more lines of expected output.
      This bug arose because sort recorded the most recently printed line via
      reference, and if you were unlucky, the storage for that line would be
      reused (overwritten) as additional input was read into memory.  If you
      were doubly unlucky, the new value of the "saved" line would not only
      match the very next line, but if that next line were also the first in
      a series of identical, not-yet-printed lines, then the corrupted "saved"
      line value would result in the omission of all matching lines.
      
      * src/sort.c (saved_line): New static/global, renamed and moved from...
      (write_unique): ...here.  Old name was "saved", which was too generic
      for its new role as file-scoped global.
      (fillbuf): With --unique, when we're about to read into a buffer that
      overlaps the saved "preceding" line (saved_line), copy the line's .text
      member to a realloc'd-as-needed temporary buffer and adjust the line's
      key-defining members if they're set.
      (overlap): New function.
      * tests/misc/sort: New tests.
      * NEWS (Bug fixes): Mention it.
      * THANKS.in: Update.
      Bug introduced via commit v8.5-89-g9face836.
      Reported by Rasmus Borup Hansen in
      http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/23173/focus=24647
      eb3f5b3b
  5. 16 Aug, 2012 3 commits
  6. 14 Aug, 2012 2 commits
    • Krzysztof Goj's avatar
      rm: new option --dir (-d) to remove empty directories · fdc2da71
      Krzysztof Goj authored
      Add new option to rm (-d/--dir), which allows removal of
      empty directories, while still safely disallowing removal
      of non-empty ones.
      
      This improves compatibility with Mac OS X and BSD systems,
      which honor the -d option.
      
      * src/remove.c (rm_fts): Remove empty directories when requested.
      * src/remove.h (rm_options) [remove_empty_directories]: New member.
      * src/rm.c (long_opts, usage, main): Update usage and option parsing.
      (rm_option_init): Initialize the new member.
      * src/mv.c (rm_option_init): Initialize the new member.
      * tests/rm/d-1: New test case - successfully delete empty dir.
      * tests/rm/d-2: New test case - refuse to delete nonempty dir.
      * tests/Makefile.am (TESTS): Add them.
      fdc2da71
    • Bernhard Voelker's avatar
      df: fail when the mount list is required but cannot be read · 46afefaa
      Bernhard Voelker authored
      * src/df.c (main): Add conditions to fail when the mount list cannot
      be read: this includes the cases when a file name argument is given
      and any of -a, -l, -t or -x is used.
      * doc/coreutils.texi: Document the additional error conditions.
      * tests/df/no-mtab-status: Add a new test.
      * tests/Makefile.am: Reference the new test.
      * NEWS: Mention the fix.
      46afefaa
  7. 12 Aug, 2012 2 commits
  8. 08 Aug, 2012 1 commit
    • Pádraig Brady's avatar
      tests: fix validation of local file systems · 433de5eb
      Pádraig Brady authored
      * tests/init.cfg (require_mount_list_): A new function
      to ensure we can read the list of file systems.
      (require_local_dir_): Call the above function, as otherwise
      the check is invalid.
      * tests/df/total-unprocessed: Ensure df can read the
      list of mounted file systems so that --local can be honored.
      433de5eb
  9. 06 Aug, 2012 2 commits
  10. 05 Aug, 2012 1 commit
    • Jim Meyering's avatar
      build: avoid sort link failure on Solaris 10 · f1b85e3c
      Jim Meyering authored
      * src/Makefile.am (sort_LDADD): Sort uses euidaccess, which may require
      whatever library configure deemed necessary to resolve the eaccess
      function, but no one told sort to link with that library.
      (sort_LDADD): Add $(LIB_EACCESS).
      f1b85e3c
  11. 04 Aug, 2012 4 commits
    • Bernhard Voelker's avatar
      df: fix exit code and error messages with --total · 3b8139e8
      Bernhard Voelker authored
      When the combination of the file system options with given files or
      devices does not lead to output, "df --total" would exit successfully
      although it should not.
      
      Examples:
        $ df --total --type=xfs /          # when / is not an XFS file system
        $ df --total --local -t nfs  DIR   # nfs is remote per se ...
        $ df --total -t qwerty /dev/sdb5   # typo in file system type
      
      Furthermore, "df --total" would not print the error message "no file
      systems processed" when the file argument does not exist or is otherwise
      not accessible.
      
      Example:
        $ df --total __not_exist__
      
      These 2 bugs are present since --total was added by commit
      v6.12-166-gea2887bb.
      
      * src/df.c (get_dev): Do not set file_systems_processed to true when
      force_fsu is true, i.e. when the row for the "total" line is processed.
      (main): Don't print totals unless we've processed a file system.
      Also only print the "no FS processed" message if there was no
      preceding diagnostic.
      * tests/df/total-unprocessed: Add a new test.
      * tests/Makefile.am: Reference the new test.
      * NEWS: Mention the fix.
      
      Improved-by: Jim Meyering
      3b8139e8
    • Jim Meyering's avatar
      truncate: don't leak a file descriptor with --ref=PIPE · cbd1cffa
      Jim Meyering authored
      * src/truncate.c (main): For a user who makes the mistake of
      using a non-seekable file as a reference for the desired length,
      truncate would open that file, attempt to seek to its end, but
      upon seek failure would neglect to close the file descriptor.
      Close the file descriptor even when lseek fails.
      In addition, ignore failure to close that reference FD, since as
      long as the lseek succeeds, a close failure doesn't matter.
      Coverity spotted the potential FD leak.
      
      Improved-by: Pádraig Brady.
      cbd1cffa
    • Jim Meyering's avatar
      tests: avoid FP ulimit failure with valgrind-wrapped tools · 4bee223d
      Jim Meyering authored
      * tests/init.cfg (require_ulimit_): Raise VM limit from 10MiB to
      20MiB, to accommodate overhead of a valgrind-wrapped date program.
      Also declare this function's local variables "local".
      4bee223d
    • Jim Meyering's avatar
      split: plug nominal leaks · 4abec7ef
      Jim Meyering authored
      * src/split.c (lines_rr) [IF_LINT]: Plug a harmless leak.
      (main) [IF_LINT]: Free a usually-small (~70KB) buffer
      just before exit, mainly to take this off the radar of
      leak-detecting tools.
      
      Improved-by: Pádraig Brady.
      4abec7ef
  12. 03 Aug, 2012 1 commit
  13. 27 Jul, 2012 1 commit
    • Jim Meyering's avatar
      maint: refresh stale local gnulib patch files · 74a1c058
      Jim Meyering authored
      We carry local adjustments for a few gnulib modules via the
      patches in gl/.  Nearly all of those patches had become stale
      due to evolution of the originals in gnulib.
      
      To refresh them, first make sure you have no local changes in gl/
      or in the gnulib submodule, then run "make refresh-gnulib-patches".
      74a1c058
  14. 25 Jul, 2012 1 commit
    • Jim Meyering's avatar
      tail: avoid misleading diagnostic upon fstat failure · a6e8e3a3
      Jim Meyering authored
      * src/tail.c (check_fspec): Save fstat-induced errno *before*
      calling close_fd, not after.  Otherwise, the close could well
      clobber the global errno, making tail print an invalid diagnostic.
      This could happen only with tail -f, and even then, only when
      a valid file descriptor were to provoke fstat failure.
      a6e8e3a3
  15. 23 Jul, 2012 1 commit
  16. 22 Jul, 2012 2 commits
  17. 21 Jul, 2012 1 commit
  18. 20 Jul, 2012 3 commits
  19. 18 Jul, 2012 1 commit
  20. 16 Jul, 2012 2 commits
    • Pádraig Brady's avatar
      maint: move two df tests from tests/misc to tests/df · 2f90a1b1
      Pádraig Brady authored
      * test/Makefile.am: Reference the moved tests.
      2f90a1b1
    • Pádraig Brady's avatar
      df: don't output control characters in a mount point name · 3ed70fd5
      Pádraig Brady authored
      It's awkward to read and problematic for scripts when
      control characters like '\n' are output.
      
      Note other fields are already handled with mbsalign,
      which converts non printable chars to the replacement char.
      A caveat to note with that, is the replacement char takes
      a place in the field and so possibly truncates the field
      if it was the widest field in the records.
      
      Note a more general replacement function, that
      handles all printable, or non white space characters,
      would require more sophisticated support for various
      encodings, and the complexity vs benefit was not
      deemed beneficial enough at present.
      Perhaps in future a more general replacement function
      could be shared between the various utilities.
      
      Note <space> is unaffected in any field,
      which could impact scripts processing the output.
      However any of the number fields at least could have
      spaces considering `LANG=fr_FR df -B\'1`, so it's
      probably best to leave spaces, which also allows
      scripts to handle mount points with spaces without change.
      
      * src/df.c (hide_problematic_chars): Replace control chars with '?'.
      * tests/df/problematic-chars: Add a new root only test.
      * tests/Makefile.am: Reference the new test.
      * NEWS: Mention the fix.
      3ed70fd5
  21. 15 Jul, 2012 4 commits
  22. 13 Jul, 2012 1 commit