commit 1f659e4165072905776c1005238428a975cbffcd Author: Alberto Bertogli Date: Sun Oct 29 14:08:17 2023 +0000 libfiu 1.2 commit 885cf570d1b79c85b12d3b6576bce131807588b7 Author: Alberto Bertogli Date: Sat Aug 19 18:48:44 2023 +0100 Auto-format code This patch implements auto-formatting using clang-format (for C) and black (for Python). There are no logic changes, all the diff (other than Makefile and .clang-format) is auto-generated by the formatting tools. commit 88b961aad6b1fcbc0e1decbf34a0bc9510600988 Author: Alberto Bertogli Date: Mon Aug 14 18:10:43 2023 +0100 python: Update setup to use setuptools Python's distutils is deprecated and will be removed from the main distribution soon; it's being replaced by setuptools as described in PEP 632. To prepare for that change, this patch updates our Python build script (setup.py) to use setuptools instead of distutils. commit 1be3d9d78253b8fcc553f33e27d4eb4d3a051441 Author: Alberto Bertogli Date: Mon Aug 14 12:25:19 2023 +0100 python: Remove Python 2 support Python 2 has been end-of-life for years, remove support so we can reduce the code complexity and simplify future changes to setup.py. commit a417ce4716e1d9d5db4f20fa86d3eea2f3fb2916 Author: Alberto Bertogli Date: Sat Feb 25 11:14:02 2023 +0000 fiu-run: Fix shell error in deprecated option parsing When using the deprecated options (e.g. `-e`), there is a bug where some of the bash comparisons are invalid because the variable names are incorrect. This bug has been present since these flags were deprecated in 2012 (commit c5f4c471). Thanks to Lynn Kerby who reported this issue and provided a patch for it! Co-authored-by: Lynn Kerby commit 5dcc6d449dc86d4ba9abc99ac52fd5798e573738 Author: Alberto Bertogli Date: Sat Feb 25 10:48:20 2023 +0000 tests: Update wrap-python to support newer distutil versions The `wrap-python` script tries to detect the build location for the Python bindings, but unfortunately newer distutil versions have changed the directory layout and it is no longer finding them. This detection method is brittle in general, but it was needed to support multiple Python major and minor versions. However, these days where only Python 3 is supported, we can probably remove it and rely on the build being consistent, or at least ask the user for a "make clean" between minor Python versions. This is a minimal patch that gets things functional again by loosening the glob to find the build directory. In future patches, we may remove this mechanism altogether and simplify wrap-python. commit b0452b6e78c33e1eabf7520edefb658518c9368d Author: Alberto Bertogli Date: Sun Aug 28 16:29:41 2022 +0100 python: Replace deprecated PyEval_CallObject call This patch removes the use of the deprecated PyEval_CallObject(), replacing it with its replacement, PyObject_CallObject(). commit 426569ad2bb90dff9df32a2da35a7cbf3d0f23ec Author: Alberto Bertogli Date: Sun Aug 28 16:05:33 2022 +0100 tests: Skip fprintf() test if it can't be wrapped Under some conditions, fprintf() is declared as a macro. And when _FORTIFY_SOURCE is set, it can be declared in the headers and forced to be inlined. In both cases, the preload can't work because the function is never looked up outside the binary. This has caused some test failures in the Ubuntu packaging automated builds, which builds the libfiu packages using fortified flags. Thanks to Gianfranco Costamagna for identifying and reporting this issue. commit 902b282375587352dccf6467fa740330d6900e54 Author: Alberto Bertogli Date: Sun Aug 28 11:18:52 2022 +0100 tests: Prevent compiler from inlining stack test functions The tests for enable_stack() and enable_stack_by_name() depend on being able to identify specific functions in the stack. If those functions are inlined, they may not appear in the backtrace information and cause the tests to fail. For example, this happens when the test is built with CFLAGS="-flto=auto -O2", as reported in https://bugs.debian.org/1015487. This patch fixes the problem by telling the compiler not to inline those specific test functions. The attribute used works at least with GCC (tested), clang (tested), and icc (based on documentation). The documentation is also updated to explicitly mention this, to prevent users from getting confused due to this same problem on their own builds.