Bug 31776 - __nldbl__IO_vfscanf should be a compat symbol
Summary: __nldbl__IO_vfscanf should be a compat symbol
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: stdio (show other bugs)
Version: 2.40
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-21 13:44 UTC by H.J. Lu
Modified: 2024-07-02 09:19 UTC (History)
1 user (show)

See Also:
Host: alpha-*-*
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2024-05-21 13:44:24 UTC
libc.so has:

  2002: 00000000001adf20    92 FUNC    GLOBAL DEFAULT [STD GPLOAD]    11 __nldbl__IO_vfscanf@@GLIBC_2.4

__nldbl__IO_vfscanf should be a compat symbol.
Comment 1 Florian Weimer 2024-05-21 18:07:13 UTC
Are you sure? Doesn't alpha have libnldbl.a? I think we would have to build that differently if it's expected to work with compat symbols.
Comment 2 H.J. Lu 2024-05-21 18:31:23 UTC
math/libnldbl_nonshared.a references __nldbl__IO_vfscanf.
Comment 3 H.J. Lu 2024-05-23 20:09:34 UTC
There are

#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_29)
int
attribute_compat_text_section
__nldbl__IO_vfscanf (FILE *s, const char *fmt, va_list ap, int *errp)
{
  int ret = __vfscanf_internal (s, fmt, ap, SCANF_LDBL_IS_DBL);
  if (__glibc_unlikely (errp != 0))
    *errp = (ret == -1); 
  return ret; 
}
#endif

and

But __nldbl__IO_vfscanf isn't marked as a compat symbol and there are references
to __nldbl__IO_vfscanf in libnldbl_nonshared.a.
Comment 4 Florian Weimer 2024-05-23 20:11:48 UTC
As discussed on libc-alpha, libnldbl_nonshared.a should use __nldbl___isoc99_vfscanf (vfscanf wasn't part of C89).
Comment 5 H.J. Lu 2024-05-24 15:05:30 UTC
I think __nldbl__IO_vfscanf should always be defined:

https://patchwork.sourceware.org/project/glibc/list/?series=34326
Comment 6 H.J. Lu 2024-05-24 18:33:00 UTC
(In reply to H.J. Lu from comment #5)
> I think __nldbl__IO_vfscanf should always be defined:
> 
> https://patchwork.sourceware.org/project/glibc/list/?series=34326

__nldbl__IO_vfscanf should be a compat symbol:

https://patchwork.sourceware.org/project/glibc/list/?series=34338
Comment 7 Florian Weimer 2024-07-02 09:19:43 UTC
The failures I see are:

* alpha-linux-gnu

Missing functions in libc.a:
 __nldbl__IO_vfscanf

* i686-gnu

Missing functions in libc.a:
 __pthread_get_cleanup_stack pthread_attr_destroy pthread_attr_getscope pthread_attr_init pthread_attr_setschedparam pthread_attr_setscope pthread_cond_broadcast pthread_cond_destroy pthread_cond_init pthread_cond_signal pthread_cond_timedwait pthread_cond_wait pthread_condattr_destroy pthread_condattr_init pthread_exit pthread_mutex_destroy pthread_mutex_init pthread_mutex_lock pthread_mutex_unlock pthread_setcancelstate pthread_setcanceltype
Extra functions in libc.a:
evc_wait_clear.o: evc_wait_clear
fchroot.o: fchroot
path-lookup.o: file_name_path_scan
errstring.o: mach_error_full_diag
errstring.o: mach_error_string_int
mach_init.o: mach_init
mach_msg_trap.o: mach_msg_trap

Extra functions in libhurduser.a:
RPC_auth_getids.o: auth_getids
RPC_auth_makeauth.o: auth_makeauth
RPC_auth_server_authenticate.o: auth_server_authenticate
RPC_auth_user_authenticate.o: auth_user_authenticate
RPC_crash_dump_task.o: crash_dump_task
RPC_dir_link.o: dir_link
RPC_dir_lookup.o: dir_lookup
RPC_dir_mkdir.o: dir_mkdir
RPC_dir_mkfile.o: dir_mkfile

Extra functions in libmachuser.a:
RPC_device_close.o: device_close
RPC_device_get_status.o: device_get_status
RPC_device_intr_ack.o: device_intr_ack
RPC_device_intr_register.o: device_intr_register
RPC_device_map.o: device_map
RPC_device_open.o: device_open
RPC_device_open_new.o: device_open_new
RPC_device_open_new_request.o: device_open_new_request
RPC_device_open_request.o: device_open_request

* powerpc*-linux-gnu
* s390*-linux-gnu
* sparcv8-linux-gnu
* sparcv9-linux-gnu

Missing functions in libc.a:
 __nldbl__IO_vfscanf

* x86_64-gnu

Missing functions in libc.a:
 __pthread_get_cleanup_stack pthread_attr_destroy pthread_attr_getscope pthread_attr_init pthread_attr_setschedparam pthread_attr_setscope pthread_cond_broadcast pthread_cond_destroy pthread_cond_init pthread_cond_signal pthread_cond_timedwait pthread_cond_wait pthread_condattr_destroy pthread_condattr_init pthread_exit pthread_mutex_destroy pthread_mutex_init pthread_mutex_lock pthread_mutex_unlock pthread_setcancelstate pthread_setcanceltype
Extra functions in libc.a:
evc_wait_clear.o: evc_wait_clear
fchroot.o: fchroot
path-lookup.o: file_name_path_scan
errstring.o: mach_error_full_diag
errstring.o: mach_error_string_int
mach_init.o: mach_init
mach_msg_trap.o: mach_msg_trap

Extra functions in libhurduser.a:
RPC_auth_getids.o: auth_getids
RPC_auth_makeauth.o: auth_makeauth
RPC_auth_server_authenticate.o: auth_server_authenticate
RPC_auth_user_authenticate.o: auth_user_authenticate
RPC_crash_dump_task.o: crash_dump_task
RPC_dir_link.o: dir_link
RPC_dir_lookup.o: dir_lookup
RPC_dir_mkdir.o: dir_mkdir
RPC_dir_mkfile.o: dir_mkfile

Extra functions in libmachuser.a:
RPC_device_close.o: device_close
RPC_device_get_status.o: device_get_status
RPC_device_intr_ack.o: device_intr_ack
RPC_device_intr_register.o: device_intr_register
RPC_device_map.o: device_map
RPC_device_open.o: device_open
RPC_device_open_new.o: device_open_new
RPC_device_open_new_request.o: device_open_new_request
RPC_device_open_request.o: device_open_request