[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-commits] [SCM] GNU PSPP branch, master, updated. v1.5.4-12-g435b06

From: Ben Pfaff
Subject: [Pspp-commits] [SCM] GNU PSPP branch, master, updated. v1.5.4-12-g435b06ea1
Date: Sun, 10 Apr 2022 11:47:25 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU PSPP".

The branch, master has been updated
       via  435b06ea1e6cefd2d540552e161a84a9b2cbef42 (commit)
      from  f7cc11e1ec082a3f38c3323cd5dbbe319b9a6229 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 435b06ea1e6cefd2d540552e161a84a9b2cbef42
Author: Ben Pfaff <>
Date:   Sun Apr 10 08:47:00 2022 -0700

    expressions: Convert SYSMIS into int as INT_MIN during optimization too.
    In an expression like LPAD('abc', $sysmis), the LPAD function is evaluated
    using a C function that takes an 'int' as its second argument.  During
    expression evaluation, out-of-range values get converted into SYSMIS by
    the NUM_TO_INTEGER operator that gets automatically inserted to ensure
    that, and then SYSMIS gets converted into INT_MIN to pass to the C
    function.  This worked OK for runtime evaluation, but the optimizer failed
    to do the conversion of SYSMIS to INT_MIN, which yielded undefined
    behavior.  Some platforms (e.g. GCC on x86) converted SYSMIS (which is
    the second-smallest 'double' value) into INT_MIN, so no problem showed up
    there, but other platforms yielded INT_MAX, causing unexpected failures.
    This commit fixes the problem by explicitly converting SYSMIS into INT_MIN
    during optimization.
    Thanks to Friedrich Beckmann for reporting and uncovering the problem.
    Bug #62267.


Summary of changes:
 src/language/expressions/ | 3 ++-
 src/language/expressions/optimize.c  | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]