Hi,

sorry for the very late reply. The problem is still present on 32-bit architectures (nemo is still built for armhf and i386, and for armel in trixie), and it was also reported upstream: https://github.com/linuxmint/nemo/issues/2947

With the help of an LLM, I went through the cause. Its analysis says that the computed values are right (the progress bar is correct); only the text is wrong. The text is built by a printf-like helper that skips the previous arguments with small callbacks such as:

  static void custom_size_skip (va_list *va) { (void) va_arg (*va, goffset); }
  static void custom_time_skip (va_list *va) { (void) va_arg (*va, int); }

On 32-bit targets with -O2, GCC's identical code folding (IPA ICF) seems to merge these callbacks even though they read types of different sizes. In the nemo 6.6.4-1 i386 and armhf binaries in sid, custom_size_skip advances the va_list by 4 bytes instead of 8, so the following sizes are read shifted by 4 bytes: that matches the numbers in the screenshots (e.g. 8.8 EB = 2.06 GB shifted by 32 bits). A minimal case also seems to reproduce it with GCC 14 and 16 (i686 and armhf), and not with -fno-ipa-icf:

  void skip_ll (__builtin_va_list *ap) { (void) __builtin_va_arg (*ap, long long); }   void skip_int (__builtin_va_list *ap) { (void) __builtin_va_arg (*ap, int); }

If this is right, it would be a GCC bug rather than a nemo one, and nemo could work around it (e.g. with __attribute__((no_icf)) on those callbacks). However, I don't have enough knowledge of GCC internals to properly verify what the LLM suggested, nor the time for all the tests and checks needed to report it to GCC, so I'm leaving these notes here in case someone wants to pick it up.

Best regards,
Fabio

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to