mainAutoconf - Support: sr #110362, STRERROR_R_CHAR_P broken by...

 
 

sr #110362: STRERROR_R_CHAR_P broken by 326c9a547423d25c621bc5c0ef76edbf6eda8c92

Submitter:  None
Submitted:  Wed 04 Nov 2020 09:08:51 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 05 Nov 2020 02:22:47 PM UTC, comment #1: 

Fixed in c8b3f6987a7bbfe15ce2c2f04f308a6abc263d04.

Annoyingly, the test suite cannot detect this; we'd have to have a database of expected results for the tests, which we don't, and we'd have to run the test suite on an OS where strerror_r actually does return `char *`.  It doesn't help that AC_COMPILE_IFELSE has no concept of "this compilation failed, but not for the reason we think it might fail."

Zack Weinberg <zackw>
Group administrator
Wed 04 Nov 2020 09:08:51 PM UTC, original submission:  

After http://git.savannah.gnu.org/cgit/autoconf.git/commit/lib/autoconf/functions.m4?id=326c9a547423d25c621bc5c0ef76edbf6eda8c92
detection fails because <string.h> is no longer included.


checking whether strerror_r is declared... yes
checking whether strerror_r returns char *... no



configure:11444: x86_64-mageia-linux-gnu-gcc -c -O2 -g -pipe -Wformat
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4 -fstack-protector-all
-fasynchronous-unwind-tables -I/usr/include/et -fPIC
-fno-strict-aliasing -fstack-protector-all -I/usr/include/et
conftest.c >&5
conftest.c: In function 'main':
conftest.c:77:14: warning: implicit declaration of function
'strerror_r' [-Wimplicit-function-declaration]
   77 |    char x = *strerror_r (0, buf, sizeof buf);
      |              ^~~~~~~~~~
conftest.c:77:13: error: invalid type argument of unary '*' (have 'int')
   77 |    char x = *strerror_r (0, buf, sizeof buf);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
conftest.c:78:14: warning: initialization of 'char *' from 'int' makes
pointer from integer without a cast [-Wint-conversion]
   78 |    char *p = strerror_r (0, buf, sizeof buf);
      |              ^~~~~~~~~~
configure:11444: $? = 1


The suspicious part of the commit is:


-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-05 zackw StatusNone Done
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code