From unknown Mon Jun 23 07:52:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46030: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));" Resent-From: Mathias Steiger Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Fri, 22 Jan 2021 08:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46030 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 46030@debbugs.gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16113034364935 (code B ref -1); Fri, 22 Jan 2021 08:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jan 2021 08:17:16 +0000 Received: from localhost ([127.0.0.1]:59978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2rd5-0001HX-CF for submit@debbugs.gnu.org; Fri, 22 Jan 2021 03:17:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:60728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2oDw-0004Bb-Lh for submit@debbugs.gnu.org; Thu, 21 Jan 2021 23:39:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2oDw-0004EI-Dx for bug-automake@gnu.org; Thu, 21 Jan 2021 23:39:04 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:35728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l2oDu-00061r-8u for bug-automake@gnu.org; Thu, 21 Jan 2021 23:39:04 -0500 Received: by mail-ej1-x632.google.com with SMTP id ox12so5862311ejb.2 for ; Thu, 21 Jan 2021 20:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=pCw5Ajb9FtrzEIZx2y0x5EWoFW+YjOljvgurPWT46Q4=; b=UHt1AYttgdTO5HSCrlijmE/OgN2Yy0KdiyJwdP+eiDZrIFjdwd/SA0Qz5gKA5TBkXe dghLg/tdjax4vdJ5m9UK7/IjilJym/bonuO4EJ1KROF4e+rcTDWHThcnS5NFK6knoqsD dizcxJkYf+KCx1vuQG1gUl+rA2jTnow1Pm4UTQSN95aAy60/thEsbU1pNSyr4AS7kakJ i1yV9nP7eCs9EUvviWzv550F34HHnZ0oCDgnNomr+nHgOBd5rK0lxozOuPYOrHmzvWCZ Var766AGZIaRJHLbKSyo1jOvveaw1uCyEvH3HVTUNwc4cRUJxaiqQCvwAgglR3P3HnfQ LEAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=pCw5Ajb9FtrzEIZx2y0x5EWoFW+YjOljvgurPWT46Q4=; b=L4pqCfae41YVaYLtPPbKEUJM9aUrTogrBG3cfGGiSicxr/YAKS26cfY1+hI+ApayaA dL5d8Dkw0vuxyXUN8eouCJqcHkCvbf3GXKssRZ0BKMTPVE88UYajr51KOqUitqVhfCGz S4Olu0Qhx8yFgk5LFXLezQJo62qt/HXwZu1+5+6jgFhA0G87XdVgfYugnd80YEgx71fy U2zyxyVDhmgo9EPS/gg+BxDmOcuPsY/V+LAwx/bjFBehM7PXO6Io+f/jf/L0PipsQo1d htBpdX/BfbeHFJlTL469mndVDrtYlSvb/Kvo6XmzmMHxAUJ7MFIKHNfv4cCloPNU1cq0 ggvQ== X-Gm-Message-State: AOAM530mWeGWoCDSG8gncxlYHBBRj70szP3XT6riSpSOXICbEBDjMpYx owfEUnI2xeAfcXvR8ylORF6OrqZ1PdL93w== X-Google-Smtp-Source: ABdhPJxnpLJ+ux+lfpk2azemvxYUH3fWsAINEAlj6vwDW1R+3sXtHiMdC8te0oEW1rNm+3xXWpgwLA== X-Received: by 2002:a17:906:7215:: with SMTP id m21mr1745180ejk.248.1611290339784; Thu, 21 Jan 2021 20:38:59 -0800 (PST) Received: from [192.168.178.24] (dslb-002-203-219-105.002.203.pools.vodafone-ip.de. [2.203.219.105]) by smtp.gmail.com with ESMTPSA id b26sm4263609eds.48.2021.01.21.20.38.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Jan 2021 20:38:59 -0800 (PST) From: Mathias Steiger X-Google-Original-From: Mathias Steiger Message-ID: <095575af-f340-b87c-c18f-491e2dfb1a4e@gmail.com> Date: Fri, 22 Jan 2021 05:38:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=mathias.steiger@googlemail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RAZOR2_CF_RANGE_51_100=1.886, RAZOR2_CHECK=0.922, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Fri, 22 Jan 2021 03:17:14 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Subject: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));" Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' -DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS uname output: Linux C1MPAQ 5.10.7-arch1-1 #1 SMP PREEMPT Wed, 13 Jan 2021 12:02:01 +0000 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.1 (Archlinux: core/bash 5.1.004-1) Patch Level: 4 Release Status: release Description: An Autoconf configure script from Libreelec does fail, because some file it generated does unexpectedly contain output from some command it called in an if-statement that had output directed to >& /dev/null . Various alterations to the script do produce strange outcomes. Sometimes it avoids the bug, sometimes it will result in the line "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));" to be inserted into the file in addition to the behavior. See "Repeat-By" for more details. A great mystery is the origin of the line "extern void free ...". A grep on the Libreelec files doesn't return anything. I could only find it in /usr/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.2.h . But then removing that file still resulted in the the line being wrongfully inserted. In bash-5.0.018-2 the bug does not appear. I already reported this to bug-bash@gnu.org , but I was advised that this bug should be handled by autoconf. It looks to me like a pointer overflow, which causes bash to write to the wrong buffer. Strace: https://filebin.net/9auqyreezma08z12/bug_bash.tar.gz?t=3bjx4xpd Repeat-By: git clone https://github.com/LibreELEC/LibreELEC.tv # 0582177d5eb0ec37d88dfa197908d3b03d047863 cd LibreELEC.tv ARCH=aarch64 PROJECT=Amlogic DEVICE=AMLGX ./scripts/build linux     -> the build fails after a minute at package "ccache" in the Autoconfig step due to wrongful insertion of silenced command output into file config.status at line 533 In: build.LibreELEC-AMLGX.aarch64-9.80-devel/build/ccache-3.7.12/configure Go to line 6532: if diff "$cache_file" confcache >/dev/null 2>&1; then :; else Hint: $cache_file is always /dev/null , hence the if-statement will evaluate false This diff command is the source of the insertion in build.LibreELEC-AMLGX.aarch64-9.80-devel/build/ccache-3.7.12/config.status :         0a1,97:         > # This file is a shell script that caches the results of configure         > # tests run on this system so they can be shared between configure         ... Remove the line and the corresponding "fi" that closes the if-statement     -> script inserts "extern void free ..." instead into ./config.status at line 533 Replace line with: if diff "$cache_file" confcache >& /tmp/nothing; then :; else     -> script inserts not only "extern void free ..." in config.status, but also the following into /tmp/nothing at the top in addition to the output:         1c1,97         < extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));         ---         > # This file is a shell script that caches the results of configure         ... Replace line with if cat /tmp/nothing >& /dev/null; then :; else     -> script inserts content of /tmp/nothing into ./config.status at line 533 Replace line with if false; then :; else # or some other random command, like "ls >& /dev/null"     -> script works Content of /tmp/nothing (all characters are exact part of the file): 1c1,97 < extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); --- > # This file is a shell script that caches the results of configure > # tests run on this system so they can be shared between configure > # scripts and configure runs, see configure's option --config-cache. > # It is not useful on other systems.  If it contains results you don't > # want to keep, you may remove or edit it. > # > # config.status only pays attention to the cache file if you give it > # the --recheck option to rerun configure. > # > # `ac_cv_env_foo' variables (set or unset) will be overridden when > # loading this file, other *unset* `ac_cv_foo' will be assigned the > # following values. > > ac_cv_build=${ac_cv_build=x86_64-pc-linux-gnu} > ac_cv_c_bigendian=${ac_cv_c_bigendian=no} > ac_cv_c_compiler_clang=${ac_cv_c_compiler_clang=no} > ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu=yes} > ac_cv_c_extern_inline=${ac_cv_c_extern_inline=no} > ac_cv_c_inline=${ac_cv_c_inline=inline} > ac_cv_env_CC_set=set > ac_cv_env_CC_value=/bin/gcc > ac_cv_env_CFLAGS_set=set > ac_cv_env_CFLAGS_value='-march=native -O2 -Wall -pipe -I/home/l0rd/LibreELEC.tv/build.LibreELEC-AMLGX.aarch64-9.80-devel/toolchain/include -Wno-format-security' > ac_cv_env_CPPFLAGS_set=set > ac_cv_env_CPPFLAGS_value= > ac_cv_env_CPP_set=set > ac_cv_env_CPP_value=cpp > ac_cv_env_LDFLAGS_set=set > ac_cv_env_LDFLAGS_value='-Wl,-rpath,/home/l0rd/LibreELEC.tv/build.LibreELEC-AMLGX.aarch64-9.80-devel/toolchain/lib -L/home/l0rd/LibreELEC.tv/build.LibreELEC-AMLGX.aarch64-9.80-devel/toolchain/lib' > ac_cv_env_LIBS_set= > ac_cv_env_LIBS_value= > ac_cv_env_build_alias_set=set > ac_cv_env_build_alias_value=x86_64-pc-linux-gnu > ac_cv_env_host_alias_set=set > ac_cv_env_host_alias_value=x86_64-pc-linux-gnu > ac_cv_env_target_alias_set= > ac_cv_env_target_alias_value= > ac_cv_func_asprintf=${ac_cv_func_asprintf=yes} > ac_cv_func_gethostname=${ac_cv_func_gethostname=yes} > ac_cv_func_getopt_long=${ac_cv_func_getopt_long=yes} > ac_cv_func_getpwuid=${ac_cv_func_getpwuid=yes} > ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes} > ac_cv_func_localtime_r=${ac_cv_func_localtime_r=yes} > ac_cv_func_mkstemp=${ac_cv_func_mkstemp=yes} > ac_cv_func_realpath=${ac_cv_func_realpath=yes} > ac_cv_func_setenv=${ac_cv_func_setenv=yes} > ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} > ac_cv_func_strndup=${ac_cv_func_strndup=yes} > ac_cv_func_strtok_r=${ac_cv_func_strtok_r=yes} > ac_cv_func_unsetenv=${ac_cv_func_unsetenv=yes} > ac_cv_func_utimes=${ac_cv_func_utimes=yes} > ac_cv_func_vasprintf=${ac_cv_func_vasprintf=yes} > ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} > ac_cv_header_ctype_h=${ac_cv_header_ctype_h=yes} > ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h=yes} > ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h=yes} > ac_cv_header_memory_h=${ac_cv_header_memory_h=yes} > ac_cv_header_pwd_h=${ac_cv_header_pwd_h=yes} > ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h=yes} > ac_cv_header_stdc=${ac_cv_header_stdc=yes} > ac_cv_header_stdint_h=${ac_cv_header_stdint_h=yes} > ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h=yes} > ac_cv_header_string_h=${ac_cv_header_string_h=yes} > ac_cv_header_strings_h=${ac_cv_header_strings_h=yes} > ac_cv_header_sys_mman_h=${ac_cv_header_sys_mman_h=yes} > ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h=yes} > ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes} > ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h=yes} > ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes} > ac_cv_header_termios_h=${ac_cv_header_termios_h=yes} > ac_cv_header_time=${ac_cv_header_time=yes} > ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes} > ac_cv_header_varargs_h=${ac_cv_header_varargs_h=no} > ac_cv_host=${ac_cv_host=x86_64-pc-linux-gnu} > ac_cv_objext=${ac_cv_objext=o} > ac_cv_path_BASH=${ac_cv_path_BASH=/bin/sh} > ac_cv_path_EGREP=${ac_cv_path_EGREP='/bin/grep -E'} > ac_cv_path_GREP=${ac_cv_path_GREP=/bin/grep} > ac_cv_path_install=${ac_cv_path_install='/bin/install -c'} > ac_cv_prog_AR=${ac_cv_prog_AR=ar} > ac_cv_prog_CC=${ac_cv_prog_CC=/bin/gcc} > ac_cv_prog_CPP=${ac_cv_prog_CPP=cpp} > ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} > ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=} > ac_cv_prog_cc_c99=${ac_cv_prog_cc_c99=} > ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes} > ac_cv_search_cos=${ac_cv_search_cos=-lm} > ac_cv_search_opendir=${ac_cv_search_opendir='none required'} > ac_cv_type_long_long=${ac_cv_type_long_long=yes} > ac_cv_type_unsigned_long_long_int=${ac_cv_type_unsigned_long_long_int=yes} > ccache_cv_COMPAR_FN_T=${ccache_cv_COMPAR_FN_T=yes} > hw_cv_func_asprintf=${hw_cv_func_asprintf=yes} > hw_cv_func_snprintf=${hw_cv_func_snprintf=yes} > hw_cv_func_snprintf_c99=${hw_cv_func_snprintf_c99=yes} > hw_cv_func_vasprintf=${hw_cv_func_vasprintf=yes} > hw_cv_func_vsnprintf=${hw_cv_func_vsnprintf=yes} > hw_cv_func_vsnprintf_c99=${hw_cv_func_vsnprintf_c99=yes} From unknown Mon Jun 23 07:52:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46030: problem is resolved - please close bug References: <095575af-f340-b87c-c18f-491e2dfb1a4e@gmail.com> In-Reply-To: <095575af-f340-b87c-c18f-491e2dfb1a4e@gmail.com> Resent-From: Mathias Steiger Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Fri, 22 Jan 2021 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46030 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 46030@debbugs.gnu.org Received: via spool by 46030-submit@debbugs.gnu.org id=B46030.161133239826797 (code B ref 46030); Fri, 22 Jan 2021 16:20:02 +0000 Received: (at 46030) by debbugs.gnu.org; 22 Jan 2021 16:19:58 +0000 Received: from localhost ([127.0.0.1]:32802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2zAC-0006y8-MD for submit@debbugs.gnu.org; Fri, 22 Jan 2021 11:19:57 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:32972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2yxY-0006bX-3n for 46030@debbugs.gnu.org; Fri, 22 Jan 2021 11:06:53 -0500 Received: by mail-ed1-f49.google.com with SMTP id c6so7177893ede.0 for <46030@debbugs.gnu.org>; Fri, 22 Jan 2021 08:06:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=qTkXPXNnaIT/B8604RPrEfG2U5r7CEeDCcGNtGvIeQ4=; b=uZDZ813dNVKjTQro5jKP9sVqtq/3wIO9CPHN2uaDC38CUpkjwljTdNmziAG/boyYOF iL3Fwo84SR/1gBT6DXhBADwEJtVYaLo7Si3dZd1jtg/2AEQVz9IuqPj6t1XvN4R7kaYb yMjTVGVaDLrvgsJt1sfhv8WS/CcVJQXQZHSrpI/Awf0ArNWHnvy9tIkyI2kvl2MSh4d7 GZPQ1ku00iqM1RiE9fkR93R9VuGWQ0SPEnAygKZsu4iYUnsehl/7iyFeSx1LHGbwKI4y EaDUCQcAIHuIs8GtYlMq67KjMLhDdwPQG6iUFyLy3m+VTPjpIYFnNWaQlMYV1To5n3X3 hIug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=qTkXPXNnaIT/B8604RPrEfG2U5r7CEeDCcGNtGvIeQ4=; b=pZZNaFw/Xp2zVDsYgf2KRYpHzSZE4Pa+CaNb19tP3BsmOQw3z2gi1Hi48r8CQmswSN VtbZgZhdp9eQNSUHyFgKEzXyJN+2XDuNVwLYLYCrsULGHv+kP3my5tZyoOecRTrauE1U kI6XJ7BB3VLhrAHQaS4iwsmdG8u/iKsNsCYiVgnjweXZj2BmkZMst+6vQLsrrxSQM43e b7LBeFFLOPm0YS/VeKasxNt7DwD8vxnoi5LgzBHODilNl7JEHR/7DmHHZJCV7ZNcRi2J 4Fbo2Sxf35G7DCeAGBQkAPqwHONb8+k8G19OlxIs+O8FvRYdPX/mOWoVb38qYyX7Sik6 iktQ== X-Gm-Message-State: AOAM532QLuaUPG5r3gX38b6NRQV5tCDBKhGpAAbk1+A9ErWZXwsAwgnV mdt5ZOivDERanKwoQqJ3Z9E4U+3ctWp9Zw== X-Google-Smtp-Source: ABdhPJz2qjmHnNLBFiGDNl7SvlSZdOBJGID6v8xR3l+MFtfLQzad7rHiP+FItTTouZ9mKWeLPvSdvA== X-Received: by 2002:a05:6402:26c9:: with SMTP id x9mr3734764edd.365.1611331605814; Fri, 22 Jan 2021 08:06:45 -0800 (PST) Received: from [192.168.178.24] (dslb-002-203-219-105.002.203.pools.vodafone-ip.de. [2.203.219.105]) by smtp.gmail.com with ESMTPSA id w6sm4666254ejj.116.2021.01.22.08.06.45 for <46030@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jan 2021 08:06:45 -0800 (PST) From: Mathias Steiger X-Google-Original-From: Mathias Steiger Message-ID: <079f7a11-bc77-23a0-2a7b-f599b0b46055@gmail.com> Date: Fri, 22 Jan 2021 17:06:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Fri, 22 Jan 2021 11:19:56 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The source of the problem is that /dev/null was a regular file on my system. I checked against this before filing the bug, but not in proper ways. I am sorry for the inconvenience. From unknown Mon Jun 23 07:52:03 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Mathias Steiger Subject: bug#46030: closed (Re: bug#46030: problem is resolved - please close bug) Message-ID: References: <202101222210.10MMA1Jg020771@freefriends.org> <095575af-f340-b87c-c18f-491e2dfb1a4e@gmail.com> X-Gnu-PR-Message: they-closed 46030 X-Gnu-PR-Package: automake Reply-To: 46030@debbugs.gnu.org Date: Fri, 22 Jan 2021 22:11:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1611353461-11165-1" This is a multi-part message in MIME format... ------------=_1611353461-11165-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #46030: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothr= ow__ , __leaf__));" which was filed against the automake package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 46030@debbugs.gnu.org. --=20 46030: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D46030 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1611353461-11165-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 46030-done) by debbugs.gnu.org; 22 Jan 2021 22:10:04 +0000 Received: from localhost ([127.0.0.1]:33359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l34d2-0002so-Cw for submit@debbugs.gnu.org; Fri, 22 Jan 2021 17:10:04 -0500 Received: from freefriends.org ([96.88.95.60]:38730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l34d0-0002sg-P1 for 46030-done@debbugs.gnu.org; Fri, 22 Jan 2021 17:10:03 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: <46030-done@debbugs.gnu.org> Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 10MMA1MP020777 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <46030-done@debbugs.gnu.org>; Fri, 22 Jan 2021 15:10:02 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 10MMA1Jg020771; Fri, 22 Jan 2021 15:10:01 -0700 Date: Fri, 22 Jan 2021 15:10:01 -0700 Message-Id: <202101222210.10MMA1Jg020771@freefriends.org> From: Karl Berry To: 46030-done@debbugs.gnu.org Subject: Re: bug#46030: problem is resolved - please close bug In-Reply-To: <079f7a11-bc77-23a0-2a7b-f599b0b46055@gmail.com> X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 46030-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) ------------=_1611353461-11165-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Jan 2021 08:17:16 +0000 Received: from localhost ([127.0.0.1]:59978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2rd5-0001HX-CF for submit@debbugs.gnu.org; Fri, 22 Jan 2021 03:17:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:60728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2oDw-0004Bb-Lh for submit@debbugs.gnu.org; Thu, 21 Jan 2021 23:39:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2oDw-0004EI-Dx for bug-automake@gnu.org; Thu, 21 Jan 2021 23:39:04 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:35728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l2oDu-00061r-8u for bug-automake@gnu.org; Thu, 21 Jan 2021 23:39:04 -0500 Received: by mail-ej1-x632.google.com with SMTP id ox12so5862311ejb.2 for ; Thu, 21 Jan 2021 20:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=pCw5Ajb9FtrzEIZx2y0x5EWoFW+YjOljvgurPWT46Q4=; b=UHt1AYttgdTO5HSCrlijmE/OgN2Yy0KdiyJwdP+eiDZrIFjdwd/SA0Qz5gKA5TBkXe dghLg/tdjax4vdJ5m9UK7/IjilJym/bonuO4EJ1KROF4e+rcTDWHThcnS5NFK6knoqsD dizcxJkYf+KCx1vuQG1gUl+rA2jTnow1Pm4UTQSN95aAy60/thEsbU1pNSyr4AS7kakJ i1yV9nP7eCs9EUvviWzv550F34HHnZ0oCDgnNomr+nHgOBd5rK0lxozOuPYOrHmzvWCZ Var766AGZIaRJHLbKSyo1jOvveaw1uCyEvH3HVTUNwc4cRUJxaiqQCvwAgglR3P3HnfQ LEAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=pCw5Ajb9FtrzEIZx2y0x5EWoFW+YjOljvgurPWT46Q4=; b=L4pqCfae41YVaYLtPPbKEUJM9aUrTogrBG3cfGGiSicxr/YAKS26cfY1+hI+ApayaA dL5d8Dkw0vuxyXUN8eouCJqcHkCvbf3GXKssRZ0BKMTPVE88UYajr51KOqUitqVhfCGz S4Olu0Qhx8yFgk5LFXLezQJo62qt/HXwZu1+5+6jgFhA0G87XdVgfYugnd80YEgx71fy U2zyxyVDhmgo9EPS/gg+BxDmOcuPsY/V+LAwx/bjFBehM7PXO6Io+f/jf/L0PipsQo1d htBpdX/BfbeHFJlTL469mndVDrtYlSvb/Kvo6XmzmMHxAUJ7MFIKHNfv4cCloPNU1cq0 ggvQ== X-Gm-Message-State: AOAM530mWeGWoCDSG8gncxlYHBBRj70szP3XT6riSpSOXICbEBDjMpYx owfEUnI2xeAfcXvR8ylORF6OrqZ1PdL93w== X-Google-Smtp-Source: ABdhPJxnpLJ+ux+lfpk2azemvxYUH3fWsAINEAlj6vwDW1R+3sXtHiMdC8te0oEW1rNm+3xXWpgwLA== X-Received: by 2002:a17:906:7215:: with SMTP id m21mr1745180ejk.248.1611290339784; Thu, 21 Jan 2021 20:38:59 -0800 (PST) Received: from [192.168.178.24] (dslb-002-203-219-105.002.203.pools.vodafone-ip.de. [2.203.219.105]) by smtp.gmail.com with ESMTPSA id b26sm4263609eds.48.2021.01.21.20.38.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Jan 2021 20:38:59 -0800 (PST) From: Mathias Steiger X-Google-Original-From: Mathias Steiger To: bug-automake@gnu.org Subject: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));" Message-ID: <095575af-f340-b87c-c18f-491e2dfb1a4e@gmail.com> Date: Fri, 22 Jan 2021 05:38:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=mathias.steiger@googlemail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RAZOR2_CF_RANGE_51_100=1.886, RAZOR2_CHECK=0.922, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 22 Jan 2021 03:17:14 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Subject: obscure bug "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));" Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' -DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS uname output: Linux C1MPAQ 5.10.7-arch1-1 #1 SMP PREEMPT Wed, 13 Jan 2021 12:02:01 +0000 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.1 (Archlinux: core/bash 5.1.004-1) Patch Level: 4 Release Status: release Description: An Autoconf configure script from Libreelec does fail, because some file it generated does unexpectedly contain output from some command it called in an if-statement that had output directed to >& /dev/null . Various alterations to the script do produce strange outcomes. Sometimes it avoids the bug, sometimes it will result in the line "extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));" to be inserted into the file in addition to the behavior. See "Repeat-By" for more details. A great mystery is the origin of the line "extern void free ...". A grep on the Libreelec files doesn't return anything. I could only find it in /usr/include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.2.h . But then removing that file still resulted in the the line being wrongfully inserted. In bash-5.0.018-2 the bug does not appear. I already reported this to bug-bash@gnu.org , but I was advised that this bug should be handled by autoconf. It looks to me like a pointer overflow, which causes bash to write to the wrong buffer. Strace: https://filebin.net/9auqyreezma08z12/bug_bash.tar.gz?t=3bjx4xpd Repeat-By: git clone https://github.com/LibreELEC/LibreELEC.tv # 0582177d5eb0ec37d88dfa197908d3b03d047863 cd LibreELEC.tv ARCH=aarch64 PROJECT=Amlogic DEVICE=AMLGX ./scripts/build linux     -> the build fails after a minute at package "ccache" in the Autoconfig step due to wrongful insertion of silenced command output into file config.status at line 533 In: build.LibreELEC-AMLGX.aarch64-9.80-devel/build/ccache-3.7.12/configure Go to line 6532: if diff "$cache_file" confcache >/dev/null 2>&1; then :; else Hint: $cache_file is always /dev/null , hence the if-statement will evaluate false This diff command is the source of the insertion in build.LibreELEC-AMLGX.aarch64-9.80-devel/build/ccache-3.7.12/config.status :         0a1,97:         > # This file is a shell script that caches the results of configure         > # tests run on this system so they can be shared between configure         ... Remove the line and the corresponding "fi" that closes the if-statement     -> script inserts "extern void free ..." instead into ./config.status at line 533 Replace line with: if diff "$cache_file" confcache >& /tmp/nothing; then :; else     -> script inserts not only "extern void free ..." in config.status, but also the following into /tmp/nothing at the top in addition to the output:         1c1,97         < extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));         ---         > # This file is a shell script that caches the results of configure         ... Replace line with if cat /tmp/nothing >& /dev/null; then :; else     -> script inserts content of /tmp/nothing into ./config.status at line 533 Replace line with if false; then :; else # or some other random command, like "ls >& /dev/null"     -> script works Content of /tmp/nothing (all characters are exact part of the file): 1c1,97 < extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); --- > # This file is a shell script that caches the results of configure > # tests run on this system so they can be shared between configure > # scripts and configure runs, see configure's option --config-cache. > # It is not useful on other systems.  If it contains results you don't > # want to keep, you may remove or edit it. > # > # config.status only pays attention to the cache file if you give it > # the --recheck option to rerun configure. > # > # `ac_cv_env_foo' variables (set or unset) will be overridden when > # loading this file, other *unset* `ac_cv_foo' will be assigned the > # following values. > > ac_cv_build=${ac_cv_build=x86_64-pc-linux-gnu} > ac_cv_c_bigendian=${ac_cv_c_bigendian=no} > ac_cv_c_compiler_clang=${ac_cv_c_compiler_clang=no} > ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu=yes} > ac_cv_c_extern_inline=${ac_cv_c_extern_inline=no} > ac_cv_c_inline=${ac_cv_c_inline=inline} > ac_cv_env_CC_set=set > ac_cv_env_CC_value=/bin/gcc > ac_cv_env_CFLAGS_set=set > ac_cv_env_CFLAGS_value='-march=native -O2 -Wall -pipe -I/home/l0rd/LibreELEC.tv/build.LibreELEC-AMLGX.aarch64-9.80-devel/toolchain/include -Wno-format-security' > ac_cv_env_CPPFLAGS_set=set > ac_cv_env_CPPFLAGS_value= > ac_cv_env_CPP_set=set > ac_cv_env_CPP_value=cpp > ac_cv_env_LDFLAGS_set=set > ac_cv_env_LDFLAGS_value='-Wl,-rpath,/home/l0rd/LibreELEC.tv/build.LibreELEC-AMLGX.aarch64-9.80-devel/toolchain/lib -L/home/l0rd/LibreELEC.tv/build.LibreELEC-AMLGX.aarch64-9.80-devel/toolchain/lib' > ac_cv_env_LIBS_set= > ac_cv_env_LIBS_value= > ac_cv_env_build_alias_set=set > ac_cv_env_build_alias_value=x86_64-pc-linux-gnu > ac_cv_env_host_alias_set=set > ac_cv_env_host_alias_value=x86_64-pc-linux-gnu > ac_cv_env_target_alias_set= > ac_cv_env_target_alias_value= > ac_cv_func_asprintf=${ac_cv_func_asprintf=yes} > ac_cv_func_gethostname=${ac_cv_func_gethostname=yes} > ac_cv_func_getopt_long=${ac_cv_func_getopt_long=yes} > ac_cv_func_getpwuid=${ac_cv_func_getpwuid=yes} > ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes} > ac_cv_func_localtime_r=${ac_cv_func_localtime_r=yes} > ac_cv_func_mkstemp=${ac_cv_func_mkstemp=yes} > ac_cv_func_realpath=${ac_cv_func_realpath=yes} > ac_cv_func_setenv=${ac_cv_func_setenv=yes} > ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} > ac_cv_func_strndup=${ac_cv_func_strndup=yes} > ac_cv_func_strtok_r=${ac_cv_func_strtok_r=yes} > ac_cv_func_unsetenv=${ac_cv_func_unsetenv=yes} > ac_cv_func_utimes=${ac_cv_func_utimes=yes} > ac_cv_func_vasprintf=${ac_cv_func_vasprintf=yes} > ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} > ac_cv_header_ctype_h=${ac_cv_header_ctype_h=yes} > ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h=yes} > ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h=yes} > ac_cv_header_memory_h=${ac_cv_header_memory_h=yes} > ac_cv_header_pwd_h=${ac_cv_header_pwd_h=yes} > ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h=yes} > ac_cv_header_stdc=${ac_cv_header_stdc=yes} > ac_cv_header_stdint_h=${ac_cv_header_stdint_h=yes} > ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h=yes} > ac_cv_header_string_h=${ac_cv_header_string_h=yes} > ac_cv_header_strings_h=${ac_cv_header_strings_h=yes} > ac_cv_header_sys_mman_h=${ac_cv_header_sys_mman_h=yes} > ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h=yes} > ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes} > ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h=yes} > ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes} > ac_cv_header_termios_h=${ac_cv_header_termios_h=yes} > ac_cv_header_time=${ac_cv_header_time=yes} > ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes} > ac_cv_header_varargs_h=${ac_cv_header_varargs_h=no} > ac_cv_host=${ac_cv_host=x86_64-pc-linux-gnu} > ac_cv_objext=${ac_cv_objext=o} > ac_cv_path_BASH=${ac_cv_path_BASH=/bin/sh} > ac_cv_path_EGREP=${ac_cv_path_EGREP='/bin/grep -E'} > ac_cv_path_GREP=${ac_cv_path_GREP=/bin/grep} > ac_cv_path_install=${ac_cv_path_install='/bin/install -c'} > ac_cv_prog_AR=${ac_cv_prog_AR=ar} > ac_cv_prog_CC=${ac_cv_prog_CC=/bin/gcc} > ac_cv_prog_CPP=${ac_cv_prog_CPP=cpp} > ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=ranlib} > ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=} > ac_cv_prog_cc_c99=${ac_cv_prog_cc_c99=} > ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes} > ac_cv_search_cos=${ac_cv_search_cos=-lm} > ac_cv_search_opendir=${ac_cv_search_opendir='none required'} > ac_cv_type_long_long=${ac_cv_type_long_long=yes} > ac_cv_type_unsigned_long_long_int=${ac_cv_type_unsigned_long_long_int=yes} > ccache_cv_COMPAR_FN_T=${ccache_cv_COMPAR_FN_T=yes} > hw_cv_func_asprintf=${hw_cv_func_asprintf=yes} > hw_cv_func_snprintf=${hw_cv_func_snprintf=yes} > hw_cv_func_snprintf_c99=${hw_cv_func_snprintf_c99=yes} > hw_cv_func_vasprintf=${hw_cv_func_vasprintf=yes} > hw_cv_func_vsnprintf=${hw_cv_func_vsnprintf=yes} > hw_cv_func_vsnprintf_c99=${hw_cv_func_vsnprintf_c99=yes} ------------=_1611353461-11165-1--