Pike 8.0.610 Release notes

Changes since Pike 8.0.498 (release 11)

New Features

  • Crypto.Hash.SCRAM

    New class to support SCRAM authentication.

  • Concurrent

    • Add map_with() as an alias to flat_map().

    • Add a convenience variant to zip().

    • depend() can be used to collect multiple dependencies before finalising the Promise.

  • Debug.find_all_clones()

    New convenience function to find all objects that are clones of a program.

  • MIME

    Added a setter for the message boundary prefix.

  • Sql.pgsql

    • Added support for PostgreSQL 10’s stronger password authentication (SCRAM-SHA-256).

    • Slightly reduced overhead.

    • Support IEEE binary float database-wireformat.

    • Support NUMERIC database-wireformat.

    • Prevent new queries from starting in the local_backend.

    • Make sure huge queries are not fully loaded into memory.

  • Sql.Sql

    Make big_typed_query() gracefully fallback to big_query().

  • SSL.File

    Support query_fd() and set_buffer_mode() methods.

  • Stdio.File [NT]

    A major clean-up and consistency improvment of the I/O layer on NT.

    • All filesystem paths are now encoded in UTF-8 from Pike-code’s point of view. Previously this was a mix of Latin-1 and UTF-16, with some stuff affected by the filesystem default character set.

      This makes the entire filesystem accessible from Pike-code.

      This new behavior can be detected by the presence of the constant Stdio.HAVE_UTF8_FS.

    • Added new low-level fd handling functions.

      This should fix several potential race-conditions in the I/O layer on NT.

  • Stdio.Terminfo

    Support the new terminfo format from ncurses 6.

  • Thread.Farm

    Added Thread.Farm()->set_thread_name_cb() to help applications that monitor thread creation and termination for the purpose of tracking thread names.

  • Thread.ResourceCount

    New module to allow threadsafe race-condition-free counting of resources.

  • Tools.Standalone.check_http

    • Allow redirect responses.

    • Support –expect option.

  • Web.Sass

    This is a module that interfaces to the SASS compilation library “LibSass” (https://github.com/sass/libsass).

Bug fixes

  • ADT.CritBit

    • Due to an off-by-one error the last limb of bignums was never compared. This resulted (sometimes) in unequal bignums comparing equal inside of the tree.
  • Compiler

    • Improved variant robustness.

    • Fixed type leak for getters/setters implemented with variant functions.

  • Calendar

    • Updated tzdata to 2018d.

    • Calendar.TimeRanges.NullTimeRange now has a working __hash(). The expression ([ Calendar.TimeRanges.nulltimerange : 17 ]) no longer gives a backtrace.

  • Concurrent

    • Less filling, deadlock-free, faster, available without running backend.

    • Handle an empty argument array properly in results().

      Previously code such as:

      Concurrent.Future f2 = Concurrent.results(({}));

      f2->on_success(lambda(array(string) a) {

        werror("success: %O.\n", a);
      ->on_failure(lambda(mixed err) {
          werror (describe_backtrace(err));

      would lead to a backtrace because the future was destructed prematurely.

    • Readable/understandable documentation.

  • Crypto.CCM

    Fixed initialization of the iv.

  • Crypto.Hash

    Censor the password argument from backtraces in crypt_hash().

  • Filesystem.Monitor

    • Fixed some backend_check rescheduling isusues.

      adjust_monitor() didn’t reschedule the backend_check() call_out if the adjusted monitor already was at the head of monitor_queue. This caused polls to be delayed in some common cases.

      register_path() didn’t reschedule the backend_check() call_out. If the newly registered monitor ends up at the head of the monitor_queue, the backend_check() call_out likely needs to be rescheduled.

    • Fixed issue with next_poll being set to zero causing polling every second.

    • Fixed indexing the NULL value error when InotifyMonitor was used in combination with a filter_file() that doesn’t accept everything.

    • Fixed incorrect creation of new monitors.

      Monitors were created using monitor() on the top level rather than using Monitor::monitor(), which prevented the symlinks‘ overridden DefaultMonitor from setting the correct state on newly created monitors.

      We now force a check on the directory monitor instead, which will pick up the new file instantly and create the sub monitor.

    • Fixed race condition on deletion.

      This fixes a race that could occur on rapid exists => delete => exists transitions, where the directory monitor never noticed the change but the sub monitor was removed from the monitor lookup mapping. The directory monitor is now notified on sub-monitor release.

    • Added set_stable_time() function.

    • Removed obsolete special case for co_id == 1.

  • HTTPLoop:

    Fixed some potential race conditions.

  • Image.Image

    • Improved argument checking in apply_curve(). Non-integer array values lead to use of uninitialized curve values.
  • Image.PVR

    Fixed size check for twiddled images.

  • MIME

    Support trailing newline in MIME part epilogues.

  • Protocols.HTTP.Query

    • Fixed incoming chunked transfers (timed async works now, chunk options are properly ’parsed’). Trailer headers are now correctly parsed.

    • Improved handling of multiple headers of the same kind.

    • Fixed a bug where base64 encoded HTTP basic auth tokens were encoded in a pretty-printed format including line breaks, which lead to malformed HTTP requests on long username and password combinations.

    • Do not wait for SSL.File()->close() to complete when called from the destruct() callback.

  • Protocols.HTTP.Server

    • The header parser exception mode now doesn’t immediately throw an exception.

    • Attempt to ensure that data is sent before terminating an HTTPS connection.

  • Protocols.LDAP

    Fixed race condition on initializing LDAPS.

  • Search.Database.MySQL

    Fixed issue where blobs didn’t get updated after the initial blobs got full.

  • Search.Utils

    Updated debug string format.

  • Sql.pgsql

    • Suppress spurious ’File not open’ blurts on stderr when the connection is still pending and we inspect the connection object.

    • Signal EOF early before closing the SQL result portal and thoroughly cleanup bufcon/stashcount to prevent occasional deadlocks on asynchronous object destructions.

    • Suppress rare “access in destructed object” messages.

    • Simplified fundamentally flawed reconnect logic, made failures consistent.

    • Repair SSL connect logic.

    • Update documentation.

    • Repair fetch_row_array().

    • Ensure that all database errors result in exceptions (eventually).

    • affected_rows() and status_command_complete() now wait until they have a meaningful result to report.

    • Closing the database will wait until all running queries have been committed.

    • Report correct number of affected_rows() for INSERTs.

    • Eliminate a rare deadlock when running many simultaneous queries on a single filedescriptor.

  • mktime/System.TM

    • Make timezone management consistent (especially UTC handling).

    • Fix memory leak in strftime().

  • Standards.IIM

    Disabled debug output for unknown segment markers.

  • Stdio

    • Restore the FD_SETSIZE on NT to 65536.

      Due to #include file restructuring, the FD_SETSIZE value on NT had fallen back to the default (64). This issue has probably affected all releases of Pike since 7.9.2.

    • mv() [NT]

      Fixed single byte buffer overrun in mv() on NT.

      A NUL-terminator was written outside a malloced buffer. This caused intermittent crashes after unusual use of mv().

      Fixes the crash in [PIKE-90].

    • send_file()

      Improved support for TLS/SSL; wait for TLS handshake to complete before calling the sendfile done callback when sending an empty string. This fixes the issue where the connection got closed before TLS handshaking was completed, confusing the other side.

  • Image

    Creating images with mode “grey” now works as documented, e.g. Image.Image(10,10,”grey”,123);


  • mktime/System.TM

    Considerable speedup and a reduction in codesize.

  • Unicode

    Avoid scanning the string in NFC mode if the string is 8-bit, as NFC normalization of 8-bit strings is the identity function.

Building & Tools

  • Hilfe

    Fix commands having priority over code. [LysLysKOM 22552693].

  • Image.SVG

    Fall back to using the unprefixed pkg-config if the arch-prefixed doesn’t exist.

  • Mysql

    Support MariaDB 10.2 headerfiles.

  • export

    • Fixed fix_configure.

      This was broken in multiple ways:

      • Did not consider timestamp on aclocal.m4
      • Did not consider post_modules
      • Did not check configure scripts directly under modules or post_modules
      • When fixing modules, it looked for the configure scripts in the build directory rather than the source directory
      • Did not use the run_autoconfig wrapper

      This has caused xenofarm to export snapshots with out of date configure scripts.

  • precompile

    Support precompilation with Pike 8.1 again.

  • run_autoconfig

    Fix localdir when relative and not “./“

  • smartlink

    Fixed multiple issues on Darwin & NetBSD.

  • Whitefish

    Use the standard VPATH.

  • Yp

    Support using libtirpc. Glibc 2.26 has removed the Sun RPC implementation.